Kickstart snippets post_install_network_config and REDHAT_REGISTER_SNIPPET are in wrong order leading to hostname/profilename set to 'unknown'
Issue
- If you try to kickstart a system by using a kickstart file generated directly by
cobbler system getks
or accessing it via http://<stallite>/cblr/svc/op/ks/system/, the post_install_network_config
snippet gets replaced with a code to setup custom network options (which were either set throughcobbler system add/edit --hostname=... --mac=... --ip=...
or inherited from existing system profile when we schedule the kickstart through WebUI), but this snippet is after callingrhnreg_ks
so that hostname is not correctly set at time ofrhnreg_ks
execution and in conjunction with code logic inrhnreg_ks
it leads to sending the unknown string as profilename and hostname to Satellite, becauserhnreg_ks
code if it doesn't find any other name than localhost.localdomain (note that hostname is by default set to localhost.localdomain at the beginning of anaconda installation in RHEL4/5) after callinggethostname()
or after obtaining HOSTNAME from/etc/sysconfig/network
, it sets hostname/profilename to 'unknown'. - sets the cobbler hostname after calling
rhnreg_ks
, which sends the hostname to the satellite so it cannot be correct
Environment
Red Hat Network (RHN) Satellite 5.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.