Menu

#4242 In physical rhel7 env,set installnic=ethx can not provision compute node.

2.8.5
closed
yangsong
RHEL7
8
2014-09-03
2014-08-04
Degao Chu
No

In physical rhels7 power8 env. If set installnic=ethx,provision compute node will fail. If change to installnic=enp96s0fx or installnic=mac,it will success.

Investigated by Song Yang,this is because the new naming schemes for network interfaces in rhels7.

As pcm now use nstallnic=ethx, we hope xcat can support it as before.

Discussion

  • yangsong

    yangsong - 2014-08-05
    • assigned_to: yangsong
     
  • yangsong

    yangsong - 2014-08-09
    • status: open --> pending
     
  • yangsong

    yangsong - 2014-08-09

    To prevent consistent network device renaming:

    1. add "net.ifnames=0" to the addkcmdline node attribute by
      chdef <node> addkcmdline="net.ifnames=0"</node>

    2. add disableconsistentNICrename to the postscript of the node by
      chdef <node> -p postscript=disableconsistentNICrename </node>

    3. nodeset...

    The steps above will be added to the documentation

    fixed in 2.8.5:
    commit 8ee690c6a17cf82918a6ead72805a9d76e975bb7
    Author: immarvin yangsbj@cn.ibm.com
    Date: Sat Aug 9 02:20:50 2014 -0700

    #4242 In physical rhel7 env,set installnic=ethx can not provision compute node.
    

    fixed in 2.9:
    commit 2c196c5b63d8d97a84af8ffc58fca85aeca8d696
    Author: immarvin yangsbj@cn.ibm.com
    Date: Sat Aug 9 02:20:50 2014 -0700

    #4242 In physical rhel7 env,set installnic=ethx can not provision compute node.
    
     
  • Degao Chu

    Degao Chu - 2014-08-20

    In PCM side, there's some limitation. PCM now just can support one postscript for imageprofile. We can not set the only script as disableconsistentNICrename by default.

    Try to bind this script to a group which is for rhel7 imageprofile. But we alreay has one group "__Managed" in postscripts table for all PCM nodes. xCAT can not support more than one group for a node in postscripts relation. Also,there will be user created imageprofile for rhel7.x in furture.

    So we hope the script disableconsistentNICrename can be a generic scripts to be binded to any node. If the node is rhel7 ,it will disable the nic name persistence,otherwise it will do nothing. Thus we can bind the script to "__Managed" or "xcatdefaults" group.

     
    • yangsong

      yangsong - 2014-08-21

      The script "disableconsistentNICrename " will be appended to mypostscript on the node when the node os is "rhels7" and "net.ifnames=0" is specified in kcmdline/addkcmdline of node/osimage definition.

      checked in 2.8.5:
      commit b7ce4802a1f7e60a5351dd1b5cd77cdfbd483c77
      Author: immarvin yangsbj@cn.ibm.com
      Date: Wed Aug 20 23:26:17 2014 -0700

      fulfill the requirement of defect #4242 In physical rhel7 env,set installnic=ethx can not provision compute node.
      

      diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm
      index 4a96e92..15a5694 100644
      --- a/xCAT-server/lib/perl/xCAT/Postage.pm
      +++ b/xCAT-server/lib/perl/xCAT/Postage.pm
      @@ -1867,6 +1867,38 @@ sub getPostScripts
      }

      • for redhat 7, append "disableconsistentNICrename" to default postscripts

      • if "net.ifnames=0" is specified in kcmdline/addkcmdline of node or osimage

      • my $tftpdir = xCAT::TableUtils::getTftpDir();
      • my $osimagetab=xCAT::Table->new('osimage',-create=>1);
      • my $osimgent = $osimagetab->getAttribs({imagename => $osimgname },'osvers');
      • my $os = $osimgent->{'osvers'};
      • my $nrret = $::GLOBAL_TAB_HASH{noderes}{$node};
      • my $netboot = $nrret->{'netboot'};
        +
      • if( ($os =~ "rhel7") || ($os =~ "rhels7") )
      • {
      • my $nodecfg;
      • if($netboot eq "grub2")
      • {
      • $nodecfg="$tftpdir/boot/grub2/$node";
      • }elsif($netboot eq "xnba")
      • {
      • $nodecfg="$tftpdir/xcat/xnba/nodes/$node";
        +
      • }elsif($netboot eq "pxe")
      • {
      • $nodecfg="$tftpdir/pxelinux.cfg/$node";
        +
      • }
        +
      • my $rc=system("grep net.ifnames=0 $nodecfg >/dev/null 2>&1");
      • if($rc ==0)
      • {
      • $result .= "disableconsistentNICrename\n";
      • }
      • }
        +
        return $result;
        }

      checked in 2.9:
      commit 33fd485628a1d0b0582f5890cbacfbcc902148a4
      Author: immarvin yangsbj@cn.ibm.com
      Date: Wed Aug 20 23:26:17 2014 -0700

      fulfill the requirement of defect #4242 In physical rhel7 env,set installnic=ethx can not provision compute node.
      
       
  • Guang Cheng Li

    Guang Cheng Li - 2014-09-03

    I know that De Gao has verified the problem, closing this bug.

     
  • Guang Cheng Li

    Guang Cheng Li - 2014-09-03
    • status: pending --> closed
     
MongoDB Logo MongoDB