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

Martin Basti mbasti at redhat.com
Tue May 26 11:54:13 UTC 2015


On 26/05/15 13:44, Alexander Bokovoy wrote:
> 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'
> >>>
Empty string is expected.
Emptry string means the instance has not been specified, and check will 
be skipped.

Because 'dirsrv.service' doest not contain instance name, so empty 
string should be returned.

-- 
Martin Basti




More information about the Freeipa-devel mailing list