Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core
sysclone working in softlayer
This commit is contained in:
commit
dbfd2a8909
@ -23,6 +23,13 @@ echo "CURDIR is $CURDIR"
|
||||
echo "OSNAME is $OSNAME!"
|
||||
echo "NAMEALL is $NAMEALL"
|
||||
|
||||
grep -i 'SUSE' /etc/issue
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "This is a SUSE system!"
|
||||
OS="SUSE";
|
||||
fi
|
||||
|
||||
|
||||
ls $CURDIR/makerpm
|
||||
|
||||
if [ $? -gt 0 ]; then
|
||||
@ -78,9 +85,16 @@ else
|
||||
#This is not an Ubuntu system
|
||||
echo "This is an $OSNAME system"
|
||||
|
||||
rm -rf /root/rpmbuild/RPMS/noarch/*
|
||||
rm -rf /root/rpmbuild/RPMS/x86_64/*
|
||||
rm -rf /root/rpmbuild/RPMS/ppc64/*
|
||||
if [ "$OS" = "SUSE" ]; then
|
||||
rm -rf /usr/src/packages/RPMS/noarch/*
|
||||
rm -rf /usr/src/packages/RPMS/x86_64/*
|
||||
rm -rf /usr/src/packages/RPMS/ppc64/*
|
||||
else
|
||||
rm -rf /root/rpmbuild/RPMS/noarch/*
|
||||
rm -rf /root/rpmbuild/RPMS/x86_64/*
|
||||
rm -rf /root/rpmbuild/RPMS/ppc64/*
|
||||
fi
|
||||
|
||||
mkdir -p $CURDIR/build/
|
||||
|
||||
#always build perl-xCAT
|
||||
@ -113,13 +127,20 @@ echo "This is an $OSNAME system"
|
||||
fi
|
||||
done
|
||||
|
||||
cp /root/rpmbuild/RPMS/noarch/* $CURDIR/build/
|
||||
cp /root/rpmbuild/RPMS/x86_64/* $CURDIR/build/
|
||||
cp /root/rpmbuild/RPMS/ppc64/* $CURDIR/build/
|
||||
if [ "$OS" = "SUSE" ]; then
|
||||
cp /usr/src/packages/RPMS/noarch/* $CURDIR/build/
|
||||
cp /usr/src/packages/RPMS/x86_64/* $CURDIR/build/
|
||||
cp /usr/src/packages/RPMS/ppc64/* $CURDIR/build/
|
||||
else
|
||||
cp /root/rpmbuild/RPMS/noarch/* $CURDIR/build/
|
||||
cp /root/rpmbuild/RPMS/x86_64/* $CURDIR/build/
|
||||
cp /root/rpmbuild/RPMS/ppc64/* $CURDIR/build/
|
||||
fi
|
||||
|
||||
#begin to create repo for redhat platform
|
||||
|
||||
if [ "$OSNAME" != "AIX" ]; then
|
||||
grep -i 'Red' /etc/issue;
|
||||
if [ "$OSNAME" != "AIX" -a $? -eq 0 ]; then
|
||||
cat >$CURDIR/build/xCAT-core.repo << EOF
|
||||
[xcat-2-core]
|
||||
name=xCAT 2 Core packages
|
||||
@ -129,7 +150,9 @@ gpgcheck=0
|
||||
EOF
|
||||
|
||||
cp $CURDIR/build/xCAT-core.repo /etc/yum.repos.d/
|
||||
|
||||
else
|
||||
rm -f /etc/zypp/repos.d/xCAT-core.repo
|
||||
zypper ar file://$CURDIR/build xCAT-core
|
||||
fi
|
||||
|
||||
fi
|
||||
|
@ -5207,6 +5207,7 @@ sub build_append_rsync
|
||||
push @::appendlines,$line;
|
||||
}
|
||||
my $src_file = $1; # append file left of arror
|
||||
my $orig_src_file = $1; # append file left of arror
|
||||
# it will be sync'd to $nodesyncfiledir/$append_file
|
||||
my $dest_file = $nodesyncfiledir;
|
||||
$dest_file .= $src_file;
|
||||
@ -5235,7 +5236,7 @@ sub build_append_rsync
|
||||
# to pick up files from /var/xcat/syncfiles...
|
||||
if ($onServiceNode == 1) {
|
||||
my $newsrcfile = $syncdir; # add SN syndir on front
|
||||
$newsrcfile .= $src_file;
|
||||
$newsrcfile .= $orig_src_file;
|
||||
$src_file=$newsrcfile;
|
||||
}
|
||||
# destination file name
|
||||
|
@ -253,64 +253,6 @@ use strict;
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
=head3
|
||||
ifconfig_inet
|
||||
|
||||
Builds a list of all IP Addresses bound to the local host and
|
||||
stores them in a global list
|
||||
|
||||
Arguments:
|
||||
None
|
||||
|
||||
Returns:
|
||||
None
|
||||
|
||||
Globals:
|
||||
@local_inet
|
||||
|
||||
Error:
|
||||
None
|
||||
|
||||
Example:
|
||||
xCAT::DSHCore->ifconfig_inet;
|
||||
|
||||
Comments:
|
||||
Internal routine only
|
||||
|
||||
=cut
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
sub ifconfig_inet
|
||||
{
|
||||
my @local_inet = ();
|
||||
|
||||
if ($^O eq 'aix')
|
||||
{
|
||||
my @ip_address = ();
|
||||
my @output = `/usr/sbin/ifconfig -a`;
|
||||
|
||||
foreach my $line (@output)
|
||||
{
|
||||
($line =~ /inet ((\d{1,3}?\.){3}(\d){1,3})\s/o)
|
||||
&& (push @local_inet, $1);
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($^O eq 'linux')
|
||||
{
|
||||
my @ip_address = ();
|
||||
my @output = `/sbin/ifconfig -a`;
|
||||
|
||||
foreach my $line (@output)
|
||||
{
|
||||
($line =~ /inet addr:((\d{1,3}?\.){3}(\d){1,3})\s/o)
|
||||
&& (push @local_inet, $1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
@ -697,19 +697,26 @@ sub get_nic_ip
|
||||
# Base address:0x2600 Memory:fbfe0000-fc0000080
|
||||
#
|
||||
# eth1 ...
|
||||
# Redhat7
|
||||
#eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
# inet 10.1.0.178 netmask 255.255.0.0 broadcast 10.1.255.255
|
||||
#
|
||||
##############################################################
|
||||
my @adapter= split /\n{2,}/, $result;
|
||||
foreach ( @adapter ) {
|
||||
if ( !($_ =~ /LOOPBACK / ) and
|
||||
$_ =~ /UP / and
|
||||
$_ =~ /$mode / ) {
|
||||
if ( !($_ =~ /LOOPBACK/ ) and
|
||||
$_ =~ /UP( |,|>)/ and
|
||||
$_ =~ /$mode/ ) {
|
||||
my @ip = split /\n/;
|
||||
for my $ent ( @ip ) {
|
||||
if ($ent =~ /^(eth\d|ib\d|hf\d)\s+/) {
|
||||
$nic = $1;
|
||||
}
|
||||
if ( $ent =~ /^\s*inet addr:\s*(\d+\.\d+\.\d+\.\d+)/ ) {
|
||||
}
|
||||
if ($ent =~ /^(eth\d:|ib\d:|hf\d:)\s+/) {
|
||||
$nic = $1;
|
||||
}
|
||||
$ent=~ s/addr://; # works for Redhat7 also
|
||||
if ( $ent =~ /^\s*inet \s*(\d+\.\d+\.\d+\.\d+)/ ) {
|
||||
$iphash{$nic} = $1;
|
||||
next;
|
||||
}
|
||||
@ -2306,6 +2313,7 @@ sub isValidHostname
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head3 isValidFQDN
|
||||
|
@ -253,9 +253,6 @@ dracut_install /usr/share/zoneinfo/posix/America/Knox_IN
|
||||
dracut_install /usr/share/zoneinfo/posix/America/Goose_Bay
|
||||
dracut_install /usr/share/zoneinfo/posix/EET
|
||||
dracut_install /usr/share/zoneinfo/posix/EST5EDT
|
||||
dracut_install /usr/share/zoneinfo/posix/Mideast/Riyadh89
|
||||
dracut_install /usr/share/zoneinfo/posix/Mideast/Riyadh88
|
||||
dracut_install /usr/share/zoneinfo/posix/Mideast/Riyadh87
|
||||
dracut_install /usr/share/zoneinfo/posix/MST
|
||||
dracut_install /usr/share/zoneinfo/posix/Iceland
|
||||
dracut_install /usr/share/zoneinfo/posix/Atlantic/Faeroe
|
||||
@ -396,7 +393,6 @@ dracut_install /usr/share/zoneinfo/posix/NZ-CHAT
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Istanbul
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Kuwait
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Saigon
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Riyadh89
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Urumqi
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Brunei
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Ujung_Pandang
|
||||
@ -438,7 +434,6 @@ dracut_install /usr/share/zoneinfo/posix/Asia/Tokyo
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Macao
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Riyadh
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Rangoon
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Riyadh88
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Jakarta
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Aden
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Calcutta
|
||||
@ -476,7 +471,6 @@ dracut_install /usr/share/zoneinfo/posix/Asia/Tel_Aviv
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Taipei
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Kabul
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Macau
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Riyadh87
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Choibalsan
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Vientiane
|
||||
dracut_install /usr/share/zoneinfo/posix/Asia/Dacca
|
||||
|
@ -204,7 +204,7 @@ for bmcu in $BMCUS; do
|
||||
if [ "$bmcu" = "" ]; then continue; fi
|
||||
DISABLEUSERS="1 2 3 4"
|
||||
if [ ! -z "$LOCKEDUSERS" ]; then
|
||||
USERSLOT=`ipmitool -d $idev user list $LANCHAN |grep -v ^ID|awk '{print $1 " " $2}'|grep " $BMCUS"|awk '{print $1}'`
|
||||
USERSLOT=`ipmitool -d $idev user list $LANCHAN |grep -v ^ID|awk '{print $1 " " $2}'|grep -w "$BMCUS"|awk '{print $1}'`
|
||||
if [ -z "$USERSLOT" ]; then
|
||||
USERSLOT=4
|
||||
fi
|
||||
@ -239,7 +239,7 @@ done
|
||||
TRIES=0
|
||||
# Last param in ipmitool user priv is the channel to set it on.
|
||||
# Penguin boxes are all channel 2
|
||||
CURRPRIV=`ipmitool -d $idev user list 1|grep ^$USERSLOT|awk '{print $6}'`
|
||||
CURRPRIV=`ipmitool -d $idev user list $LANCHAN|grep ^$USERSLOT|awk '{print $6}'`
|
||||
if [ "$CURRPRIV" != "ADMINISTRATOR" ]; then
|
||||
while ! ipmitool -d $idev user priv $USERSLOT 4 $LANCHAN; do
|
||||
sleep 1
|
||||
|
@ -2647,6 +2647,7 @@ sub newconfig
|
||||
push @dhcpconf, "#xCAT generated dhcp configuration\n";
|
||||
push @dhcpconf, "\n";
|
||||
push @dhcpconf, "authoritative;\n";
|
||||
push @dhcpconf, "option conf-file code 209 = text;\n";
|
||||
push @dhcpconf, "option space isan;\n";
|
||||
push @dhcpconf, "option isan-encap-opts code 43 = encapsulate isan;\n";
|
||||
push @dhcpconf, "option isan.iqn code 203 = string;\n";
|
||||
|
@ -447,20 +447,22 @@ sub process_request {
|
||||
|
||||
if ($do_dhcpsetup) {
|
||||
foreach my $node (@normalnodeset) {
|
||||
|
||||
my $fpath = "http://9.3.190.175/tftpboot/petitboot/$node";
|
||||
if ($request->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command
|
||||
$sub_req->({command=>['makedhcp'],
|
||||
node=> [$node],
|
||||
arg=>['-l','-s','conf-file = \"'.$fpath.'\";']},$callback);
|
||||
} else {
|
||||
$sub_req->({command=>['makedhcp'],
|
||||
node=> [$node],
|
||||
arg=>['-s','conf-file = \"'.$fpath.'\";']},$callback);
|
||||
}
|
||||
my $server = xCAT::TableUtils->GetMasterNodeName($node);
|
||||
my $ipfn = xCAT::NetworkUtils->my_ip_facing($server);
|
||||
if(($server != 1) and defined($ipfn)) {
|
||||
my $fpath = "http://$ipfn/tftpboot/petitboot/$node";
|
||||
if ($request->{'_disparatetftp'}->[0]) { #reading hint from preprocess_command
|
||||
$sub_req->({command=>['makedhcp'],
|
||||
node=> [$node],
|
||||
arg=>['-l','-s','option conf-file \"'.$fpath.'\";']},$callback);
|
||||
} else {
|
||||
$sub_req->({command=>['makedhcp'],
|
||||
node=> [$node],
|
||||
arg=>['-s','option conf-file \"'.$fpath.'\";']},$callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#now run the end part of the prescripts
|
||||
|
@ -2975,6 +2975,21 @@ sub getAttribs
|
||||
# <comments>This is a comment</comments>
|
||||
#</xcatrequest>
|
||||
#
|
||||
#
|
||||
#<xcatrequest>
|
||||
#<clienttype>PCM</clienttype>
|
||||
#<command>setAttribs</command>
|
||||
#<table>networks</table>
|
||||
#<keys>
|
||||
# <net>10.0.1.0</net>
|
||||
# <mask>255.255.255.0</mask>
|
||||
#</keys>
|
||||
#<attr>
|
||||
# <netname>mynet</netname>
|
||||
# <gateway>10.0.1.254</gateway>
|
||||
#</attr>
|
||||
#</xcatrequest>
|
||||
|
||||
sub setAttribs
|
||||
{
|
||||
my $request = shift;
|
||||
|
@ -177,7 +177,7 @@ if ($netdriver) {
|
||||
|
||||
# Add the default driver list
|
||||
if ($arch eq 'x86' or $arch eq 'x86_64') {
|
||||
push @ndrivers, qw/tg3 bnx2 bnx2x e1000 e1000e igb mlx_en be2net/;
|
||||
push @ndrivers, qw/tg3 bnx2 bnx2x e1000 e1000e virtio_net virtio_balloon igb mlx_en be2net/;
|
||||
} elsif ($arch eq 'ppc64') {
|
||||
push @ndrivers, qw/tg3 e1000 e1000e igb ibmveth ehea be2net/;
|
||||
} elsif ($arch eq "s390x") {
|
||||
|
@ -54,14 +54,14 @@ my @apigroups = (
|
||||
{
|
||||
groupname => 'services',
|
||||
header => "Service Resources",
|
||||
desc => "The URI list which can be used to manage the dns and dhcp services on xCAT MN.",
|
||||
desc => "The URI list which can be used to manage the host, dns and dhcp services on xCAT MN.",
|
||||
resources => ['dns','dhcp','host', 'slpnodes', 'specific_slpnodes',]
|
||||
},
|
||||
{
|
||||
groupname => 'tables',
|
||||
header => "Table Resources",
|
||||
desc => "URI list which can be used to create, query, change global configuration.",
|
||||
resources => ['table_nodes', 'table_rows']
|
||||
desc => "URI list which can be used to create, query, change table entries.",
|
||||
resources => ['table_nodes', 'table_nodes_attrs', 'table_all_rows', 'table_rows', 'table_rows_attrs']
|
||||
},
|
||||
);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user