[Spacewalk-list] Kickstarting with static network configuration

Grebien, Tim T.Grebien at wlv.ac.uk
Fri Jan 20 09:34:42 UTC 2017


Hello,

there seem to be some problems with Kickstart and static IP configuration.

I have put the following into my Kickstart profile:

network --bootproto static --gateway $gw --nameserver $dns --hostname $hostname --ip $addr --netmask 255.255.255.0

Initial deployment is fine, machine installs well and boots up with static configuration. However, when I schedule a redeployment through Spacewalk the Machine installs first with the static configuration and then at the end of the installation the ifcfg-$interface file gets replaced with a dynamic configuration:

testclient8# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
DEVICE=enp0s3
ONBOOT=yes
HWADDR=08:00:27:xx:xx:xx
TYPE=Ethernet
BOOTPROTO=dhcp

Having a look in the generated cobbler profile reveals:

spacewalk# cobbler system dumpvars --name=testclient8.localdomain:1 | grep interfaces
interfaces : {'enp0s3': {'dhcp_tag': '', 'subnet': '', 'ipv6_address': '', 'virt_bridge': '', 'interface_master': '', 'static_routes': [], 'ipv6_static_routes': [], 'dns_name': '', 'interface_type': '', 'netmask': '255.255.255.0', 'mtu': '', 'ip_address': ‚xx.xx.xx.xx', 'bonding': '', 'static': False, 'bonding_opts': '', 'mac_address': '08:00:27:xx:xx:xx', 'ipv6_secondaries': [], 'ipv6_mtu': '', 'bridge_opts': '', 'bonding_master': '', 'ipv6_default_gateway': '‘}}

So notably ‚static‘ is set to false.

Looking a bit deeper it seems that somehow Spacewalk(or cobbler) automatically embeds a pre and a post kickstart snippet for network configuration into my kickstart file (pre_install_network_config and post_install_network_config). Is there a way to prevent the integration of those two snippets?

A different approach that I tried was to schedule the Kickstart with Systems->testclient->provisioning->Schedule->Advanced Configuration, setting Network Connection to „Use static interface“ enp0s3. In this case the cobbler variable ’static’ is correctly set to true. However, after reboot the kickstart fails with the error message:

dracut-initqueue[537]: Warning: failed to fetch kickstart from file:ks.cfg

Apparently, the kickstart file isn’t correctly embedded into the initrd.

Is there currently any way to (re-)deploy machines with static network configuration? Am I doing something wrong?

Best,
Tim






More information about the Spacewalk-list mailing list