Menu

#3541 add nichostnameprefix to nics table

2.8.4
test
general
5
2014-04-01
2013-04-27
Arif Ali
No

Hi team,

I have just seen the new doc wrt otherinterfaces to be deprecated, and a lot of our customers we prefix with the net name typically similar to below

ibnode001
bmcnode001
etc...

So would like the ability to prefix rather than suffix the normal hostname.

But I like the idea though overall

Discussion

1 2 > >> (Page 1 of 2)
  • Bruce

    Bruce - 2013-04-29
    • assigned_to: Norm Nott
     
  • Bruce

    Bruce - 2013-04-29

    Norm, let's talk about this

     
  • Bruce

    Bruce - 2013-04-29
    • Milestones: 2.8.1 --> 2.8.2
     
  • Norm Nott

    Norm Nott - 2013-06-26
    • Milestones: 2.8.2 --> 2.9
     
  • Norm Nott

    Norm Nott - 2013-06-26

    Ran out of time for 2.8.2

    Also - this would be new support and we should schedule FVT.

     
  • Norm Nott

    Norm Nott - 2014-01-09
    • assigned_to: Norm Nott --> Guang Cheng Li
     
  • Norm Nott

    Norm Nott - 2014-01-09

    old request - I won't have time to get to it at this point - not sure it is needed?

     
  • Arif Ali

    Arif Ali - 2014-01-09

    Yeah, an old request, that I am still keen on.

    If you guys don't have the resources, I will try to spend time to see if I can implement it myself, and forward on the patches

    As for a lot of my customers we have a prefix rather than suffix

     
  • Lissa Valletta

    Lissa Valletta - 2014-01-10

    Thanks we will review and checkin

     
  • Lissa Valletta

    Lissa Valletta - 2014-01-10

    Looking at your change. I think you also need to add the new nichostnameprefixes attribute to the defspec section of the Schema.pm file for the *def comands to work.

    nics table

        {attr_name => 'nicips',
                tabentry => 'nics.nicips',
                access_tabentry => 'nics.node=attr:node',
        },
        {attr_name => 'nichostnamesuffixes',
                tabentry => 'nics.nichostnamesuffixes',
                access_tabentry => 'nics.node=attr:node',
        },
       {attr_name => 'nichostnameprefixes',
                tabentry => 'nics.nichostnameprefixes',
                access_tabentry => 'nics.node=attr:node',
        },
        {attr_name => 'nictypes',
                tabentry => 'nics.nictypes',
                access_tabentry => 'nics.node=attr:node',
        },
        {attr_name => 'niccustomscripts',
                tabentry => 'nics.niccustomscripts',
                access_tabentry => 'nics.node=attr:node',
        },
        {attr_name => 'nicnetworks',
                tabentry => 'nics.nicnetworks',
                access_tabentry => 'nics.node=attr:node',
        },
      {attr_name => 'nicaliases',
            tabentry => 'nics.nicaliases',
            access_tabentry => 'nics.node=attr:node',
      },
    
     
  • Lissa Valletta

    Lissa Valletta - 2014-01-10

    Arif with this update, go ahead and check the code into the 2.9 ( master) git stream. I will add the testing to out 2.9 schedules.

     
  • Lissa Valletta

    Lissa Valletta - 2014-01-10
    • assigned_to: Guang Cheng Li --> Lissa Valletta
     
  • Arif Ali

    Arif Ali - 2014-01-10

    As requested, I have also added nodeprefix to @nodeattrs, but there is no mention of any of the nics for suffix in defspec, so I presume, both the suffix and prefix need to be added to defspec?

    checked-in into master, commit dd3f08

     
  • Lissa Valletta

    Lissa Valletta - 2014-01-10

    yes they both should be in there.

     
  • Lissa Valletta

    Lissa Valletta - 2014-01-10
    • labels: --> Deployment-linux
    • status: open --> pending
     
  • Arif Ali

    Arif Ali - 2014-01-10

    right, I will get those added and tested

     
  • Arif Ali

    Arif Ali - 2014-01-10

    defspec has it, but lsdef doesn't show them,

    should they?

     
  • Lissa Valletta

    Lissa Valletta - 2014-01-13

    yes it should but I see my entry looks like below.
    We must be dealing with some special code in the lsdef to output more than just what is in the attribute . Will search for it.

    nichostnamesuffixes.eth1=-eth1|-eth1:1
    nicips.eth0=172.20.101.2
    nicips.ib0=168.1.0.2
    nicips.ib1=168.2.0.2
    nicnetworks.eth1=60_0_0_0-255_255_255_0|60_0_0_0-255_255_255_0
    nictypes.eth1=ethernet|ethernet

     
  • Lissa Valletta

    Lissa Valletta - 2014-01-13

    I found one minor problem in DBobjectdefs.pm and one big one

    But the big problem is the use of DBobjUtils->expandnicsattr to create the output for lsdef. It expects the format of the nichostnamesuffix in DBobjectdefs.pm. In each of the places it is called we are going to have to write a new routine that will format the nichostnameprefix output and check which attribute we are processing.
    Would you do that. I checkin my small fix

     
  • Lissa Valletta

    Lissa Valletta - 2014-01-13
    • status: pending --> open
     
  • Arif Ali

    Arif Ali - 2014-01-13

    Thanks Lissa for looking,

    I have looked through, and can't see anything wrong. What is the wrong output you would get, and what is the expected output. (I don't know the code as well as you guys). Below are some output from some of the commands, and all seems to be working, after installing the latest snapshot

    [root@mg01 xCAT_plugin]# lsdef  -c -t node -i nicips,nichostnamesuffixes,nichostnameprefixes,nictypes,nicnetworks node001
    node001: nichostnameprefixes.ib0=ib
    node001: nicips.ib0=10.0.2.1
    node001: nicnetworks.ib0=ib
    node001: nictypes.ib0=infiniband
    [root@mg01 xCAT_plugin]# makehosts -n
    [root@mg01 xCAT_plugin]# cat /etc/hosts | grep node001
    10.0.0.1 node001 node001.cluster 
    10.0.1.1 bmcnode001 bmcnode001.cluster 
    10.0.2.1 ibnode001 ibnode001.cluster
    

    On another note, I was having issues with makehosts -a, where it was adding another entry in \etc\hosts due to the fact the domain variable had an extra space; revert a problem I created in a previous commit. The following fixes both problems.

    https://gitlab.arif-ali.co.uk/arif/xcat-core/commit/4f2bce8c28ef76d26346f7f56415661fab987ff3

     

    Last edit: Arif Ali 2014-01-13
  • Lissa Valletta

    Lissa Valletta - 2014-01-16

    nichostnameprefixes should show up when you run lsdef <nodename>. It does not; although nichostnamesuffixes does. That is because of that formatting routine. If you don't care we can fix it later and I will leave the defect open.
    tabdump nics

    node,nicips,nichostnamesuffixes,nichostnameprefixes,nictypes,niccustomscripts,nicnetworks,nicaliases,comments,disable

    "cn14",,"eth1!-eth1|-eth1:1","ib",,,,,,

    Object name: cn14
    arch=ppc64
    cons=hmc
    currstate=netboot rhels6.4-ppc64-compute
    groups=lpar,all
    hcp=c76v2hmc01
    hwtype=lpar
    id=34
    initrd=xcat/osimage/rhels6.4-ppc64-netboot-compute/initrd-stateless.gz
    installnic=mac
    kcmdline=imgurl=http://!myipfn!:80//install/netboot/rhels6.4/ppc64/compute/rootimg.gz XCAT=!myipfn!:3001 NODE=cn14 FC=0 BOOTIF=e6:ef:63:d5:f0:02
    kernel=xcat/osimage/rhels6.4-ppc64-netboot-compute/kernel
    mac=e6:ef:63:d5:f0:02
    mgt=hmc
    netboot=yaboot
    nichostnamesuffixes.eth1=-eth1|-eth1:1
    nodetype=ppc,osi
    os=rhels6.4
    parent=Server-9125-F2A-SN027ACB4
    postbootscripts=otherpkgs
    postscripts=syslog,remoteshell,syncfiles
    pprofile=compute
    primarynic=mac
    profile=compute
    provmethod=rhels6.4-ppc64-netboot-compute
    status=booted
    statustime=07-31-2013 08:21:27
    updatestatus=failed
    updatestatustime=08-13-2013 12:29:16

     
  • Lissa Valletta

    Lissa Valletta - 2014-01-16

    Could you please take the makehosts fix and open another defect and attach it. I need the defect to track what we do. I will review it and then if ok you can checkin. We appreciate the help.

     

    Last edit: Lissa Valletta 2014-01-16
  • Arif Ali

    Arif Ali - 2014-01-16

    OK, I see the problem now, I will have a look tomorrow, and will get the other defect open as well

     
1 2 > >> (Page 1 of 2)