Menu

#4506 [dev]confignics cannot configure static IP in postscripts in ubuntu14.04.01

2.9.1
closed
BaiYuan
None
ubuntu
5
2015-03-18
2015-01-07
BaiYuan
No

confignics cannot configure static IP in postscripts in ubuntu14.04.01:
reproduce:
[root@byrh04 ~]# lsdef idplex03 -i postscripts
Object name: idplex03
postscripts=syslog,remoteshell,syncfiles,confignics -s
[root@byrh04 ~]# nodeset idplex03 osimage
[root@byrh04 ~]# rsetboot idplex03 net
[root@byrh04 ~]# rpower idplex03 boot

Then login idplex03, ip is not static;

I investigate the reason:
confignics call configeth;
in configeth:
elif [ -f "/etc/debian_version" ];then
str_lease_file="/var/lib/dhcp/dhclient."$str_inst_nic".leases"
if [ -e "$str_lease_file" ];then
str_inst_ip=grep fixed-address $str_lease_file | tail -n 1 | awk '{print $2}' | sed 's/;$//'
str_inst_mask=grep subnet-mask $str_lease_file | tail -n 1 | awk '{print $3}' | sed 's/;$//'
str_inst_gateway=grep routers $str_lease_file | tail -n 1 | awk '{print $3}' | sed 's/;$//'
fi

There is dhclient.leases in idplex03 /var/lib/dhcp/, it is empty file;

So the code run into:
if [ -z "$str_inst_ip" -o -z "$str_inst_mask" ];then
logger -t xcat -p local4.err "configeth: config install nic, can not find the information from lease file, return."
echo "configeth on $NODE: config install nic, can not find information from dhcp lease file, return."
exit 0
fi

Discussion

  • Guang Cheng Li

    Guang Cheng Li - 2015-03-09
    • assigned_to: Guang Cheng Li --> BaiYuan
     
  • BaiYuan

    BaiYuan - 2015-03-12
    • status: open --> pending
     
  • BaiYuan

    BaiYuan - 2015-03-12

    master:commit ff2e58e66f039e961cefde2ec351fa6147709ef6
    commit acd15d4648880a32db87f943b2e52490eed38664

    2.9: commit 1283e35334c4a742978000d6138d2733e7573e14
    commit c329d346bcd932c30c7f13149e951857bec1d64f
    commit f97fb690256acf6ad508610c8ca6e4932155b536

     
  • BaiYuan

    BaiYuan - 2015-03-18
    • status: pending --> closed
     
MongoDB Logo MongoDB