Menu

#4743 [fvt]2.10:after diskless provision could not log in compute node without passord

2.10
closed
yangsong
None
linux provisioning
5
2015-07-14
2015-07-13
junxiaw
No

1.download the latest build
2. nodeset computenode osimage=rhels6.5-x86_64-netboot-compute
rpower computenode boot

3.console computenode
ttyS0,115200n8r
initctl: Env must be KEY=VALUE pairs
xcatdsklspost: downloaded postscripts successfully
/xcatpost/xcatlib.sh: line 721: : Name or service not known
/xcatpost/xcatlib.sh: line 721: /dev/udp//514: Invalid argument

Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel 2.6.32-431.el6.x86_64 on an x86_64

4.on management node.
[root@c910f04x27v02 netboot]# tabdump nodelist

node,groups,status,statustime,appstatus,appstatustime,primarysn,hidden,updatestatus,updatestatustime,zonename,comments,disable

"c910f04x27v04","all","netbooting","07-13-2015 0:38:15",,,,,,,,,
------------------>always netbooting status.
5.on compute node .
no xcat.log under /var/log/xcat
6.
[root@c910f04x27v02 ~]# ssh 10.4.27.4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
16:8f:f8:44:0b:2f:85:0c:3b:72:2b:36:7b:9e:8f:c1.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:2
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
[root@c910f04x27v02 ~]#
-------------->could log in computenode

Discussion

  • junxiaw

    junxiaw - 2015-07-13
    • summary: [fvt]2.10:diskless provision could not log in without passord --> [fvt]2.10:after diskless provision could not log in compute node without passord
     
  • yangsong

    yangsong - 2015-07-13

    the fix is attached below:

    [root@c910f03c01p03 xcat-core]# git diff
    diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm
    index 65b2cdb..c23c994 100755
    --- a/xCAT-server/lib/xcat/plugins/debian.pm
    +++ b/xCAT-server/lib/xcat/plugins/debian.pm
    @@ -1401,6 +1401,21 @@ sub mknetboot
             if(($nodestatus eq "n") or ($nodestatus eq "N") or ($nodestatus eq "0")){
                 $kcmdline .= " nonodestatus ";
             }
    +
    +
    +        if($::XCATSITEVALS{xcatdebugmode} eq "1"){
    +
    +           my ($host, $ipaddr) = xCAT::NetworkUtils->gethostnameandip($xcatmaster);
    +           if($ipaddr){
    +              $kcmdline .=" LOGSERVER=$ipaddr ";
    +           }else{
    +              $kcmdline .=" LOGSERVER=$xcatmaster ";
    +           }
    +
    +           $kcmdline .= " xcatdebugmode=1 ";
    +        }
    +
    +
             # add one parameter: ifname=<eth0>:<mac address>
             # which is used for dracut
             # the redhat5.x os will ignore it
    diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm
    index ec35796..9cb5d6a 100755
    --- a/xCAT-server/lib/xcat/plugins/sles.pm
    +++ b/xCAT-server/lib/xcat/plugins/sles.pm
    @@ -576,6 +576,20 @@ sub mknetboot
                $kcmdline .= " nonodestatus ";
             }
    
    +
    +        if($::XCATSITEVALS{xcatdebugmode} eq "1"){
    +
    +           my ($host, $ipaddr) = xCAT::NetworkUtils->gethostnameandip($xcatmaster);
    +           if($ipaddr){
    +              $kcmdline .=" LOGSERVER=$ipaddr ";
    +           }else{
    +              $kcmdline .=" LOGSERVER=$xcatmaster ";
    +           }
    +
    +           $kcmdline .= " xcatdebugmode=1 ";
    +        }
    +
    +
             $kcmdline .= "NODE=$node ";
             # add flow control setting
             $kcmdline .= "FC=$useflowcontrol ";
    diff --git a/xCAT-server/share/xcat/install/scripts/scriptlib b/xCAT-server/share/xcat/install/scripts/scriptlib
    index f8de117..a9cca78 100644
    --- a/xCAT-server/share/xcat/install/scripts/scriptlib
    +++ b/xCAT-server/share/xcat/install/scripts/scriptlib
    @@ -8,7 +8,7 @@ declare -F msgutil_r &>/dev/null  || function msgutil_r {
           msgtype="debug"
        fi
    
    -   if [ -n "logserver" ];then
    +   if [ -n "$logserver" ];then
           logger -n $logserver -t xcat -p local4.$msgtype "$msgstr" 
           if [ "$?" != "0" ];then
              exec 3<>/dev/udp/$logserver/514 >/dev/null 2>&1;logger -s -t xcat -p local4.$msgtype "$msgstr" 1>&3  2
    diff --git a/xCAT/postscripts/xcatlib.sh b/xCAT/postscripts/xcatlib.sh
    index 00cc88d..06069d9 100755
    --- a/xCAT/postscripts/xcatlib.sh
    +++ b/xCAT/postscripts/xcatlib.sh
    @@ -715,7 +715,7 @@ function msgutil_r {
        fi
    
    
    -   if [ -n "logserver" ];then
    +   if [ -n "$logserver" ];then
           logger -n $logserver -t xcat -p local4.$msgtype "$msgstr" >/dev/null 2>&1
           if [ "$?" != "0" ];then
              exec 3<>/dev/udp/$logserver/514 >/dev/null 2>&1;logger -s -t xcat -p local4.$msgtype "$msgstr" 1>&3  2
    (END)
    

    will be checked in after review

     
  • yangsong

    yangsong - 2015-07-13
     
  • Guang Cheng Li

    Guang Cheng Li - 2015-07-13

    Reviewed in the team meeting, the team agrees to fix this bug in 2.10.

     
  • yangsong

    yangsong - 2015-07-13
    • status: open --> pending
     
  • yangsong

    yangsong - 2015-07-13

    fixed in 2.10:
    commit dcbc16a5ab45ec6dec7bcc529419ad28ef5c69f3
    Author: immarvin yangsbj@cn.ibm.com
    Date: Mon Jul 13 04:39:12 2015 -0400

    fix defect #4743 [fvt]2.10:after diskless provision could not log in compute node without passord
    
     
  • junxiaw

    junxiaw - 2015-07-14
    • status: pending --> closed