Menu

#4540 confignics/configeth produces an error:

2.9
pending
Ling
None
ubuntu
5
2015-02-19
2015-01-28
No

When running our stateful and diskless configurations we get the following error in the system startup which prevents eth2 from working:

#XCAT_CONFIG
configeth on tulgpu002: os type: debian
configeth on tulgpu002: old configuration: 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq portid 40f2e9319690 state UP group default qlen 1000
link/ether 40:f2:e9:31:96:90 brd ff:ff:ff:ff:ff:ff
inet 9.2.132.212/26 brd 9.2.132.255 scope global eth2
valid_lft forever preferred_lft forever
inet6 fe80::42f2:e9ff:fe31:9690/64 scope link 
valid_lft forever preferred_lft forever
configeth on tulgpu002: new configuration
9.2.132.212, 9.2.132.192, 255.255.255.192, 9.2.132.194
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq portid 40f2e9319690 state UP mode DEFAULT group default qlen 1000
eth2
/etc/network/interfaces.d/eth2:6: option with empty value
RTNETLINK answers: Cannot assign requested address
configeth on tulgpu002: eth2 changed, modify the configuration files
eth2
/etc/network/interfaces.d/eth2:6: option with empty value
ifup: couldn't read interfaces file "/etc/network/interfaces.d/eth2"
confignics on tulgpu002: unknown nic type for bmc: tulgpu-bmc002 .

the node configuration for this node looks like:

[root@bgxcat postscripts]# lsdef tulgpu002 -z
# <xCAT data object stanza file>

tulgpu002:
    objtype=node
    appstatus=provision=failed
    appstatustime=01-28-2015 07:55:06
    arch=ppc64el
    bmc=tulgpu-bmc002
    bmcpassword=passw0rd
    bmcport=dedicated
    chain=osimage=tulgpu-0000-stateful-compute:--noupdateinitrd
    cmdmapping=/opt/pcm/etc/hwmgt/mappings/HWCmdMapping_tuletta_ipmi.xml
    cons=ipmi
    currchain=boot
    currstate=boot
    groups=__Managed,__NetworkProfile_tulgpu-net,__ImageProfile_tulgpu-0000-stateful-compute,tulgpu-compute,__HardwareProfile_tuletta_IMPI
    height=4
    initrd=xcat/osimage/tulgpu-0000-netboot-compute/initrd-stateless.gz
    installnic=mac
    ip=10.0.0.7
    kcmdline=imgurl=http://10.0.0.1//install/netboot/ubuntu14.10/ppc64el/tulgpu-0000-netboot-compute/rootimg.gz XCAT=10.0.0.1:3001 BOOTIF=40:f2:e9:31:8e:f0 console=tty0 console=hvc0,19200n8r
    kernel=xcat/osimage/tulgpu-0000-netboot-compute/kernel
    mac=40:f2:e9:31:8e:f0
    mgt=ipmi
    netboot=petitboot
    nichostnamesuffixes.eth0=-eth0
    nichostnamesuffixes.eth2=-eth2
    nicips.eth2=9.2.132.212
    nicips.bmc=tulgpu-bmc002
    nicips.eth0=10.0.0.7
    nicnetworks.eth0=provision
    nicnetworks.eth2=public
    nictypes.eth0=Ethernet
    nictypes.eth2=Ethernet
    nodetype=ppc
    os=ubuntu14.10
    postbootscripts=confignics,setroute,setupcnldaplient
    postscripts=setminiuidgid,mkresolvconf,setupntp,setnetboot
    primarynic=mac
    profile=compute
    provmethod=tulgpu-0000-stateful-compute
    rack=r3r7
    routenames=tulgpu_eth2
    serialflow=hard
    serialport=0
    serialspeed=19200
    status=booted
    statustime=01-28-2015 09:01:40
    unit=13
    updatestatus=synced
    updatestatustime=01-19-2015 15:32:11
    xcatmaster=10.0.0.1

and the osimage is as follows:

[root@bgxcat postscripts]# lsdef -t osimage tulgpu-0000-stateful-compute -z
# <xCAT data object stanza file>

