Re: [Freeipa-devel] [PATCH] 0068 upgrade: do not try to start CA if not configured

2016-06-15 Thread Martin Basti



On 15.06.2016 17:19, Martin Basti wrote:



On 15.06.2016 17:17, Martin Basti wrote:



On 15.06.2016 16:41, Petr Spacek wrote:

On 15.6.2016 14:18, Fraser Tweedale wrote:

Attached patch fixes https://fedorahosted.org/freeipa/ticket/5958.
The regression was introduced in fix for
https://fedorahosted.org/freeipa/ticket/5868.

It works for me, ACK.


Pushed to master: 01795fca831ca5ce59a56755d261cb3100d6c3d4

If commit that causes regression was pushed to 4.3.2, shouldn't go 
this to 4.3.2 too?



Should, pushed to ipa-4-3:
* 7514b8b6df46b57ec9353a02d071347c931ea387 upgrade: do not try to start 
CA if not configured


--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH] 0068 upgrade: do not try to start CA if not configured

2016-06-15 Thread Martin Basti



On 15.06.2016 17:17, Martin Basti wrote:



On 15.06.2016 16:41, Petr Spacek wrote:

On 15.6.2016 14:18, Fraser Tweedale wrote:

Attached patch fixes https://fedorahosted.org/freeipa/ticket/5958.
The regression was introduced in fix for
https://fedorahosted.org/freeipa/ticket/5868.

It works for me, ACK.


Pushed to master: 01795fca831ca5ce59a56755d261cb3100d6c3d4

If commit that causes regression was pushed to 4.3.2, shouldn't go this 
to 4.3.2 too?


--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH] 0068 upgrade: do not try to start CA if not configured

2016-06-15 Thread Martin Basti



On 15.06.2016 16:41, Petr Spacek wrote:

On 15.6.2016 14:18, Fraser Tweedale wrote:

Attached patch fixes https://fedorahosted.org/freeipa/ticket/5958.
The regression was introduced in fix for
https://fedorahosted.org/freeipa/ticket/5868.

It works for me, ACK.


Pushed to master: 01795fca831ca5ce59a56755d261cb3100d6c3d4

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


[Freeipa-devel] [PATCH] 0068 upgrade: do not try to start CA if not configured

2016-06-15 Thread Fraser Tweedale
Attached patch fixes https://fedorahosted.org/freeipa/ticket/5958.
The regression was introduced in fix for
https://fedorahosted.org/freeipa/ticket/5868.

Thanks,
Fraser
From 9c6c1e2fb18f87b9e7e64756fd69e10b5949fb82 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale 
Date: Wed, 15 Jun 2016 22:12:52 +1000
Subject: [PATCH] upgrade: do not try to start CA if not configured

The upgrade script always attempts to start the CA, even on
instances where the CA is not configured.  Add guards.

Fixes: https://fedorahosted.org/freeipa/ticket/5958
---
 ipaserver/install/server/upgrade.py | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/ipaserver/install/server/upgrade.py 
b/ipaserver/install/server/upgrade.py
index 
0c5f32d954bb236b11eb3cfcda95e66c0c7913d5..044e36494df95f6624ce639ad6fda68025078aea
 100644
--- a/ipaserver/install/server/upgrade.py
+++ b/ipaserver/install/server/upgrade.py
@@ -1552,10 +1552,11 @@ def upgrade_configuration():
 )
 upgrade_pki(ca, fstore)
 
-# several upgrade steps require running CA
+# several upgrade steps require running CA.  If CA is configured,
 # always run ca.start() because we need to wait until CA is really ready
 # by checking status using http
-ca.start('pki-tomcat')
+if ca.is_configured():
+ca.start('pki-tomcat')
 
 certmonger_service = services.knownservices.certmonger
 if ca.is_configured() and not certmonger_service.is_running():
@@ -1736,10 +1737,11 @@ def upgrade_configuration():
 elif not ds_running and ds.is_running():
 ds.stop(ds_serverid)
 
-if ca_running and not ca.is_running():
-ca.start('pki-tomcat')
-elif not ca_running and ca.is_running():
-ca.stop('pki-tomcat')
+if ca.is_configured():
+if ca_running and not ca.is_running():
+ca.start('pki-tomcat')
+elif not ca_running and ca.is_running():
+ca.stop('pki-tomcat')
 
 
 def upgrade_check(options):
-- 
2.5.5

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code