Menu

#3778 A code problem in Utils::noderangecontainsMn

2.8.3
closed
general
5
2014-04-01
2013-09-11
No

This problem was found in some customer site, when the MN is defined as a compute node in the PCM environment, if the MN hostname is a substring of the compute nodes, the xdsh -K and updatenode -k will complain "You must not run -K option against the Management Node:rhcn" and exit with error.

[root@ls21n01 rh]# mkdef rhcn groups=__mgmtnode
1 object definitions have been created or modified.
[root@ls21n01 rh]# xdsh rhcn3 -K
Enter the password for the userid: root on the node where the ssh keys
will be updated:

Error: You must not run -K option against the Management Node:rhcn.
[root@ls21n01 rh]#
[root@ls21n01 rh]# updatenode rhcn3 -k
Enter the password for the userid: root on the node where the ssh keys
will be updated:

Error: You must not run -k option against the Management Node:rhcn.
[root@ls21n01 rh]#

The problem was caused by a wrong grep in Utils::noderangecontainsMn, line 3200 has problem.

[root@ls21n01 rh]# vi /opt/xcat/lib/perl/xCAT/Utils.pm
...
3199 if ($mname) { # if Management Node defined in the database
3200 if (grep(/$mname/, @noderange)) { # if MN in the noderange
3201 return $mname;
3202 } else {
3203 return ;
3204 }
3205 }
3206 }

Discussion

  • Lissa Valletta

    Lissa Valletta - 2013-09-11

    Got it will fix

     
  • Lissa Valletta

    Lissa Valletta - 2013-09-11

    2.8.3
    commit 817f8ce41140ac0460eadd93558583e8b338b1ff
    2.9
    commit de087c0f9df47638d257f88508958560ca2f8a2d
    2.8.2-pcm
    commit 04c19abeb621d508d973410cef8d36299a4e2f55

     
  • Lissa Valletta

    Lissa Valletta - 2013-09-11
    • status: open --> pending
     
  • Lissa Valletta

    Lissa Valletta - 2014-04-01
    • status: pending --> closed
    • component: --> general
     
MongoDB Logo MongoDB