tulgpu-0000-stateful-compute:
    objtype=osimage
    description=The ubuntu14.10 ppc64el stateful compute image profile
    groups=all
    imagetype=linux
    osarch=ppc64el
    osdistroname=ubuntu14.10-ppc64el
    osname=Linux
    osvers=ubuntu14.10
    otherpkglist=/install/custom/tulgpu-0000-stateful-compute/ubuntu/ppc64el/compute.otherpkg.pkglist
    pkgdir=/install/ubuntu14.10/ppc64el/
    pkglist=/install/custom/tulgpu-0000-stateful-compute/ubuntu/ppc64el/compute.pkglist
    postscripts=custom/tulgpu-0000-stateful-compute/compute.postscript
    profile=compute
    provmethod=install
    serverrole=compute
    synclists=/install/custom/tulgpu-0000-stateful-compute/ubuntu/ppc64el/compute.synclist
    template=/install/custom/tulgpu-0000-stateful-compute/ubuntu/ppc64el/compute.tmpl

the contents of the /etc/network/interfaces.d/eth2 is:

auto eth2
iface eth2 inet static
  address 9.2.132.212
  netmask 255.255.255.192
  network 9.2.132.192
mtu

Whatever is writing the /etc/network/interfaces.d/eth2 file is not something that the ifup script is happy with.

Discussion

  • ralph bellofatto

    Tracing this back, I see that the NICEXTRAPARMS value is blank in /xcatpost/mypostscript

    NICNODE='tulgpu002'
    export NICNODE
    NICIPS='eth2!9.2.132.212,bmc!tulgpu-bmc002,eth0!10.0.0.7'
    export NICIPS
    NICHOSTNAMESUFFIXES='eth0!-eth0,eth2!-eth2'
    export NICHOSTNAMESUFFIXES
    NICTYPES='eth0!Ethernet,eth2!Ethernet'
    export NICTYPES
    NICCUSTOMSCRIPTS=''
    export NICCUSTOMSCRIPTS
    NICNETWORKS='eth0!provision,eth2!public'
    export NICNETWORKS
    NICEXTRAPARAMS=''
    export NICEXTRAPARAMS
    

    this causes the function get_

    function get_nic_extra_params() {
        nic=$1
        if [ ! "$NICEXTRAPARAMS" ];then
            return
        fi
    

    the code that sets the mtu field expected this code to be executed:

    if [[ -z "${array_nic_mtu[$j]}" ]]; then
       array_nic_mtu[$j]=$str_default_token
    fi
    

    but when the configipv4 gets called this value is not set to str_default_token, instead it is blank and the mtu value is correspondingly blank:

        elif [ "$str_os_type" = "debian" ];then
            str_conf_file="/etc/network/interfaces.d/${str_if_name}"
            if [ $num_v4num -eq 0 ];then
                echo "auto ${str_if_name}" > $str_conf_file
                echo "iface ${str_if_name} inet static" >> $str_conf_file
            else
                echo "auto ${str_if_name}:${num_v4num}" >> $str_conf_file
                echo "iface ${str_if_name}:${num_v4num} inet static" >> $str_conf_file
            fi
            echo "  address ${str_v4ip}" >> $str_conf_file
            echo "  netmask ${str_v4mask}" >> $str_conf_file
            echo "  network ${str_v4net}" >> $str_conf_file
            if [ "$str_mtu" != "$str_default_token" ]; then
                echo " mtu  ${str_mtu}" >> $str_conf_file
            fi
            if [[ ${str_if_name} == [a-zA-Z0-9]*.[0-9]* ]]; then
                parent_device=`echo ${str_if_name} | sed -e 's/\([a-zA-Z0-9]*\)\.[0-9]*/\1/g'`
                echo "  vlan-raw-device ${parent_device}" >> $str_conf_file
            fi
    
     
  • ralph bellofatto

    I changed /install/postscripts/configeth lines 127-129 from:

            if [ "$str_mtu" != "$str_default_token" ]; then
                echo " mtu  ${str_mtu}" >> $str_conf_file
            fi
    

    to

            if [ -n "$str_mtu" ] &&  [ "$str_mtu" != "$str_default_token" ] ; then
                echo " mtu  ${str_mtu}" >> $str_conf_file
            fi
    

    and now it works correctly.

    I suspect the other OS branches in this script would need to likewise be changed. Or the parsing of the NICEXTRAPARMS can be changed to account for it being blank.

    Please incorporate an appropriate fix into the next xcat update.

     
  • Guang Cheng Li

    Guang Cheng Li - 2015-01-28
    • assigned_to: Ling
     
  • Guang Cheng Li

    Guang Cheng Li - 2015-01-28

    Ling, could you work on this bug? Thanks.

     
  • Ling

    Ling - 2015-02-06
    • status: open --> pending
     
  • Ling

    Ling - 2015-02-06

    Fixed.
    2.9 1638b793221d861581eb14595cd69d15be25555a
    2.10 edbe36c98ded95758bb786594ecbd9fdcd509a39

     
MongoDB Logo MongoDB