mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-09-29 13:38:12 +00:00
Merge pull request #2537 from xcat2/master
merge master to 2.13 branch for 2.13.2 release(2)
This commit is contained in:
@@ -495,5 +495,41 @@ __EOF__
|
||||
chgrp root $dep_tar_name
|
||||
chmod g+w $dep_tar_name
|
||||
|
||||
|
||||
USER="xcat"
|
||||
SERVER="xcat.org"
|
||||
FILES_PATH="files"
|
||||
FRS="/var/www/${SERVER}/${FILES_PATH}"
|
||||
APT_DIR="${FRS}/xcat"
|
||||
APT_REPO_DIR="${APT_DIR}/repos/apt"
|
||||
|
||||
# Decide whether to upload the xcat-dep package or NOT (default is to NOT upload xcat-dep
|
||||
if [ "$UP" != "1" ]; then
|
||||
echo "Upload not specified, Done! (rerun with UP=1, to upload)"
|
||||
cd $old_pwd
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#upload the dep packages
|
||||
i=0
|
||||
echo "Uploading debs from xcat-dep to ${APT_REPO_DIR}/xcat-dep/ ..."
|
||||
while [ $((i+=1)) -le 5 ] && ! rsync -urLv --delete xcat-dep $USER@${SERVER}:${APT_REPO_DIR}/
|
||||
do : ; done
|
||||
|
||||
#upload the tarball
|
||||
i=0
|
||||
echo "Uploading $dep_tar_name to ${APT_DIR}/xcat-dep/2.x_Ubuntu/ ..."
|
||||
while [ $((i+=1)) -le 5 ] && ! rsync -v --force $dep_tar_name $USER@${SERVER}:${APT_DIR}/xcat-dep/2.x_Ubuntu/
|
||||
do : ; done
|
||||
|
||||
#upload the README file
|
||||
cd debs
|
||||
i=0
|
||||
echo "Uploading README to ${APT_DIR}/xcat-dep/2.x_Ubuntu/ ..."
|
||||
while [ $((i+=1)) -le 5 ] && ! rsync -v --force README $USER@${SERVER}:${APT_DIR}/xcat-dep/2.x_Ubuntu/
|
||||
do : ; done
|
||||
|
||||
fi
|
||||
|
||||
cd $old_pwd
|
||||
exit 0
|
||||
|
@@ -1471,7 +1471,7 @@ sub nodeonmynet
|
||||
my $nettab = xCAT::Table->new("networks");
|
||||
my @vnets = $nettab->getAllAttribs('net', 'mgtifname', 'mask');
|
||||
foreach (@vnets) {
|
||||
if ((defined $_->{mgtifname}) && ($_->{mgtifname} eq '!remote!'))
|
||||
if ((defined $_->{mgtifname}) && ($_->{mgtifname} =~ /!remote!/))
|
||||
{
|
||||
if (xCAT::NetworkUtils->ishostinsubnet($nodeip, $_->{mask}, $_->{net}))
|
||||
{
|
||||
@@ -1508,7 +1508,7 @@ sub nodeonmynet
|
||||
my $nettab = xCAT::Table->new("networks");
|
||||
my @vnets = $nettab->getAllAttribs('net', 'mgtifname', 'mask');
|
||||
foreach (@vnets) {
|
||||
if ((defined $_->{mgtifname}) && ($_->{mgtifname} eq '!remote!'))
|
||||
if ((defined $_->{mgtifname}) && ($_->{mgtifname} =~ /!remote!/))
|
||||
{ #global scoped network
|
||||
my $curm = unpack("N", inet_aton($_->{mask}));
|
||||
my $bits = 32;
|
||||
|
@@ -679,12 +679,12 @@ passed as argument rather than by table value',
|
||||
},
|
||||
},
|
||||
pdu => {
|
||||
cols => [qw(pdu machinetype modelnum serialnum outletCount comments disable)],
|
||||
keys => [qw(pdu)],
|
||||
nodecol => "pdu",
|
||||
cols => [qw(node machinetype modelnum serialnum outletCount comments disable)],
|
||||
keys => [qw(node)],
|
||||
nodecol => "node",
|
||||
table_desc => 'Parameters to use when interrogating pdus',
|
||||
descriptions => {
|
||||
pdu => 'The hostname/address of the pdu to which the settings apply',
|
||||
node => 'The hostname/address of the pdu to which the settings apply',
|
||||
machinetype => 'The pdu machine type',
|
||||
modelnum => 'The pdu model number',
|
||||
serialnum => 'The pdu serial number',
|
||||
@@ -1840,6 +1840,7 @@ foreach my $tabname (keys(%xCAT::ExtTab::ext_tabspec)) {
|
||||
zone => { attrs => [], attrhash => {}, objkey => 'zonename' },
|
||||
firmware => { attrs => [], attrhash => {}, objkey => 'cfgfile' },
|
||||
taskstate => { attrs => [], attrhash => {}, objkey => 'node' },
|
||||
pdu => { attrs => [], attrhash => {}, objkey => 'node' },
|
||||
|
||||
);
|
||||
|
||||
@@ -2855,22 +2856,22 @@ my @nodeattrs = (
|
||||
{ attr_name => 'machinetype',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.machinetype',
|
||||
access_tabentry => 'pdu.pdu=attr:node',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'modelnum',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.modelnum',
|
||||
access_tabentry => 'pdu.pdu=attr:node',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'serialnum',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.serialnum',
|
||||
access_tabentry => 'pdu.pdu=attr:node',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'outletcount',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.outletcount',
|
||||
access_tabentry => 'pdu.pdu=attr:node',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
|
||||
#########################
|
||||
@@ -4075,6 +4076,46 @@ push(@{ $defspec{group}->{'attrs'} }, @nodeattrs);
|
||||
},
|
||||
);
|
||||
|
||||
#############################
|
||||
# pdu object #
|
||||
#############################
|
||||
#############################
|
||||
# pdu table #
|
||||
#############################
|
||||
@{ $defspec{pdu}->{'attrs'} } =
|
||||
(
|
||||
{ attr_name => 'node',
|
||||
tabentry => 'pdu.node',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'nodetype',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.nodetype',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'machinetype',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.machinetype',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'modelnum',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.modelnum',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'serialnum',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.serialnum',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
{ attr_name => 'outletcount',
|
||||
only_if => 'nodetype=pdu',
|
||||
tabentry => 'pdu.outletcount',
|
||||
access_tabentry => 'pdu.node=attr:node',
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
|
||||
###################################################
|
||||
|
||||
|
@@ -162,6 +162,11 @@ sub fping_pping {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!-x '/usr/bin/fping')
|
||||
{
|
||||
print "fping is not available, please install missing package fping.\n";
|
||||
exit 1;
|
||||
}
|
||||
open(FPING, "fping " . join(' ', @$nodes) . " 2>&1 |") or die("Cannot open fping pipe: $!");
|
||||
}
|
||||
while (<FPING>) {
|
||||
|
@@ -127,7 +127,7 @@ sub preprocess_request {
|
||||
}
|
||||
|
||||
#pdu commands will be handled in the pdu plugin
|
||||
if (($extrargs->[0] eq 'pdustat') || ($extrargs->[0] eq 'pduon') || ($extrargs->[0] eq 'pduoff')) {
|
||||
if (($extraargs->[0] eq 'pdustat') || ($extraargs->[0] eq 'pduon') || ($extraargs->[0] eq 'pduoff')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user