new rollupdate support working with LoadLeveler
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2375 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
15924f3a9a
commit
26c6baf15f
@ -44,7 +44,7 @@ fi
|
||||
#
|
||||
# do an update from the trunk directory level
|
||||
#
|
||||
#svn update | tee $BLDTOP/coresvnup
|
||||
svn update | tee $BLDTOP/coresvnup
|
||||
#svn update
|
||||
|
||||
# create a simple install script
|
||||
|
@ -9,7 +9,7 @@ use xCAT::Utils;
|
||||
=head1 xCAT::Usage
|
||||
=head2 Package Description
|
||||
xCAT usage module. Some commands such as rpower have different implementations
|
||||
for different hardware. This module holds the usage usage string for these kind
|
||||
for different hardware. This module holds the usage string for these kind
|
||||
of commands so that the usage can be referenced from different modules.
|
||||
=cut
|
||||
#-------------------------------------------------------------------------------
|
||||
@ -187,8 +187,7 @@ sub parseCommand {
|
||||
|
||||
#print "command=$command, args=@exargs, ARGV=@ARGV\n";
|
||||
|
||||
$Getopt::Long::ignorecase=0;
|
||||
$Getopt::Long::pass_through=1;
|
||||
Getopt::Long::Configure('pass_through','no_ignore_case');
|
||||
|
||||
# parse the options
|
||||
if(!GetOptions(
|
||||
|
@ -797,9 +797,11 @@ sub runcmd
|
||||
Arguments:
|
||||
command - string with following format:
|
||||
<xCAT cmd name> <comma-delimited nodelist> <cmd args>
|
||||
where the xCAT cmd name is as reqistered in the plugins
|
||||
where the xCAT cmd name is as reqistered in the plugins,
|
||||
the nodelist is already flattened and verified
|
||||
the remainder of the string is passed as args
|
||||
the remainder of the string is passed as args.
|
||||
The nodelist may be set to the string "NO_NODE_RANGE" to
|
||||
not pass in any nodes to the command.
|
||||
OR
|
||||
command - request hash
|
||||
|
||||
@ -834,6 +836,11 @@ sub runcmd
|
||||
If refoutput is true, then the output will be returned as a
|
||||
reference to an array for efficiency.
|
||||
|
||||
Do not use the scalar string input for xdsh unless you are running
|
||||
a simple single-word command. When building your request hash,
|
||||
the entire command string xdsh runs needs to be a single entry
|
||||
in the arg array.
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
@ -853,13 +860,20 @@ sub runxcmd
|
||||
my $req;
|
||||
if (ref($cmd) eq "HASH") {
|
||||
$req = $cmd;
|
||||
} else { # assume scalar
|
||||
my ($cmdname,$nodelist,$cmdargs) = split(" ",$cmd);
|
||||
my @nodes = split(",",$nodelist);
|
||||
chomp $cmdargs;
|
||||
$req={command=>[$cmdname],
|
||||
node=>\@nodes,
|
||||
arg=>[$cmdargs]};
|
||||
} else { # assume scalar, build request hash the way we do in xcatclient
|
||||
my @cmdargs=split(/\s+/,$cmd);
|
||||
my $cmdname = shift(@cmdargs);
|
||||
$req->{command}=[$cmdname];
|
||||
my $arg=shift(@cmdargs);
|
||||
while ($arg =~ /^-/) {
|
||||
push (@{$req->{arg}}, $arg);
|
||||
$arg=shift(@cmdargs);
|
||||
}
|
||||
if ($arg ne "NO_NODE_RANGE") {
|
||||
my @nodes = split(",",$arg);
|
||||
$req->{node}=\@nodes;
|
||||
}
|
||||
push (@{$req->{arg}}, @cmdargs);
|
||||
}
|
||||
$subreq->($req,\&runxcmd_output);
|
||||
$::CALLBACK = $save_CALLBACK; # in case the subreq call changed it
|
||||
@ -889,16 +903,20 @@ sub runxcmd
|
||||
my $rsp={};
|
||||
my $errmsg = join('', @$outref);
|
||||
chomp $errmsg;
|
||||
my $displaycmd=$cmd;
|
||||
if (ref($cmd) eq "HASH") {
|
||||
$displaycmd=$cmd->{command}->[0];
|
||||
}
|
||||
if ($::CALLBACK)
|
||||
{
|
||||
$rsp->{data}->[0] =
|
||||
"Command failed: $cmd. Error message: $errmsg.\n";
|
||||
"Command failed: $displaycmd. Error message: $errmsg.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
|
||||
}
|
||||
else
|
||||
{
|
||||
xCAT::MsgUtils->message("E",
|
||||
"Command failed: $cmd. Error message: $errmsg.\n");
|
||||
"Command failed: $displaycmd. Error message: $errmsg.\n");
|
||||
}
|
||||
$xCAT::Utils::errno = 29;
|
||||
}
|
||||
|
@ -143,6 +143,7 @@ ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/mondecfg
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/monadd
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/monrm
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/sinv
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/rollupdate
|
||||
ln -sf ../bin/xcatDBcmds $RPM_BUILD_ROOT/%{prefix}/bin/mkdsklsnode
|
||||
ln -sf ../bin/xcatDBcmds $RPM_BUILD_ROOT/%{prefix}/bin/rmdsklsnode
|
||||
ln -sf ../bin/xcatDBcmds $RPM_BUILD_ROOT/%{prefix}/bin/mknimimage
|
||||
|
@ -243,6 +243,11 @@ if ($inet6support) {
|
||||
}
|
||||
print $conn "#END OF SCRIPT\n";
|
||||
close($conn);
|
||||
} elsif ($text =~ /^rebootnodes/) {
|
||||
my @cmdargs = split(/\s+/,$text);
|
||||
my $rebootcmd = shift(@cmdargs);
|
||||
close($conn);
|
||||
plugin_command({command=>[$rebootcmd],arg=>\@cmdargs,_xcat_clienthost=>[$node]},undef,\&build_response);
|
||||
} elsif ($text =~ /^setiscsiparms/) {
|
||||
$text =~ s/^setiscsiparms\s+//;
|
||||
my $kname;
|
||||
|
Loading…
Reference in New Issue
Block a user