diff --git a/build-ubunturepo b/build-ubunturepo index b13a91db3..49e46cf63 100755 --- a/build-ubunturepo +++ b/build-ubunturepo @@ -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 diff --git a/perl-xCAT/xCAT/NetworkUtils.pm b/perl-xCAT/xCAT/NetworkUtils.pm index 423ea320d..a66576cf4 100755 --- a/perl-xCAT/xCAT/NetworkUtils.pm +++ b/perl-xCAT/xCAT/NetworkUtils.pm @@ -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; diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 5b167aadb..c9f9a0268 100755 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -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', + }, +); + + ################################################### diff --git a/xCAT-client/bin/pping b/xCAT-client/bin/pping index 09bf8cdba..af13369d4 100755 --- a/xCAT-client/bin/pping +++ b/xCAT-client/bin/pping @@ -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 () { diff --git a/xCAT-server/lib/xcat/plugins/rhevm.pm b/xCAT-server/lib/xcat/plugins/rhevm.pm index db9259585..5a45e7870 100644 --- a/xCAT-server/lib/xcat/plugins/rhevm.pm +++ b/xCAT-server/lib/xcat/plugins/rhevm.pm @@ -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; }