[Freeipa-devel] [PATCH 0259] Server Upgrade: Wait until DS is ready after restart

Alexander Bokovoy abokovoy at redhat.com
Tue May 26 11:44:28 UTC 2015


On Tue, 26 May 2015, Jan Cholasta wrote:
>>I tested 0259.1 (it worked for install and update) but not 0259.2
>>yet.  0259.2 looks OK though; ACK if tested for install and update.
>
>The new patch has only one additional minor fix for a potential 
>problem that currently does not appear anywhere in install and update 
>(see interdiff below), so I consider the ACK transitive.
>
>-            if instance_name.startswith('dirsrv@'):
>+            if instance_name.startswith('dirsrv'):
>+                # this is intentional, return the empty string if the 
>instance
>+                # name is 'dirsrv'
This one is actually pretty bad. If you only check for dirsrv, then
dirsrv.service would get in it and you'd get instance_name[7:] returning
empty string, not a service name at all:
 >>> s='dirsrv.service'
 >>> s[:-8]
 'dirsrv'
 >>> s[:-8][7:]
 ''

 >>> s='dirsrv at foobar.service'
 >>> s[:-8]
 'dirsrv at foobar'
 >>> s[:-8][7:]
 'foobar'
 >>> 

-- 
/ Alexander Bokovoy




More information about the Freeipa-devel mailing list