On 01.03.2016 17:14, Martin Basti wrote:


On 01.03.2016 17:13, Petr Vobornik wrote:
On 03/01/2016 05:02 PM, Martin Basti wrote:


On 01.03.2016 16:39, Petr Vobornik wrote:
On 02/23/2016 06:15 PM, Martin Basti wrote:


On 23.02.2016 17:31, Tomas Babej wrote:

On 02/23/2016 01:25 PM, Martin Basti wrote:

On 23.02.2016 13:02, Alexander Bokovoy wrote:
On Tue, 23 Feb 2016, Martin Basti wrote:
From f2ae1bd129a1741500d2f3dcb86a0da553604d15 Mon Sep 17 00:00:00
2001
From: Martin Basti <mba...@redhat.com>
Date: Tue, 23 Feb 2016 10:37:47 +0100
Subject: [PATCH 4/4] fix upgrade: wait for proper DS socket after DS
restart

Restarting DS executed by upgrade plugin causes that upgrade
frameworg
was waiting for not proper socket to be ready. This commit fix
issue.
Please fix the commit message typos.

Fixed. Updated patches attached.
ACK.

Tomas
Pushed to master: 0accf8ccb64963954dbe7c137d23f52e5901ac4f
Pushed to ipa-4-3: 4734012c8063460f93f3b819a5bbcca797f6059e
Pushed to ipa-4-2: 63d8caf0d105f02decc0b5d865fedf6ad063bc1a


Testing freeipa-4.2.4 build and it fails at
install/dsinstance.py:add_sidgen_plugin:936

adding self.ldap_connect() on line 937 fixed the issue.

Well I may rework PATCH 0416, and fix it in different way, or I can add
self.ldap_connect() to sidgen and extdom steps.

Which is better?


I would avoid reworking it in all 3 branches if in 4.3 and master it works and is actually correct. Doesn't make sense to change new code because of missing features in old branches. Adding connect to ipa-4-2 seems enough to me.

IMO it works accidentaly there, any additional patch or restart can break it in 4.3 and master too

Patch attached.

ipa-4-2 needs to have backported ca8f63624b204f0c4f2d1ac5f4ed93551f7e62df
From fbdf7938dfb150e618a13310bc71de396a0ba944 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Tue, 1 Mar 2016 17:36:55 +0100
Subject: [PATCH] Fix connections to DS during installation

Regression caused by commit 9818e463f5d0a91b300801ee7c8f31f25de402b2,
admin_conn should be connected in method if there is no connection.

https://fedorahosted.org/freeipa/ticket/5665
---
 ipaserver/install/dsinstance.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index 93af0ac0a3f6a9a36fbc500f05f9795f9db0de2f..b7a480749f0edb0dca5af7229d023deefd45768a 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -1067,6 +1067,9 @@ class DsInstance(service.Service):
         """
         Add sidgen plugin configuration only if it does not already exist.
         """
+        if not self.admin_conn:
+            self.ldap_connect()
+
         dn = DN('cn=IPA SIDGEN,cn=plugins,cn=config')
         try:
             self.admin_conn.get_entry(dn)
@@ -1085,6 +1088,9 @@ class DsInstance(service.Service):
         """
         Add extdom configuration if it does not already exist.
         """
+        if not self.admin_conn:
+            self.ldap_connect()
+
         dn = DN('cn=ipa_extdom_extop,cn=plugins,cn=config')
         try:
             self.admin_conn.get_entry(dn)
-- 
2.5.0

-- 
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

Reply via email to