From 1f207f3815e6974784258ca7c89a0cac059e3c48 Mon Sep 17 00:00:00 2001 From: immarvin Date: Sun, 27 Apr 2014 20:29:32 -0700 Subject: [PATCH 01/10] add dependency libcrypt-rijndael-perl for ubuntu --- xCAT-server/debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/debian/control b/xCAT-server/debian/control index ca1a6b385..bc412985d 100644 --- a/xCAT-server/debian/control +++ b/xCAT-server/debian/control @@ -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},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,libcrypt-rijndael-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 From 1c732974f8ed125c7ce1fe8a4c9470e630793b38 Mon Sep 17 00:00:00 2001 From: immarvin Date: Mon, 28 Apr 2014 00:28:32 -0700 Subject: [PATCH 02/10] add a new ubuntu dependency libcrypt-cbc-perl --- xCAT-server/debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/debian/control b/xCAT-server/debian/control index bc412985d..ced18884e 100644 --- a/xCAT-server/debian/control +++ b/xCAT-server/debian/control @@ -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,libcrypt-rijndael-perl +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,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 From c17315bf74dcc5648f7926bec4b06ef3d99cafba Mon Sep 17 00:00:00 2001 From: daniceexi Date: Mon, 28 Apr 2014 09:57:00 -0400 Subject: [PATCH 03/10] defect 4065: add the description for site.externaldns in makedns.8.pod --- xCAT-client/pods/man8/makedns.8.pod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xCAT-client/pods/man8/makedns.8.pod b/xCAT-client/pods/man8/makedns.8.pod index 4b303d9dd..3674161d7 100644 --- a/xCAT-client/pods/man8/makedns.8.pod +++ b/xCAT-client/pods/man8/makedns.8.pod @@ -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 means use 'external' DNS by default. If setting I to 1, you need NOT use B<-e> flag in every makedns call. + =item B A set of comma delimited node names and/or group names. See the "noderange" man page for details on additional supported formats. From 6bf14a8c9a1e250db343bfd9eb4f4266456dda12 Mon Sep 17 00:00:00 2001 From: yinle Date: Mon, 28 Apr 2014 08:12:34 -0700 Subject: [PATCH 04/10] add new check item cmdcheck --- xCAT-test/xcattest | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 511fcfb43..c159bc9b2 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -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()); From c24ad6046444b010294c66f81493a6176e17025a Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Mon, 28 Apr 2014 06:19:32 -0700 Subject: [PATCH 05/10] fix bugs about partitioning --- perl-xCAT/xCAT/FSPvm.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/perl-xCAT/xCAT/FSPvm.pm b/perl-xCAT/xCAT/FSPvm.pm index afcfa3d24..9145ae678 100644 --- a/perl-xCAT/xCAT/FSPvm.pm +++ b/perl-xCAT/xCAT/FSPvm.pm @@ -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})) { From a171f853fdd257c33bda8cf2b96bb975fad86137 Mon Sep 17 00:00:00 2001 From: ligc Date: Tue, 29 Apr 2014 10:30:21 -0500 Subject: [PATCH 06/10] add vlan support for configeth, could use the syntax eth1.2 to specify vlan tagging --- xCAT/postscripts/configeth | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xCAT/postscripts/configeth b/xCAT/postscripts/configeth index c9e73068c..85994e869 100755 --- a/xCAT/postscripts/configeth +++ b/xCAT/postscripts/configeth @@ -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 } From 3a59513346786f09ba7793fc0be175c6b2b45184 Mon Sep 17 00:00:00 2001 From: immarvin Date: Mon, 28 Apr 2014 20:51:29 -0700 Subject: [PATCH 07/10] eliminate grub2-xcat dependency in xcat2.8.4 --- xCAT-server/debian/control | 2 +- xCAT-server/xCAT-server.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/debian/control b/xCAT-server/debian/control index ced18884e..759807276 100644 --- a/xCAT-server/debian/control +++ b/xCAT-server/debian/control @@ -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,libcrypt-rijndael-perl,libcrypt-cbc-perl +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 diff --git a/xCAT-server/xCAT-server.spec b/xCAT-server/xCAT-server.spec index 3c8a18b62..2b6ee0988 100644 --- a/xCAT-server/xCAT-server.spec +++ b/xCAT-server/xCAT-server.spec @@ -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 From b9d2723e866f984afa5774f1edefad7f0a3039a5 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Mon, 28 Apr 2014 22:13:31 -0700 Subject: [PATCH 08/10] fix bug 3934: mkdef/chdef -u needs better doc and 1 fix --- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 34 ++++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index e97670de3..b9c2f3364 100755 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -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, From bb4ff64e3348f7fccdf77b9d53a492f14d7abe86 Mon Sep 17 00:00:00 2001 From: immarvin Date: Tue, 29 Apr 2014 00:18:59 -0700 Subject: [PATCH 09/10] fix defect #3997 node reinstall loop when site.nodestatus=0 Edit --- xCAT-server/share/xcat/install/scripts/post.xcat | 7 ++++--- xCAT/postscripts/runxcatpost | 4 +--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 50c298e51..61dbd8379 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -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 diff --git a/xCAT/postscripts/runxcatpost b/xCAT/postscripts/runxcatpost index 83284ca55..508c13f14 100644 --- a/xCAT/postscripts/runxcatpost +++ b/xCAT/postscripts/runxcatpost @@ -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 From f92c936704004322eb3f8c6d2778ae2452b243cc Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 29 Apr 2014 09:04:31 -0400 Subject: [PATCH 10/10] Defect 4061 --- perl-xCAT/xCAT/DSHCLI.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index 02db73961..e6a3ab178 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -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'],