Description of problem: If you modify a host's platform, it also modifies the host's os. Change host's os to Fedora 11 [root@jennyv2 schema]# ipa host-mod --os="Fedora 11" jennyv4.bos.redhat.com Host updated Show the host [root@jennyv2 schema]# ipa host-show jennyv4.bos.redhat.com cn: jennyv4.bos.redhat.com description: interesting description localityname: Mountain View, CA nshardwareplatform: i686 nshostlocation: IDM Westford lab 3 nsosversion: Fedora 11 Modify the host's platform to i386 [root@jennyv2 schema]# ipa host-mod --platform="i386" jennyv4.bos.redhat.com Host updated [root@jennyv2 schema]# ipa host-show jennyv4.bos.redhat.com cn: jennyv4.bos.redhat.com description: interesting description localityname: Mountain View, CA nshardwareplatform: i386 nshostlocation: IDM Westford lab 3 nsosversion: redhat 5.3 Tikanga Not the nsosversion is now "redhat 5.3 Tikanga" Version-Release number of selected component (if applicable): 2.0 How reproducible: always Steps to Reproduce: 1. ipa host-add jennyv4.bos.redhat.com 2. ipa host-show jennyv4.bos.redhat.com 3. ipa host-mod --os="Fedora 11" jennyv4.bos.redhat.com 4. ipa host-show jennyv4.bos.redhat.com 5 ipa host-mod --platform="i386" 6. ipa host-show jennyv4.bos.redhat.com Actual results: nsosversion is changed to "redhat 5.3 Tikanga" Expected results: nsosversion to be "Fedora 11" Additional info:
My guess is that we are auto-filling arguments not passed on mod operations too which is causing the other values to change. I''d guess that you could duplicate this with the other os/platform attributes as well. Jason, what do you think about this? The variables are defined with autofill and a default set: Str('nshardwareplatform?', cli_name='platform', doc='Hardware platform of this host (e.g. Lenovo T61)', default=determine_platform(), autofill=True, ) It would seem we don't want autofill or a default anyway since there is no guarantee that the host is being added on the actual physical host, causing incorrect data to be set. So it seems to me that the most expedient solution is to simply remove the default and autofill properties.
It looks like modifying anything - modifies the platform and OS [root@jennyv2 schema]# ipa host-show jennyv4.bos.redhat.com cn: jennyv4.bos.redhat.com description: interesting description localityname: Mountain View, CA nshardwareplatform: i389 nshostlocation: IDM Westford lab 3 nsosversion: redhat 5.3 Tikanga [root@jennyv2 schema]# ipa host-mod --os="Fedora 11" jennyv4.bos.redhat.com Host updated [root@jennyv2 schema]# ipa host-show jennyv4.bos.redhat.com cn: jennyv4.bos.redhat.com description: interesting description localityname: Mountain View, CA nshardwareplatform: i686 nshostlocation: IDM Westford lab 3 nsosversion: Fedora 11 NOTE: platform was not modified - but it was changed. [root@jennyv2 schema]# ipa host-mod --description="this is a very interesting description" jennyv4.bos.redhat.com Host updated [root@jennyv2 schema]# ipa host-show jennyv4.bos.redhat.com cn: jennyv4.bos.redhat.com description: this is a very interesting description localityname: Mountain View, CA nshardwareplatform: i686 nshostlocation: IDM Westford lab 3 nsosversion: redhat 5.3 Tikanga
This is fixed in a recent patch. Parameters are cloned with autofill=False in *-mod operations.