I have a profile that is created using the command:
cobbler profile add --name=... --parent=...
The child profile's 'Template Files' attribute originally inherited from its parent. For testing, I changed it using
cobbler profile edit --name=...
Once I was done, I thought that the defaults in the parent profile were sufficient, so I wanted to restore the <<inherit>> value. But, neither cobbler profile edit --help nor man cobbler offer any hints how to do so. I tried the cobbler web UI as a last resort, no dice either.
Yeah, I can cobbler profile remove --name=... to delete the modified child profile and then recreate it. It's not that hard, but conceptually it's uneconomical :-(
So the Q: is it possible to restore an inherited value for a profile attribute? If so, what is the correct work flow?
Regards,
--Zack
On Tue, Nov 20, 2012 at 9:53 PM, Zack Perry zack.perry@sbcglobal.net wrote:
I have a profile that is created using the command:
cobbler profile add --name=... --parent=...
The child profile's 'Template Files' attribute originally inherited from its parent. For testing, I changed it using
cobbler profile edit --name=...
Once I was done, I thought that the defaults in the parent profile were sufficient, so I wanted to restore the <<inherit>> value. But, neither cobbler profile edit --help nor man cobbler offer any hints how to do so. I tried the cobbler web UI as a last resort, no dice either.
Yeah, I can cobbler profile remove --name=... to delete the modified child profile and then recreate it. It's not that hard, but conceptually it's uneconomical :-(
So the Q: is it possible to restore an inherited value for a profile attribute? If so, what is the correct work flow?
If you use --template-files='<<inherit>>', does it restore the inheritance?
Hi James,
[...]
So the Q: is it possible to restore an inherited value for a profile attribute? If so, what is the correct work flow?
If you use --template-files='<<inherit>>', does it restore the inheritance?
cobbler: 2.4.0 from epel-testing OS : SL 6.3 64 bit
Short answer: no.
Long answer: please see the following session log:
fedora17-x86_64 : parent fedora17-ph-x86_64: child
[root@cobbler ~]# cobbler profile report --name=fedora17-x86_64 Name : fedora17-x86_64 TFTP Boot Files : {} Comment : DHCP Tag : default Distribution : fedora17-x86_64 Enable gPXE? : 0 Enable PXE Menu? : 1 Fetchable Files : {} Kernel Options : {'interface': 'eth0', 'priority': 'critical', 'locale': 'en_US', 'keyboard-configuration/layoutcode': 'us'} Kernel Options (Post Install) : {'reboot': 'efi'} Kickstart : /var/lib/cobbler/kickstarts/rh.cfg Kickstart Metadata : {'gateway': '192.168.1.254'} Management Classes : [] Management Parameters : <<inherit>> Name Servers : ['192.168.1.254'] Name Servers Search Path : ['gateway.2wire.net'] Owners : ['admin'] Parent Profile : Proxy : Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Repos : ['fedora17-x86_64'] Server Override : <<inherit>> Template Files : {'/srv/cobbler/ub_static_interfaces': '/etc/network/interfaces', '/srv/cobbler/ub_hostname': '/etc/hostname', '/srv/cobbler/ub_hosts': '/etc/hosts'} Virt Auto Boot : 1 Virt Bridge : xenbr0 Virt CPUs : 1 Virt Disk Driver Type : raw Virt File Size(GB) : 5 Virt Path : Virt RAM (MB) : 512 Virt Type : qemu
[root@cobbler ~]# cobbler profile report --name=fedora17-ph-x86_64 Name : fedora17-ph-x86_64 TFTP Boot Files : <<inherit>> Comment : DHCP Tag : <<inherit>> Distribution : <<inherit>> Enable gPXE? : 0 Enable PXE Menu? : <<inherit>> Fetchable Files : <<inherit>> Kernel Options : <<inherit>> Kernel Options (Post Install) : <<inherit>> Kickstart : <<inherit>> Kickstart Metadata : <<inherit>> Management Classes : <<inherit>> Management Parameters : <<inherit>> Name Servers : [] Name Servers Search Path : [] Owners : ['admin'] Parent Profile : fedora17-x86_64 Proxy : ~ Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Repos : <<inherit>> Server Override : <<inherit>> Template Files : <<inherit>> Virt Auto Boot : <<inherit>> Virt Bridge : <<inherit>> Virt CPUs : <<inherit>> Virt Disk Driver Type : <<inherit>> Virt File Size(GB) : <<inherit>> Virt Path : <<inherit>> Virt RAM (MB) : <<inherit>> Virt Type : <<inherit>>
[root@cobbler ~]# cobbler profile edit --name=fedora17-ph-x86_64 --template-files='' [root@cobbler ~]# cobbler profile report --name=fedora17-ph-x86_64 Name : fedora17-ph-x86_64 TFTP Boot Files : <<inherit>> Comment : DHCP Tag : <<inherit>> Distribution : <<inherit>> Enable gPXE? : 0 Enable PXE Menu? : <<inherit>> Fetchable Files : <<inherit>> Kernel Options : <<inherit>> Kernel Options (Post Install) : <<inherit>> Kickstart : <<inherit>> Kickstart Metadata : <<inherit>> Management Classes : <<inherit>> Management Parameters : <<inherit>> Name Servers : [] Name Servers Search Path : [] Owners : ['admin'] Parent Profile : fedora17-x86_64 Proxy : ~ Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Repos : <<inherit>> Server Override : <<inherit>> Template Files : {} Virt Auto Boot : <<inherit>> Virt Bridge : <<inherit>> Virt CPUs : <<inherit>> Virt Disk Driver Type : <<inherit>> Virt File Size(GB) : <<inherit>> Virt Path : <<inherit>> Virt RAM (MB) : <<inherit>> Virt Type : <<inherit>>
[root@cobbler ~]# cobbler profile edit --name=fedora17-ph-x86_64 --template-files='<<inherit>>' [root@cobbler ~]# cobbler profile report --name=fedora17-ph-x86_64 Name : fedora17-ph-x86_64 TFTP Boot Files : <<inherit>> Comment : DHCP Tag : <<inherit>> Distribution : <<inherit>> Enable gPXE? : 0 Enable PXE Menu? : <<inherit>> Fetchable Files : <<inherit>> Kernel Options : <<inherit>> Kernel Options (Post Install) : <<inherit>> Kickstart : <<inherit>> Kickstart Metadata : <<inherit>> Management Classes : <<inherit>> Management Parameters : <<inherit>> Name Servers : [] Name Servers Search Path : [] Owners : ['admin'] Parent Profile : fedora17-x86_64 Proxy : ~ Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Repos : <<inherit>> Server Override : <<inherit>> Template Files : {} Virt Auto Boot : <<inherit>> Virt Bridge : <<inherit>> Virt CPUs : <<inherit>> Virt Disk Driver Type : <<inherit>> Virt File Size(GB) : <<inherit>> Virt Path : <<inherit>> Virt RAM (MB) : <<inherit>> Virt Type : <<inherit>>
Regards,
-- Zack
On Tue, Nov 20, 2012 at 10:23 PM, Zack Perry zack.perry@sbcglobal.net wrote:
Hi James,
[...]
So the Q: is it possible to restore an inherited value for a profile attribute? If so, what is the correct work flow?
If you use --template-files='<<inherit>>', does it restore the inheritance?
cobbler: 2.4.0 from epel-testing OS : SL 6.3 64 bit
Short answer: no.
Ok, I'll take a look into it. Template files were a later addition, so it's possible some of the internal mechanisms to deal with inheritance were not implemented properly.
Zack Perry <zack.perry <at> sbcglobal.net> writes:
Hi James,
[...]
So the Q: is it possible to restore an inherited value for a profile attribute? If so, what is the correct work flow?
If you use --template-files='<<inherit>>', does it restore the inheritance?
cobbler: 2.4.0 from epel-testing OS : SL 6.3 64 bit
Short answer: no.
Long answer: please see the following session log:
fedora17-x86_64 : parent fedora17-ph-x86_64: child
[root <at> cobbler ~]# cobbler profile report --name=fedora17-x86_64 ..... <trimmed> Virt Type : <<inherit>>
Regards,
Not to necropost, but this was at the top of my Google search.
You can revert to inherited values by stopping cobblerd, editing the json file for the profile or the system and then restarting cobblerd.
Is there another way to do this?
Thanks, Mario
cobbler@lists.fedorahosted.org