PDA

View Full Version : SLES 12 SP2 Statically IP a host in Wicked, but in a dynamic way



jbmills1
11-Jul-2017, 15:48
Within our HPC cluster, we do not use DHCP. But neither do we manually configure the addresses for thousands of nodes. In SLES 11, we used a bit of bash in /etc/sysconfig/network/ifcfg-eth0 to grep the IP out of /etc/hosts:

HOSTNAME=$(hostname -s)
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR=$(egrep "\<${HOSTNAME}.prv.cube\>" /etc/hosts | awk '{print $1"/16"}')
MTU='1500'
STARTMODE='auto'
USERCONTROL='no'

However, this no longer works in SLES 12 because of wicked.

So I'm hoping someone on here can point to a way to implement a similar functionality, but using wicked instead.

Cheers,

Jonathan Mills
NASA Goddard Space Flight Center

jmozdzen
11-Jul-2017, 17:37
Hi Jonathan,

my guess is that you have some automatism to configure /etc/hosts - how about extending that to configure the IP address info in the compat files (/etc/sysconfig/network/ifcfg-*) as well?

Regards,
J