Skip to content

Commit

Permalink
Merge pull request #2537 from xcat2/master
Browse files Browse the repository at this point in the history
merge master to 2.13 branch for 2.13.2 release(2)
  • Loading branch information
zet809 authored Feb 23, 2017
2 parents bf47335 + 64ce9f4 commit a113382
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 11 deletions.
36 changes: 36 additions & 0 deletions build-ubunturepo
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions perl-xCAT/xCAT/NetworkUtils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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}))
{
Expand Down Expand Up @@ -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;
Expand Down
57 changes: 49 additions & 8 deletions perl-xCAT/xCAT/Schema.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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' },

);

Expand Down Expand Up @@ -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',
},

#########################
Expand Down Expand Up @@ -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',
},
);



###################################################

Expand Down
5 changes: 5 additions & 0 deletions xCAT-client/bin/pping
Original file line number Diff line number Diff line change
Expand Up @@ -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>) {
Expand Down
2 changes: 1 addition & 1 deletion xCAT-server/lib/xcat/plugins/rhevm.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a113382

Please sign in to comment.