Merge branch '2.8' of ssh://git.code.sf.net/p/xcat/xcat-core into 2.8

This commit is contained in:
Jarrod Johnson 2014-04-29 15:00:32 -04:00
commit 715b868dbc
10 changed files with 68 additions and 27 deletions

View File

@ -6039,11 +6039,11 @@ sub run_always_rsync_postscripts
# if on the service node need to add the $syncdir directory
# to the path
if (xCAT::Utils->isServiceNode()) {
my $tmpp=$syncdir . $ps;
$ps=$tmpp;
my $tmps=$syncdir . $ps;
push @args, $tmps;
} else{
push @args, $ps;
}
push @args, $ps;
push (@nodes, @{$$dshparms{'postscripts'}{$ps}});
$out=xCAT::Utils->runxcmd( { command => ['xdsh'],

View File

@ -1681,6 +1681,7 @@ my @partition_query_actions = qw(part_get_partition_cap part_get_hyp_process_and
sub parse_part_get_info {
my $hash = shift;
my $data = shift;
my $lparid = shift;
my @array = split /\n/, $data;
foreach my $line (@array) {
chomp($line);
@ -1701,7 +1702,9 @@ sub parse_part_get_info {
$hash->{bus}->{$3}->{cur_lparid} = $1;
$hash->{bus}->{$3}->{bus_slot} = $2;
$hash->{bus}->{$3}->{des} = $4;
push @{$hash->{lpar_phy_bus}}, $3;
if ($lparid and $lparid eq $1) {
push @{$hash->{lpar_phy_bus}}, $3;
}
} elsif ($line =~ /Phy drc_index:(\w+), Port group: (\w+), Phy port id: (\w+)/) {
$hash->{phy_drc_group_port}->{$1}->{$2}->{$3} = '1';
#} elsif ($line =~ /adapter_id=(\w+),lpar_id=([\d|-]+).*port_group=(\d+),phys_port_id=(\d+).*drc_index=(\w+),.*/) {
@ -1785,13 +1788,13 @@ sub query_cec_info_actions {
chomp(@$values[1]);
#if ($action eq "part_get_partition_cap" and (@$values[1] =~ /Error:/i or @$values[2] ne 0)) {
if (@$values[1] =~ /Error:/i or @$values[2] ne 0) {
return ([[@$values]]);
next; #return ([[@$values]]);
}
if (@$values[1] =~ /^$/) {
next;
}
if ($usage eq 1 or $usage eq 2) {
&parse_part_get_info(\%hash, @$values[1]);
&parse_part_get_info(\%hash, @$values[1], $lparid);
}
if ($usage eq 0 or $usage eq 2) {
@ -1874,7 +1877,7 @@ sub update_vm_db {
if (exists($node_hash->{lpar_cpu_min})) {
$db_update{cpus} = "$node_hash->{lpar_cpu_min}/$node_hash->{lpar_cpu_req}/$node_hash->{lpar_cpu_max}";
}
if (exists($node_hash->{lpar_mem_nim})) {
if (exists($node_hash->{lpar_mem_min})) {
$db_update{memory} = "$node_hash->{lpar_mem_min}/$node_hash->{lpar_mem_req}/$node_hash->{lpar_mem_max}";
}
if (exists($node_hash->{lpar_vmstorage_server})) {

View File

@ -49,6 +49,8 @@ Remove the DNS records.
Update DNS records to the external DNS server listed in /etc/resolv.conf.
Enabling the site attribute I<externaldns> means use 'external' DNS by default. If setting I<externaldns> to 1, you need NOT use B<-e> flag in every makedns call.
=item B<noderange>
A set of comma delimited node names and/or group names. See the "noderange" man page for details on additional supported formats.

View File

@ -7,6 +7,6 @@ Standards-Version: 3.7.2
Package: xcat-server
Architecture: all
Depends: ${perl:Depends},grub2-xcat, perl-xcat (>= 2.5.0-1), xcat-client (>= 2.5.0-1), libsys-syslog-perl, libio-socket-ssl-perl, libxml-simple-perl, make, libdbd-sqlite3-perl, libexpect-perl, libnet-dns-perl, libsoap-lite-perl, libxml-libxml-perl, libsnmp-perl, debootstrap
Depends: ${perl:Depends}, perl-xcat (>= 2.5.0-1), xcat-client (>= 2.5.0-1), libsys-syslog-perl, libio-socket-ssl-perl, libxml-simple-perl, make, libdbd-sqlite3-perl, libexpect-perl, libnet-dns-perl, libsoap-lite-perl, libxml-libxml-perl, libsnmp-perl, debootstrap,libcrypt-rijndael-perl,libcrypt-cbc-perl
Description: Server and configuration utilities of the xCAT management project
xCAT-server provides the core server and configuration management components of xCAT. This package should be installed on your management server

View File

@ -2468,15 +2468,21 @@ sub defch
# give results
my $rsp;
$rsp->{data}->[0] =
"The database was updated for the following objects:";
xCAT::MsgUtils->message("I", $rsp, $::callback);
my $nodenum = scalar(keys %::FINALATTRS);
if ($nodenum) {
$rsp->{data}->[0] =
"The database was updated for the following objects:";
xCAT::MsgUtils->message("I", $rsp, $::callback);
my $n = 1;
foreach my $o (sort(keys %::FINALATTRS))
{
$rsp->{data}->[$n] = "$o\n";
$n++;
my $n = 1;
foreach my $o (sort(keys %::FINALATTRS))
{
$rsp->{data}->[$n] = "$o\n";
$n++;
}
} else {
$rsp->{data}->[0] =
"No database was updated";
}
xCAT::MsgUtils->message("I", $rsp, $::callback);
}
@ -2484,8 +2490,13 @@ sub defch
{
my $rsp;
my $nodenum = scalar(keys %::FINALATTRS);
$rsp->{data}->[0] =
"$nodenum object definitions have been created or modified.";
if ($nodenum) {
$rsp->{data}->[0] =
"$nodenum object definitions have been created or modified.";
} else {
$rsp->{data}->[0] =
"No object definitions have been created or modified.";
}
xCAT::MsgUtils->message("I", $rsp, $::callback);
if (scalar(keys %newobjects) > 0)
{
@ -2633,6 +2644,9 @@ sub setFINALattrs
{
# special case for the nic* attributes
# merge nic*.eth0, nic*.eth1
unless(exists($::CLIATTRS{$objname})) {
next;
}
if ($::CLIATTRS{$objname}{objtype} eq 'node')
{
# Even if only the nicips.eth0 is specified with CLI,

View File

@ -182,9 +182,10 @@ addsiteyum
/xcatpost/mypostscript
sed -i 's/^serial/#serial/' /boot/grub/grub.conf
sed -i 's/^terminal/#terminal/' /boot/grub/grub.conf
if [ -z "$NODESTATUS" ] || [ "$NODESTATUS" != "0" -a "$NODESTATUS" != "N" -a "$NODESTATUS" != "n" ]; then
updateflag.awk $MASTER 3002
fi
#the following command should always be run to prevent infinite installation loops
updateflag.awk $MASTER 3002
cd /
#rm -Rf /xcatpost
#rm -f /xcatpost/mypostscript

View File

@ -34,7 +34,7 @@ Obsoletes: atftp-xcat
%ifos linux
%ifnarch s390x
# PCM does not use or ship grub2-xcat
Requires: grub2-xcat
#Requires: grub2-xcat
%endif
%endif
%endif

View File

@ -477,10 +477,11 @@ sub loadcase
$j = -1;
$cases[$i]={};
$cases[$i]->{name}=$name;
$cases[$i]->{filename}=$file;
$cases[$i]->{filename}=$file;
if(!$needshow){
$cases[$i]->{cmd}=[];
$cases[$i]->{check}=[];
$cases[$i]->{cmdcheck}=[];
push(@rightcase, $name);
}else{
$skip = 1;
@ -545,6 +546,14 @@ sub loadcase
return 1;
}
$z = $z + 1;
}elsif($line =~ /^cmdcheck\s*:\s*(\w.+)/){
next if $skip;
$cases[$i]->{cmdcheck}->[$j][$z] = &getvar($1);
if($cases[$i]->{cmdcheck}->[$j][$z] eq ''){
close(FILE);
return 1;
}
$z = $z + 1;
}elsif($line =~ /^end/){
next if $skip;
$i = $i + 1;
@ -756,6 +765,9 @@ sub runcase
}
}
}
foreach my $cmdcheck (@{$$case{cmdcheck}->[$j]}){
&runcmd($cmdcheck);
}
$j = $j + 1;
}
my $now2=timelocal(localtime());

View File

@ -27,6 +27,10 @@ function configipv4(){
echo "NETWORK_${num_v4num}=${str_v4net}" >> $str_conf_file
echo "LABEL_${num_v4num}=${num_v4num}" >> $str_conf_file
fi
if [[ ${str_if_name} == [a-zA-Z0-9]*.[0-9]* ]]; then
echo "VLAN=yes" >> $str_conf_file
fi
#debian ubuntu
elif [ "$str_os_type" = "debian" ];then
str_conf_file="/etc/network/interfaces.d/${str_if_name}"
@ -40,6 +44,10 @@ function configipv4(){
echo " address ${str_v4ip}" >> $str_conf_file
echo " netmask ${str_v4mask}" >> $str_conf_file
echo " network ${str_v4net}" >> $str_conf_file
if [[ ${str_if_name} == [a-zA-Z0-9]*.[0-9]* ]]; then
parent_device=`echo ${str_if_name} | sed -e 's/\([a-zA-Z0-9]*\)\.[0-9]*/\1/g'`
echo " vlan-raw-device ${parent_device}" >> $str_conf_file
fi
else
# Write the info to the ifcfg file for redhat
str_conf_file=""
@ -56,6 +64,9 @@ function configipv4(){
echo "IPADDR=${str_v4ip}" >> $str_conf_file
echo "NETMASK=${str_v4mask}" >> $str_conf_file
echo "ONBOOT=yes" >> $str_conf_file
if [[ ${str_if_name} == [a-zA-Z0-9]*.[0-9]* ]]; then
echo "VLAN=yes" >> $str_conf_file
fi
fi
}

View File

@ -68,6 +68,4 @@ echo "$TMP" > /tmp/xcatenv
. /tmp/xcatenv
/xcatpost/addsiteyum
if [ -z "$NODESTATUS" ] || [ "$NODESTATUS" != "0" -a "$NODESTATUS" != "N" -a "$NODESTATUS" != "n" ]; then
/xcatpost/updateflag.awk $MASTER 3002
fi
/xcatpost/updateflag.awk $MASTER 3002