mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 09:13:08 +00:00
add a site attribute xcatdebugmode as a switch the xcat debug mode
This commit is contained in:
parent
5e6a982b4c
commit
6ff268934c
@ -1118,6 +1118,8 @@ site => {
|
||||
" 'all' means that the management as well as the service nodes\n".
|
||||
" are all using a common shared filesystem. The default is 'no'.\n".
|
||||
" xcatconfdir: Where xCAT config data is (default /etc/xcat).\n\n".
|
||||
" xcatdebugmode: the value of xcat debug mode. Currently supported values: \n".
|
||||
" 0: off(default); 1: on \n\n".
|
||||
" --------------------\n".
|
||||
"REMOTESHELL ATTRIBUTES\n".
|
||||
" --------------------\n".
|
||||
|
@ -336,7 +336,11 @@ sub subvars {
|
||||
$inc =~ s/#SHORTNAME#/$shortname/g;
|
||||
$inc =~ s/#GETNODEDOMAIN:([^#]+)#/get_node_domain($1)/eg;
|
||||
$inc =~ s/#GETPRINICMAC:([^#]+)#/xCAT::Utils::parseMacTabEntry(tabdb("mac",$1,"mac"),$1)/eg;
|
||||
|
||||
|
||||
if($::XCATSITEVALS{xcatdebugmode} eq "1"){
|
||||
$inc =~ s/#UNCOMMENONXCATDEBUGMODE#/ /g;
|
||||
}
|
||||
|
||||
my $nrtab = xCAT::Table->new("noderes");
|
||||
my $tftpserver = $nrtab->getNodeAttribs($node, ['tftpserver']);
|
||||
my $sles_sdk_media = "http://" . $tftpserver->{tftpserver} . $media_dir . "/sdk1";
|
||||
|
@ -1479,7 +1479,32 @@ sub mkinstall
|
||||
$kcmdline .= " $net_params->{ip} ";
|
||||
}
|
||||
}
|
||||
|
||||
if($::XCATSITEVALS{xcatdebugmode} eq "1"){
|
||||
|
||||
unless($instserver eq '!myipfn!'){
|
||||
my($host,$ip)=xCAT::NetworkUtils->gethostnameandip($instserver);
|
||||
$instserver=$ip;
|
||||
}
|
||||
|
||||
if (xCAT::Utils->version_cmp($kversion,"7.0") >= 0){
|
||||
#enable ssh access during installation
|
||||
$kcmdline .= " inst.sshd";
|
||||
|
||||
#set minimum level of messages to be logged on the console
|
||||
#to be "debug"
|
||||
$kcmdline .=" inst.loglevel=debug";
|
||||
|
||||
#all the logs during installation will be forwarded to xcatmster
|
||||
$kcmdline .=" inst.syslog=$instserver";
|
||||
}else{
|
||||
$kcmdline .= " sshd=1";
|
||||
$kcmdline .=" syslog=$instserver";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#TODO: dd=<url> for driver disks
|
||||
if (defined($sent->{serialport}))
|
||||
{
|
||||
|
@ -1196,7 +1196,18 @@ sub mkinstall
|
||||
}
|
||||
|
||||
|
||||
if($::XCATSITEVALS{xcatdebugmode} eq "1"){
|
||||
|
||||
unless($netserver eq '!myipfn!'){
|
||||
my($host,$ip)=xCAT::NetworkUtils->gethostnameandip($netserver);
|
||||
$netserver=$ip;
|
||||
}
|
||||
|
||||
#enable ssh access during installation,the password is set to "cluster"
|
||||
$kcmdline .=" UseSSH=1 SSHPassword=cluster";
|
||||
|
||||
$kcmdline .=" Loghost=$netserver";
|
||||
}
|
||||
|
||||
|
||||
if (defined $sent->{serialport})
|
||||
|
@ -138,13 +138,13 @@ try:
|
||||
line = "installing prep"
|
||||
newSocket.send(line)
|
||||
break
|
||||
# if(command[0] == "sh"): #DEBUG purposes only, wide open root priv command here.
|
||||
# newcommand = ""
|
||||
# for i in command[1:]:
|
||||
# newcommand = newcommand + i + " "
|
||||
# output = os.popen(newcommand).read()
|
||||
# newSocket.send(output)
|
||||
# break
|
||||
#UNCOMMENONXCATDEBUGMODE# if(command[0] == "sh"): #DEBUG purposes only, wide open root priv command here.
|
||||
#UNCOMMENONXCATDEBUGMODE# newcommand = ""
|
||||
#UNCOMMENONXCATDEBUGMODE# for i in command[1:]:
|
||||
#UNCOMMENONXCATDEBUGMODE# newcommand = newcommand + i + " "
|
||||
#UNCOMMENONXCATDEBUGMODE# output = os.popen(newcommand).read()
|
||||
#UNCOMMENONXCATDEBUGMODE# newSocket.send(output)
|
||||
#UNCOMMENONXCATDEBUGMODE# break
|
||||
if(command[0] == "screendump"):
|
||||
newcommand = "cat /dev/vcs"
|
||||
for i in command[1:]:
|
||||
|
@ -102,13 +102,13 @@ try:
|
||||
line = "installing prep"
|
||||
newSocket.send(line)
|
||||
break
|
||||
# if(command[0] == "sh"): #DEBUG purposes only, wide open root priv command here.
|
||||
# newcommand = ""
|
||||
# for i in command[1:]:
|
||||
# newcommand = newcommand + i + " "
|
||||
# output = os.popen(newcommand).read()
|
||||
# newSocket.send(output)
|
||||
# break
|
||||
#UNCOMMENONXCATDEBUGMODE# if(command[0] == "sh"): #DEBUG purposes only, wide open root priv command here.
|
||||
#UNCOMMENONXCATDEBUGMODE# newcommand = ""
|
||||
#UNCOMMENONXCATDEBUGMODE# for i in command[1:]:
|
||||
#UNCOMMENONXCATDEBUGMODE# newcommand = newcommand + i + " "
|
||||
#UNCOMMENONXCATDEBUGMODE# output = os.popen(newcommand).read()
|
||||
#UNCOMMENONXCATDEBUGMODE# newSocket.send(output)
|
||||
#UNCOMMENONXCATDEBUGMODE# break
|
||||
if(command[0] == "screendump"):
|
||||
newcommand = "cat /dev/vcs"
|
||||
for i in command[1:]:
|
||||
|
@ -50,14 +50,14 @@ BEGIN {
|
||||
while(1) {
|
||||
ns |& getline
|
||||
|
||||
# if(\$1 == "sh") { #TODO: ENABLE IF DEBUG
|
||||
# sub(/^sh +/,"",\$0)
|
||||
# output = \$0
|
||||
# while((output | getline) > 0)
|
||||
# print \$0 |& ns
|
||||
# print "EOO" |& ns
|
||||
# close(output)
|
||||
# }
|
||||
#UNCOMMENONXCATDEBUGMODE# if(\$1 == "sh") { #TODO: ENABLE IF DEBUG
|
||||
#UNCOMMENONXCATDEBUGMODE# sub(/^sh +/,"",\$0)
|
||||
#UNCOMMENONXCATDEBUGMODE# output = \$0
|
||||
#UNCOMMENONXCATDEBUGMODE# while((output | getline) > 0)
|
||||
#UNCOMMENONXCATDEBUGMODE# print \$0 |& ns
|
||||
#UNCOMMENONXCATDEBUGMODE# print "EOO" |& ns
|
||||
#UNCOMMENONXCATDEBUGMODE# close(output)
|
||||
#UNCOMMENONXCATDEBUGMODE# }
|
||||
|
||||
if(\$1 == "screendump") {
|
||||
output = "chvt " \$2 ";cat /dev/vcs"
|
||||
|
@ -90,11 +90,11 @@ fi
|
||||
read cmd arg remainder
|
||||
|
||||
case "\$cmd" in
|
||||
# "sh") #TODO: ENABLE IF DEBUG
|
||||
# output=\$(eval \$arg \$remainder)
|
||||
# echo "\$output"
|
||||
# echo "EOO"
|
||||
# ;;
|
||||
#UNCOMMENONXCATDEBUGMODE# "sh") #TODO: ENABLE IF DEBUG
|
||||
#UNCOMMENONXCATDEBUGMODE# output=\$(eval \$arg \$remainder)
|
||||
#UNCOMMENONXCATDEBUGMODE# echo "\$output"
|
||||
#UNCOMMENONXCATDEBUGMODE# echo "EOO"
|
||||
#UNCOMMENONXCATDEBUGMODE# ;;
|
||||
|
||||
"screendump")
|
||||
output=\$(eval chvt \$arg; cat /dev/vcs)
|
||||
|
@ -90,11 +90,11 @@ fi
|
||||
read cmd arg remainder
|
||||
|
||||
case "\$cmd" in
|
||||
# "sh") #TODO: ENABLE IF DEBUG
|
||||
# output=\$(eval \$arg \$remainder)
|
||||
# echo "\$output"
|
||||
# echo "EOO"
|
||||
# ;;
|
||||
#UNCOMMENONXCATDEBUGMODE# "sh") #TODO: ENABLE IF DEBUG
|
||||
#UNCOMMENONXCATDEBUGMODE# output=\$(eval \$arg \$remainder)
|
||||
#UNCOMMENONXCATDEBUGMODE# echo "\$output"
|
||||
#UNCOMMENONXCATDEBUGMODE# echo "EOO"
|
||||
#UNCOMMENONXCATDEBUGMODE# ;;
|
||||
|
||||
"screendump")
|
||||
output=\$(eval chvt \$arg; cat /dev/vcs)
|
||||
|
@ -7,6 +7,18 @@ d-i localechooser/supported-locales multiselect en_US.UTF-8
|
||||
d-i console-setup/ask_detect boolean false
|
||||
d-i keyboard-configuration/layoutcode string en
|
||||
|
||||
|
||||
|
||||
# Use the following settings if you wish to make use of the network-console
|
||||
# component for remote installation over SSH. This only makes sense if you
|
||||
# intend to perform the remainder of the installation manually.
|
||||
#UNCOMMENONXCATDEBUGMODE# d-i anna/choose_modules string network-console
|
||||
#d-i network-console/authorized_keys_url string http://10.0.0.1/openssh-key
|
||||
#UNCOMMENONXCATDEBUGMODE# d-i network-console/password password cluster
|
||||
#UNCOMMENONXCATDEBUGMODE# d-i network-console/password-again password cluster
|
||||
|
||||
|
||||
|
||||
### Network Configuration
|
||||
|
||||
d-i netcfg/get_hostname string unassigned-hostname
|
||||
|
Loading…
x
Reference in New Issue
Block a user