<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 25/05/15 13:57, Martin Basti wrote:<br>
</div>
<blockquote cite="mid:55630E2F.6050306@redhat.com" type="cite">On
25/05/15 09:20, Fraser Tweedale wrote:
<br>
<blockquote type="cite">On Mon, May 25, 2015 at 08:13:35AM +0200,
Jan Cholasta wrote:
<br>
<blockquote type="cite">Dne 22.5.2015 v 15:53 Petr Vobornik
napsal(a):
<br>
<blockquote type="cite">On 05/21/2015 03:16 PM, Fraser
Tweedale wrote:
<br>
<blockquote type="cite">On Thu, May 21, 2015 at 01:38:43PM
+0200, Martin Basti wrote:
<br>
<blockquote type="cite">This patch should fix following
traceback.
<br>
<br>
2015-05-20T03:50:41Z ERROR Upgrade failed with cannot
connect to
<br>
'ldapi://%2fvar%2frun%2fslapd-IPA-LOCAL.socket':
<br>
2015-05-20T03:50:41Z DEBUG Traceback (most recent call
last):
<br>
File
<br>
"/usr/lib/python2.7/site-packages/ipaserver/install/upgradeinstance.py",
<br>
line 304, in __upgrade
<br>
ld = ldapupdate.LDAPUpdate(dm_password='',
ldapi=True)
<br>
File
<br>
"/usr/lib/python2.7/site-packages/ipaserver/install/ldapupdate.py",
<br>
line 314, in __init__
<br>
self.create_connection()
<br>
File
<br>
"/usr/lib/python2.7/site-packages/ipaserver/install/ldapupdate.py",
<br>
line 862, in create_connection
<br>
autobind=self.ldapi)
<br>
File
"/usr/lib/python2.7/site-packages/ipalib/backend.py",
line
<br>
66, in connect
<br>
conn = self.create_connection(*args, **kw)
<br>
File
<br>
"/usr/lib/python2.7/site-packages/ipaserver/plugins/ldap2.py",
line
<br>
188, in create_connection
<br>
client_controls=clientctrls)
<br>
File
"/usr/lib/python2.7/site-packages/ipapython/ipaldap.py",
line
<br>
1074, in external_bind
<br>
'', auth_tokens, server_controls, client_controls)
<br>
File "/usr/lib64/python2.7/contextlib.py", line 35,
in __exit__
<br>
self.gen.throw(type, value, traceback)
<br>
File
"/usr/lib/python2.7/site-packages/ipapython/ipaldap.py",
line
<br>
976, in error_handler
<br>
error=info)
<br>
NetworkError: cannot connect to
<br>
'ldapi://%2fvar%2frun%2fslapd-IPA-LOCAL.socket':
<br>
<br>
2015-05-20T03:50:41Z DEBUG Traceback (most recent call
last):
<br>
File
<br>
"/usr/lib/python2.7/site-packages/ipaserver/install/service.py",
line
<br>
388, in start_creation
<br>
run_step(full_msg, method)
<br>
File
<br>
"/usr/lib/python2.7/site-packages/ipaserver/install/service.py",
line
<br>
378, in run_step
<br>
method()
<br>
File
<br>
"/usr/lib/python2.7/site-packages/ipaserver/install/upgradeinstance.py",
<br>
line 315, in __upgrade
<br>
raise RuntimeError(e)
<br>
RuntimeError: cannot connect to
<br>
'ldapi://%2fvar%2frun%2fslapd-IPA-LOCAL.socket':
<br>
<br>
Reason was the ipa-server-install tried to connect
before DS was ready.
<br>
<br>
The patch adds waiting until DS is ready.
<br>
<br>
Patch attached.
<br>
<br>
Fraser can you please check if this fix works? I can't
reproduce it.
<br>
Thank you, Martin^2.
<br>
<br>
</blockquote>
ACK; fixes the issue for me.
<br>
<br>
One minor comment:
<br>
<br>
<blockquote type="cite">+ def __start(self):
<br>
+ super(IPAUpgrade, self).start()
<br>
<br>
def __stop_instance(self):
<br>
"""Stop only the main DS instance"""
<br>
@@ -187,7 +185,7 @@ class IPAUpgrade(service.Service):
<br>
self.step("saving configuration",
self.__save_config)
<br>
self.step("disabling listeners",
self.__disable_listeners)
<br>
self.step("enabling DS global lock",
<br>
self.__enable_ds_global_write_lock)
<br>
- self.step("starting directory server",
self.__start_nowait)
<br>
+ self.step("starting directory server",
self.__start)
<br>
</blockquote>
I think you can just say `self.start' and remove `__start'
function.
<br>
<br>
Cheers,
<br>
Fraser
<br>
<br>
</blockquote>
Pushed to master: 3d17bf8e639616893d6937d98662ccc7541d1e23
<br>
</blockquote>
This semi-breaks ipa-server-install for me:
<br>
<br>
Configuring directory server (dirsrv): Estimated time 1 minute
<br>
[1/38]: creating directory server user
<br>
[2/38]: creating directory server instance
<br>
ipa : CRITICAL Failed to restart the directory server
([Errno 2] No
<br>
such file or directory). See the installation log for details.
<br>
[3/38]: adding default schema
<br>
[4/38]: enabling memberof plugin
<br>
<br>
It would be nice to check if the socket exists before waiting
for it.
<br>
<br>
</blockquote>
This (non-catastrophic but annoying) regression occurred for me
too.
<br>
I wasn't paying enough attention to ipa-server-install before I
<br>
ACKed the patch :/
<br>
<br>
<blockquote type="cite">-- <br>
Jan Cholasta
<br>
</blockquote>
</blockquote>
Hello,
<br>
<br>
this patch fixes the issue.
<br>
<br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
Updated patch attached<br>
<br>
<pre class="moz-signature" cols="72">--
Martin Basti</pre>
</body>
</html>