[Freeipa-devel] [PATCH] 0025/0026 ipa-client-install --hostname not setting HOSTNAME if it is missing from the configuration file

Rob Crittenden rcritten at redhat.com
Wed Oct 12 15:36:35 UTC 2011


Alexander Bokovoy wrote:
> On Wed, 12 Oct 2011, Rob Crittenden wrote:
>>> Also, all keys totally missing from the config will be added. Values
>> >from replacevars and appendvars are merged before doing it so there is
>>> only single key=value pair afterwards. Obviously, it is the caller
>>> responsibility to not allow replacevars/appendvars have conflicting
>>> values.
>>>
>>> Patch 0025 introduces the common code and transforms
>>> ipapython.services.backup_and_replace_hostname()
>>>
>>> Patch 0026 uses this new code to change
>>> ipaserver/install/krb5instance.py to use new code.
>>
>> Why should the caller be responsible for calling restore_context()?
> Because ipapython.ipautil cannot depend on ipapython.services as
> underlying platform-specific code uses ipapython.ipautil -- we
> discussed this with Simo few weeks ago when the first version of this
> patch was done for systemd support.
>
> We have very few places where this is needed and wrapper functions
> (like hostname handler) should take care of the context restoration
> as they will also handle state store as well (in addition to file
> store).
>
>> I think:
>>
>> if old_values['HOSTNAME']: ...
>>
>> should be
>>
>> if 'HOSTNAME' in old_values: ...
> Updated patch attached.
>

Tests out ok for me, ACK.

Pushed to master and ipa-2-1




More information about the Freeipa-devel mailing list