From 9939be28dbae686b6c322e4bc463482733719c80 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Thu, 15 Dec 2016 10:20:34 -0500 Subject: [PATCH 01/28] Modify usage for config switch scripts --- xCAT-server/share/xcat/scripts/configBNT | 17 +++++----- xCAT-server/share/xcat/scripts/configMellanox | 16 ++++++---- xCAT-server/share/xcat/scripts/configcumulus | 31 ++++++------------- 3 files changed, 28 insertions(+), 36 deletions(-) diff --git a/xCAT-server/share/xcat/scripts/configBNT b/xCAT-server/share/xcat/scripts/configBNT index 3dc4062bc..23e81e656 100755 --- a/xCAT-server/share/xcat/scripts/configBNT +++ b/xCAT-server/share/xcat/scripts/configBNT @@ -158,7 +158,7 @@ sub config_ip { # don't need to set if ip addresses are same if ($dip eq $static_ip) { print "static ip $static_ip and discovery ip $dip is same, will not process command for $switch\n"; - $cmd = "chdef $csw otherinterfaces="; + $cmd = "chdef $switch otherinterfaces="; $rc= xCAT::Utils->runcmd($cmd, 0); next; } @@ -545,15 +545,16 @@ sub config_desc { sub usage { print "Usage: - configBNT [-?│-h│--help] - configBNT [--switches switchnames] [--all] - configBNT [--switches switchnames] [--ip] - configBNT [--switches switchnames] [--name ] - configBNT [--switches switchnames] [--snmp] [--user snmp_user] [--password snmp_password] [--group snmp_group] - configBNT [--switches switchnames] [--port port] [--vlan vlan] + configBNT -h│--help + configBNT --switches switchnames --ip + configBNT --switches switchnames --name + configBNT --switches switchnames --snmp [--user snmp_user] [--password snmp_password] [--group snmp_group] + configBNT --switches switchnames --port port --vlan vlan + + To set the ip address, hostname and config snmp: + configBNT --switches switchnames --all To set the description for a port on the switch: - configBNT --switches switchnames --port port --desc \"description\" \n"; } diff --git a/xCAT-server/share/xcat/scripts/configMellanox b/xCAT-server/share/xcat/scripts/configMellanox index f0a771488..2e6f1db34 100755 --- a/xCAT-server/share/xcat/scripts/configMellanox +++ b/xCAT-server/share/xcat/scripts/configMellanox @@ -329,12 +329,16 @@ sub run_rspconfig { sub usage { print "Usage: - configMellanox [-?│-h│--help] - configMellanox [--switches switchnames] [--all] - configMellanox [--switches switchnames] [--ip] - configMellanox [--switches switchnames] [--name] - configMellanox [--switches switchnames] [--snmp] [--user snmp_user] [--password snmp_password] [--auth snmp_auth] - configMellanox [--switches switchnames] [--config] + configMellanox -h│--help + configMellanox --switches switchnames --ip + configMellanox --switches switchnames --name + configMellanox --switches switchnames --snmp [--user snmp_user] [--password snmp_password] [--auth snmp_auth] + + To set the ip address, hostname, config snmp and run rspconfig command: + configMellanox --switches switchnames --all + + To run rspconfig command: + configMellanox --switches switchnames --config \n"; } diff --git a/xCAT-server/share/xcat/scripts/configcumulus b/xCAT-server/share/xcat/scripts/configcumulus index 7a6cbb55d..d367c2977 100755 --- a/xCAT-server/share/xcat/scripts/configcumulus +++ b/xCAT-server/share/xcat/scripts/configcumulus @@ -227,6 +227,7 @@ sub install_license { print "file = $license_file\n"; if (!(-e $license_file) ) { print "$license_file is not exist\n"; + return; } foreach my $switch (@nodes) { @@ -371,21 +372,6 @@ sub config_ntp { } -sub config_vlan { - if ($::PORT) { - $port = $::PORT; - } else { - &usage; - exit(1); - } - $vlan = $::VLAN; - print "Tagging VLAN=$vlan for $switches port $port\n"; - #create vlan, tagged vlan - #$cmd = `xdsh $switches --devicetype EthSwitch::BNT "enable;configure terminal;vlan $vlan;exit;interface port $port;switchport mode trunk;switchport trunk allowed vlan $vlan;write memory;exit;exit"`; - -} - - #--------------------------------------------------------- =head3 usage @@ -398,13 +384,14 @@ sub config_vlan { sub usage { print "Usage: - configBNT [-?│-h│--help] - configBNT [--switches switchnames] [--all] - configBNT [--switches switchnames] [--ssh] - configBNT [--switches switchnames] [--license filename ] - configBNT [--switches switchnames] [--snmp] [--user snmp_user] [--password snmp_password] [--group snmp_group] - configBNT [--switches switchnames] [--ntp] - configBNT [--switches switchnames] [--port port] [--vlan vlan] + configcumulus -h│--help + configcumulus --switches switchnames --ssh + configcumulus --switches switchnames --license filename + configcumulus --switches switchnames --snmp [--user snmp_user] [--password snmp_password] [--group snmp_group] + configcumulus --switches switchnames --ntp + + To set ssh, install license(license file: /root/license.txt), config snmp and ntp: + configcumulus --switches switchnames --all \n"; } From 0ec39c2a57987aac871b22dc8f8c38d4329fc70d Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Tue, 20 Dec 2016 12:11:27 +0800 Subject: [PATCH 02/28] Fix the code of waiting for ntpd to synchronize in genessis --- xCAT-genesis-scripts/bin/doxcat | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/xCAT-genesis-scripts/bin/doxcat b/xCAT-genesis-scripts/bin/doxcat index 6a637fb91..0f39e1e89 100755 --- a/xCAT-genesis-scripts/bin/doxcat +++ b/xCAT-genesis-scripts/bin/doxcat @@ -266,18 +266,18 @@ ip addr show dev $bootnic|grep -v 'scope link'|grep -v 'dynamic'|grep -v inet6| logger -s -t $log_label -p local4.info "Starting ntpd..." ntpd -g -x -if [ -e "/dev/rtc" ]; then - logger -s -t $log_label -p local4.info "Attempting to sync hardware clock..." - ( sleep 8 ; hwclock --systohc ) /dev/null 2>&1 & - disown +logger -s -t $log_label -p local4.info "Waiting for ntpd to synchronize..." +ntp-wait -n 1999 -s 1 -v +if [ $? -ne 0 ] +then + logger -s -t $log_label -p local4.info "... ntpd did not synchronize." fi -# rv 0 state does not work with the new ntp versions -logger -s -t $log_label -p local4.info "Checking ntpq for the offset values..." -while [ "`ntpq -c 'rv 0 offset' | awk -F '=' '/offset=/ { print $2 }' | awk -F '.' '{ print $1 }' | sed s/-//`" -ge 1000 ]; do - sleep 1 -done -logger -s -t $log_label -p local4.info "Checking ntpq for the offset values... Done" +if [ -e "/dev/rtc" ]; then + logger -s -t $log_label -p local4.info "Attempting to sync hardware clock..." + ( hwclock --systohc ) /dev/null 2>&1 & + disown +fi logger -s -t $log_label -p local4.info "Restarting syslog..." read -r RSYSLOG_PID /dev/null From 0044749f338965dbbc100519754cdcafdd5b0bbd Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Tue, 20 Dec 2016 12:54:15 +0800 Subject: [PATCH 03/28] Add command ntp-wait into package xCAT-genesis-base --- xCAT-genesis-builder/install | 2 +- xCAT-genesis-builder/install.ubuntu | 2 +- xCAT-genesis-builder/xCAT-genesis-base.spec | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-genesis-builder/install b/xCAT-genesis-builder/install index 67e6950fa..2f1d0507f 100755 --- a/xCAT-genesis-builder/install +++ b/xCAT-genesis-builder/install @@ -9,7 +9,7 @@ dracut_install efibootmgr #dracut_install libvirtd /usr/share/libvirt/cpu_map.xml /usr/bin/qemu-img /usr/libexec/qemu-kvm dracut_install mkswap df brctl vconfig ifenslave ssh-keygen scp clear dhclient lldpad dracut_install lldptool /lib64/libnss_dns-2.12.so /lib64/libnss_dns.so.2 -dracut_install poweroff ntpq ntpd hwclock date /usr/share/terminfo/x/xterm /usr/share/terminfo/s/screen /etc/nsswitch.conf /etc/services +dracut_install poweroff ntpq ntpd ntp-wait hwclock date /usr/share/terminfo/x/xterm /usr/share/terminfo/s/screen /etc/nsswitch.conf /etc/services dracut_install /sbin/rsyslogd /etc/protocols umount /bin/rpm /usr/lib/rpm/rpmrc dracut_install chmod /lib/libc.so.6 /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libm.so.6 /sbin/route /sbin/ifconfig /usr/bin/whoami /usr/bin/head /usr/bin/tail basename /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements dracut_install dmidecode /usr/lib64/libstdc++.so.6 #uxspi prereqs, but will use dmidecode to improve decision on loading ipmi_si diff --git a/xCAT-genesis-builder/install.ubuntu b/xCAT-genesis-builder/install.ubuntu index 9ae3f5af2..f073efff0 100755 --- a/xCAT-genesis-builder/install.ubuntu +++ b/xCAT-genesis-builder/install.ubuntu @@ -10,7 +10,7 @@ dracut_install efibootmgr #dracut_install libvirtd /usr/share/libvirt/cpu_map.xml /usr/bin/qemu-img /usr/libexec/qemu-kvm dracut_install mkswap df brctl vconfig ifenslave ssh-keygen scp clear dhclient lldpad dracut_install lldptool -dracut_install poweroff ntpq ntpd hwclock date /usr/share/terminfo/x/xterms /etc/nsswitch.conf /etc/services +dracut_install poweroff ntpq ntp-wait ntpd hwclock date /usr/share/terminfo/x/xterms /etc/nsswitch.conf /etc/services dracut_install /usr/sbin/rsyslogd /etc/protocols umount /usr/bin/dpkg /usr/bin/rpm /usr/lib/rpm/rpmrc if [ -n $version12 ];then dracut_install /lib/x86_64-linux-gnu/libnss_dns-2.15.so /lib/x86_64-linux-gnu/libnss_dns.so.2 diff --git a/xCAT-genesis-builder/xCAT-genesis-base.spec b/xCAT-genesis-builder/xCAT-genesis-base.spec index 989980591..9d8c7907f 100755 --- a/xCAT-genesis-builder/xCAT-genesis-base.spec +++ b/xCAT-genesis-builder/xCAT-genesis-base.spec @@ -31,6 +31,7 @@ URL: http://xcat.org Source1: xCAT-genesis-base-%{tarch}.tar.bz2 Buildroot: %{_localstatedir}/tmp/xCAT-genesis +BuildRequires: /usr/sbin/ntp-wait Packager: IBM Corp. %Description From a1d590f85f8d61707deaf2bfcf4ffa025f0e9c67 Mon Sep 17 00:00:00 2001 From: XuWei Date: Wed, 21 Dec 2016 03:32:20 -0500 Subject: [PATCH 04/28] fix issue 2296, get correct mtms for B&S --- xCAT-server/lib/xcat/plugins/bmcdiscover.pm | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index 54d7ce8b7..18e3a09e2 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -910,19 +910,16 @@ sub bmcdiscovery_ipmi { if (($::RUNCMD_RC eq 0) && @fru_output_array) { my $fru_output = join(" ", @fru_output_array); - if ($fru_cmd_num == 0) { - if (($fru_output =~ /Product Part Number :\s*(\S*).*Product Serial :\s*(\S*)/)) { - $mtm = $1; - $serial = $2; - last; - } + if (($fru_output =~ /Chassis Part Number\s*:\s*(\S*).*Chassis Serial\s*:\s*(\S*)/)) { + $mtm = $1; + $serial = $2; + last; } - else { - if (($fru_output =~ /Chassis Part Number\s*:\s*(\S*).*Chassis Serial\s*:\s*(\S*)/)) { - $mtm = $1; - $serial = $2; - last; - } + + if (($fru_output =~ /Product Part Number :\s*(\S*).*Product Serial :\s*(\S*)/)) { + $mtm = $1; + $serial = $2; + last; } } } From 804fd4c4e581b469864d6b01c447c2687dd30d9d Mon Sep 17 00:00:00 2001 From: XuWei Date: Wed, 21 Dec 2016 02:58:53 -0500 Subject: [PATCH 05/28] fix issue 2336, get correct mac address --- xCAT-probe/subcmds/osdeploy | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xCAT-probe/subcmds/osdeploy b/xCAT-probe/subcmds/osdeploy index b41ca4e1b..16a33f75c 100755 --- a/xCAT-probe/subcmds/osdeploy +++ b/xCAT-probe/subcmds/osdeploy @@ -293,6 +293,17 @@ sub check_noderange { $mac =~ s/\!\*NOIP\*//g; $macmap{$mac}{"ip"} = "NOIP"; $macmap{$mac}{"node"} = $node; + } elsif ($mac =~ /(\w{2}:\w{2}:\w{2}:\w{2}:\w{2}:\w{2})\!(.+)/) { + $mac = $1; + my $tmp_node = $2; + $macmap{$mac}{"node"} = $node; + my $tmp_ip = xCAT::NetworkUtils->getipaddr($tmp_node); + if ($tmp_ip) { + $macmap{$mac}{"ip"} = $tmp_ip; + $ipnodemap{ $nodecheckrst{$node}{"ip"} } = $node; + } else { + $macmap{$mac}{"ip"} = "NOIP"; + } } else { $macmap{$mac}{"node"} = $node; $macmap{$mac}{"ip"} = $nodecheckrst{$node}{"ip"}; From 8be7f480801007cc342831f66114031e91c9abba Mon Sep 17 00:00:00 2001 From: junxiawang Date: Thu, 22 Dec 2016 07:30:26 -0500 Subject: [PATCH 06/28] set up vm environment --- .../Diskless_installation_flat_p8_le | 6 ------ .../testcase/installation/SN_setup_case | 6 ------ .../reg_linux_SN_installation_hierarchy | 4 ---- .../reg_linux_diskfull_installation_flat | 3 --- .../autotest/testcase/installation/setup_vm | 20 +++++++++++++++++++ .../ubuntu_full_installation_vm_docker | 5 ----- 6 files changed, 20 insertions(+), 24 deletions(-) create mode 100644 xCAT-test/autotest/testcase/installation/setup_vm diff --git a/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le b/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le index 0c4459990..51d18d4ad 100644 --- a/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le +++ b/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le @@ -3,12 +3,6 @@ os:Linux cmd:copycds $$ISO check:rc==0 -cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi -check:rc==0 -#comment for vm debug -#cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p ;mkvm $$CN -s 20G; fi;fi -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi -check:rc==0 cmd:makedns -n check:rc==0 cmd:makedhcp -n diff --git a/xCAT-test/autotest/testcase/installation/SN_setup_case b/xCAT-test/autotest/testcase/installation/SN_setup_case index 9b6ea5490..0593d88ea 100644 --- a/xCAT-test/autotest/testcase/installation/SN_setup_case +++ b/xCAT-test/autotest/testcase/installation/SN_setup_case @@ -7,12 +7,6 @@ check:rc==0 cmd:chtab key=nameservers site.value="" check:rc==0 -#cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$SN,vmstorage)__" =~ "phy" ]]; then rmvm $$SN -f -p && mkvm $$SN; else rmvm $$SN -f -p && mkvm $$SN -s 20G; fi;fi -#Add for debug rmvm issue -cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$SN kvm_nodedata; fi -check:rc==0 -cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$SN,vmstorage)__" =~ "phy" ]]; then rmvm $$SN -f -p ;mkvm $$SN; else rmvm $$SN -f -p;mkvm $$SN;rmvm $$SN -f -p;mkvm $$SN -s 20G; fi;fi -check:rc==0 cmd:makedns -n check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy index f9d36a595..8cb7b89d1 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_SN_installation_hierarchy @@ -3,10 +3,6 @@ os:Linux cmd:chtab key=nameservers site.value="" check:rc==0 -cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$SN kvm_nodedata; fi -check:rc==0 -#cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]];then rmvm $$SN -f -p && mkvm $$SN -s 40G; fi -cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$SN,vmstorage)__" =~ "phy" ]]; then rmvm $$SN -f -p; mkvm $$SN; else rmvm $$SN -f -p;mkvm $$SN;rmvm $$SN -f -p;mkvm $$SN -s 40G; fi;fi cmd:makedns -n check:rc==0 cmd:makeconservercf diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat index c99eb4aa0..130503f00 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat @@ -5,9 +5,6 @@ cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 -#cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi -check:rc=0 cmd:makedns -n check:rc==0 cmd:makeconservercf diff --git a/xCAT-test/autotest/testcase/installation/setup_vm b/xCAT-test/autotest/testcase/installation/setup_vm new file mode 100644 index 000000000..743f801e9 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/setup_vm @@ -0,0 +1,20 @@ +start:setup_vm +description:set up vm environment +cmd:var=`expr substr "__GETNODEATTR($$CN,vmstorage)__" 1 3`;echo $var;if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then rmvm $$CN -f -p;if [[ "$var" = "phy" ]]; then mkvm $$CN;exit $? ; elif [[ "$var" = "dir" ]];then mkvm $$CN ; rmvm $$CN -f -p ; mkvm $$CN -s 20G ;exit $? ;elif [ "$var" = "nfs" -o "$var" = "lvm" -o "$var" = "nfs" ];then echo "Need to fix me. ";exit 2;else echo "Could not surpport vmstorage.";exit 3;fi;fi +check:rc==0 +cmd:rpower $$CN on +check:rc==0 +cmd:rpower $$CN stat +check:output=~on +cmd:var=`expr substr "__GETNODEATTR($$SN,vmstorage)__" 1 3`;echo $var;if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" ];then rmvm $$SN -f -p;if [[ "$var" = "phy" ]]; then mkvm $$SN;exit $? ; elif [[ "$var" = "dir" ]];then mkvm $$SN ; rmvm $$SN -f -p ; mkvm $$SN -s 20G ;exit $? ;elif [ "$var" = "nfs" -o "$var" = "lvm" -o "$var" = "nfs" ];then echo "Need to fix me. ";exit 2;else echo "Could not surpport vmstorage.";exit 3;fi;fi +check:rc==0 +cmd:rpower $$SN on +check:rc==0 +cmd:rpower $$SN stat +check:output=~on +#Add for debug rmvm issue +cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then tabdump -w node==$$CN kvm_nodedata; fi +check:rc==0 +cmd:if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" ]; then tabdump -w node==$$SN kvm_nodedata; fi +check:rc==0 +end diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker index e6d948e68..4ce2ba2f6 100644 --- a/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker +++ b/xCAT-test/autotest/testcase/installation/ubuntu_full_installation_vm_docker @@ -2,11 +2,6 @@ start:Full_installation_flat_docker os:Linux cmd:copycds $$ISO check:rc==0 -cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi -check:rc==0 -#cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi -check:rc=0 cmd:makedns -n check:rc==0 cmd:makeconservercf From 5882a134c809f930a68da0679c6a7650e3c1dfef Mon Sep 17 00:00:00 2001 From: junxiawang Date: Fri, 23 Dec 2016 03:00:54 -0500 Subject: [PATCH 07/28] modify releating vm setup bundle and testcases --- xCAT-test/autotest/bundle/rhels6.7_x86_64.bundle | 1 + xCAT-test/autotest/bundle/rhels6.8_x86_64.bundle | 1 + xCAT-test/autotest/bundle/rhels7.2_ppc64le.bundle | 1 + xCAT-test/autotest/bundle/rhels7.2_x86_64.bundle | 1 + xCAT-test/autotest/bundle/rhels7.3_ppc64le.bundle | 1 + xCAT-test/autotest/bundle/rhels7.3_x86_64.bundle | 1 + xCAT-test/autotest/bundle/sles11.4_x86_64.bundle | 1 + xCAT-test/autotest/bundle/sles12.1_ppc64le.bundle | 1 + xCAT-test/autotest/bundle/sles12.1_x86_64.bundle | 1 + xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle | 1 + xCAT-test/autotest/bundle/sles12.2_x86_64.bundle | 1 + xCAT-test/autotest/bundle/sles12_ppc64le.bundle | 1 + xCAT-test/autotest/bundle/sles12_x86_64.bundle | 1 + xCAT-test/autotest/bundle/ubuntu14.04.3_ppc64le.bundle | 1 + xCAT-test/autotest/bundle/ubuntu14.04.3_x86_64.bundle | 1 + xCAT-test/autotest/bundle/ubuntu14.04.4_ppc64le.bundle | 1 + xCAT-test/autotest/bundle/ubuntu14.04.4_x86_64.bundle | 1 + xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle | 1 + xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle | 1 + xCAT-test/autotest/bundle/ubuntu16.04_ppc64le.bundle | 1 + xCAT-test/autotest/bundle/ubuntu16.04_x86_64.bundle | 1 + .../autotest/testcase/get_install_disk/fresh_install_disk | 4 ---- xCAT-test/autotest/testcase/get_install_disk/reinstall_disk | 2 -- xCAT-test/autotest/testcase/installation/setup_vm | 4 ++-- xCAT-test/autotest/testcase/migration/redhat_migration | 6 ------ xCAT-test/autotest/testcase/migration/sles_migration | 6 ------ .../testcase/xcatdebugmode/rhels_xcatdebugmode_diskful | 6 ------ .../testcase/xcatdebugmode/sles_xcatdebugmode_diskful | 4 ---- 28 files changed, 23 insertions(+), 30 deletions(-) diff --git a/xCAT-test/autotest/bundle/rhels6.7_x86_64.bundle b/xCAT-test/autotest/bundle/rhels6.7_x86_64.bundle index 49377b612..a7b7767d1 100644 --- a/xCAT-test/autotest/bundle/rhels6.7_x86_64.bundle +++ b/xCAT-test/autotest/bundle/rhels6.7_x86_64.bundle @@ -1,3 +1,4 @@ +setup_vm reg_linux_diskfull_installation_flat makehosts_h makehosts_help diff --git a/xCAT-test/autotest/bundle/rhels6.8_x86_64.bundle b/xCAT-test/autotest/bundle/rhels6.8_x86_64.bundle index 15676669e..1efa04506 100644 --- a/xCAT-test/autotest/bundle/rhels6.8_x86_64.bundle +++ b/xCAT-test/autotest/bundle/rhels6.8_x86_64.bundle @@ -1,3 +1,4 @@ +setup_vm reg_linux_diskfull_installation_flat go_xcat_local_repo_case7 go_xcat_noinput diff --git a/xCAT-test/autotest/bundle/rhels7.2_ppc64le.bundle b/xCAT-test/autotest/bundle/rhels7.2_ppc64le.bundle index bfbec794d..b59fd61ce 100644 --- a/xCAT-test/autotest/bundle/rhels7.2_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/rhels7.2_ppc64le.bundle @@ -1,3 +1,4 @@ +setup_vm Diskless_installation_flat_p8_le Full_installation_flat_p8_le go_xcat_local_repo_case7 diff --git a/xCAT-test/autotest/bundle/rhels7.2_x86_64.bundle b/xCAT-test/autotest/bundle/rhels7.2_x86_64.bundle index e5ff83cf1..60987c4ba 100644 --- a/xCAT-test/autotest/bundle/rhels7.2_x86_64.bundle +++ b/xCAT-test/autotest/bundle/rhels7.2_x86_64.bundle @@ -1,3 +1,4 @@ +setup_vm reg_linux_diskfull_installation_flat go_xcat_local_repo_case7 go_xcat_noinput diff --git a/xCAT-test/autotest/bundle/rhels7.3_ppc64le.bundle b/xCAT-test/autotest/bundle/rhels7.3_ppc64le.bundle index 27578b5ea..e5b2e18bf 100644 --- a/xCAT-test/autotest/bundle/rhels7.3_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/rhels7.3_ppc64le.bundle @@ -1,3 +1,4 @@ +setup_vm Diskless_installation_flat_p8_le Full_installation_flat_p8_le go_xcat_local_repo_case7 diff --git a/xCAT-test/autotest/bundle/rhels7.3_x86_64.bundle b/xCAT-test/autotest/bundle/rhels7.3_x86_64.bundle index f858555ad..b06475ed0 100644 --- a/xCAT-test/autotest/bundle/rhels7.3_x86_64.bundle +++ b/xCAT-test/autotest/bundle/rhels7.3_x86_64.bundle @@ -1,3 +1,4 @@ +setup_vm reg_linux_diskfull_installation_flat go_xcat_local_repo_case7 go_xcat_noinput diff --git a/xCAT-test/autotest/bundle/sles11.4_x86_64.bundle b/xCAT-test/autotest/bundle/sles11.4_x86_64.bundle index c4dbf5754..b0129f2f0 100644 --- a/xCAT-test/autotest/bundle/sles11.4_x86_64.bundle +++ b/xCAT-test/autotest/bundle/sles11.4_x86_64.bundle @@ -1,3 +1,4 @@ +setup_vm reg_linux_diskfull_installation_flat go_xcat_local_repo_case7 go_xcat_noinput diff --git a/xCAT-test/autotest/bundle/sles12.1_ppc64le.bundle b/xCAT-test/autotest/bundle/sles12.1_ppc64le.bundle index 469a3527c..8eba88837 100644 --- a/xCAT-test/autotest/bundle/sles12.1_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/sles12.1_ppc64le.bundle @@ -1,3 +1,4 @@ +setup_vm Diskless_installation_flat_p8_le Full_installation_flat_p8_le go_xcat_local_repo_case7 diff --git a/xCAT-test/autotest/bundle/sles12.1_x86_64.bundle b/xCAT-test/autotest/bundle/sles12.1_x86_64.bundle index 225f6cdad..3efef26d7 100644 --- a/xCAT-test/autotest/bundle/sles12.1_x86_64.bundle +++ b/xCAT-test/autotest/bundle/sles12.1_x86_64.bundle @@ -1,3 +1,4 @@ +setup_vm reg_linux_diskfull_installation_flat go_xcat_local_repo_case7 go_xcat_noinput diff --git a/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle b/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle index 469a3527c..8eba88837 100644 --- a/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/sles12.2_ppc64le.bundle @@ -1,3 +1,4 @@ +setup_vm Diskless_installation_flat_p8_le Full_installation_flat_p8_le go_xcat_local_repo_case7 diff --git a/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle b/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle index 225f6cdad..3efef26d7 100644 --- a/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle +++ b/xCAT-test/autotest/bundle/sles12.2_x86_64.bundle @@ -1,3 +1,4 @@ +setup_vm reg_linux_diskfull_installation_flat go_xcat_local_repo_case7 go_xcat_noinput diff --git a/xCAT-test/autotest/bundle/sles12_ppc64le.bundle b/xCAT-test/autotest/bundle/sles12_ppc64le.bundle index e362196b8..31b05bf80 100644 --- a/xCAT-test/autotest/bundle/sles12_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/sles12_ppc64le.bundle @@ -1,3 +1,4 @@ +setup_vm Diskless_installation_flat_p8_le Full_installation_flat_p8_le makehosts_h diff --git a/xCAT-test/autotest/bundle/sles12_x86_64.bundle b/xCAT-test/autotest/bundle/sles12_x86_64.bundle index 241612a0e..91afe00d7 100644 --- a/xCAT-test/autotest/bundle/sles12_x86_64.bundle +++ b/xCAT-test/autotest/bundle/sles12_x86_64.bundle @@ -1,3 +1,4 @@ +setup_vm reg_linux_diskfull_installation_flat makehosts_h makehosts_help diff --git a/xCAT-test/autotest/bundle/ubuntu14.04.3_ppc64le.bundle b/xCAT-test/autotest/bundle/ubuntu14.04.3_ppc64le.bundle index 4c1d1b7bd..9aecea63a 100644 --- a/xCAT-test/autotest/bundle/ubuntu14.04.3_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/ubuntu14.04.3_ppc64le.bundle @@ -1,3 +1,4 @@ +setup_vm Diskless_installation_flat_p8_le Full_installation_flat_p8_le makehosts_h diff --git a/xCAT-test/autotest/bundle/ubuntu14.04.3_x86_64.bundle b/xCAT-test/autotest/bundle/ubuntu14.04.3_x86_64.bundle index 2bfb17f88..b714108f4 100644 --- a/xCAT-test/autotest/bundle/ubuntu14.04.3_x86_64.bundle +++ b/xCAT-test/autotest/bundle/ubuntu14.04.3_x86_64.bundle @@ -1,3 +1,4 @@ +setup_vm Ubuntu_diskless_installation_flat_x86_vm Ubuntu_full_installation_flat_x86_vm makehosts_h diff --git a/xCAT-test/autotest/bundle/ubuntu14.04.4_ppc64le.bundle b/xCAT-test/autotest/bundle/ubuntu14.04.4_ppc64le.bundle index c49e45be8..714b7c4a4 100644 --- a/xCAT-test/autotest/bundle/ubuntu14.04.4_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/ubuntu14.04.4_ppc64le.bundle @@ -1,3 +1,4 @@ +setup_vm Diskless_installation_flat_p8_le Full_installation_flat_p8_le go_xcat_local_repo_case7 diff --git a/xCAT-test/autotest/bundle/ubuntu14.04.4_x86_64.bundle b/xCAT-test/autotest/bundle/ubuntu14.04.4_x86_64.bundle index 9c4309d93..a260e16b7 100644 --- a/xCAT-test/autotest/bundle/ubuntu14.04.4_x86_64.bundle +++ b/xCAT-test/autotest/bundle/ubuntu14.04.4_x86_64.bundle @@ -1,3 +1,4 @@ +setup_vm Ubuntu_diskless_installation_flat_x86_vm Ubuntu_full_installation_flat_x86_vm go_xcat_local_repo_case7 diff --git a/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle b/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle index 09b1af592..154fb92c9 100644 --- a/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/ubuntu16.04.1_ppc64le.bundle @@ -1,3 +1,4 @@ +setup_vm Diskless_installation_flat_p8_le Full_installation_flat_p8_le go_xcat_local_repo_case7 diff --git a/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle b/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle index 5caa4de79..bbbfa0091 100644 --- a/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle +++ b/xCAT-test/autotest/bundle/ubuntu16.04.1_x86_64.bundle @@ -1,3 +1,4 @@ +setup_vm Ubuntu_diskless_installation_flat_x86_vm Ubuntu_full_installation_flat_x86_vm go_xcat_local_repo_case7 diff --git a/xCAT-test/autotest/bundle/ubuntu16.04_ppc64le.bundle b/xCAT-test/autotest/bundle/ubuntu16.04_ppc64le.bundle index 6a8bad79a..db2beed03 100644 --- a/xCAT-test/autotest/bundle/ubuntu16.04_ppc64le.bundle +++ b/xCAT-test/autotest/bundle/ubuntu16.04_ppc64le.bundle @@ -1,3 +1,4 @@ +setup_vm Diskless_installation_flat_p8_le Full_installation_flat_p8_le go_xcat_local_repo_case7 diff --git a/xCAT-test/autotest/bundle/ubuntu16.04_x86_64.bundle b/xCAT-test/autotest/bundle/ubuntu16.04_x86_64.bundle index ec034a3af..07491602a 100644 --- a/xCAT-test/autotest/bundle/ubuntu16.04_x86_64.bundle +++ b/xCAT-test/autotest/bundle/ubuntu16.04_x86_64.bundle @@ -1,3 +1,4 @@ +setup_vm Ubuntu_diskless_installation_flat_x86_vm Ubuntu_full_installation_flat_x86_vm go_xcat_local_repo_case7 diff --git a/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk b/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk index b79bab100..fd5726b35 100644 --- a/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk +++ b/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk @@ -3,10 +3,6 @@ os:Linux description:check fresh install disk, usded for x86 multi disk only, and not check RH7.2 for RH os wwn isue. cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=100" -cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=300 seek=60858" -cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata |grep -i $$CN; fi -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi -check:rc=0 cmd:makedns -n check:rc==0 cmd:makeconservercf diff --git a/xCAT-test/autotest/testcase/get_install_disk/reinstall_disk b/xCAT-test/autotest/testcase/get_install_disk/reinstall_disk index b9fb12825..e3772b453 100644 --- a/xCAT-test/autotest/testcase/get_install_disk/reinstall_disk +++ b/xCAT-test/autotest/testcase/get_install_disk/reinstall_disk @@ -4,8 +4,6 @@ description:check reinstall disk, usded for x86 multi disk only, and not check R cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=100" cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=300 seek=60858" -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi -check:rc=0 cmd:makedns -n check:rc==0 cmd:makeconservercf diff --git a/xCAT-test/autotest/testcase/installation/setup_vm b/xCAT-test/autotest/testcase/installation/setup_vm index 743f801e9..7e02d8fb4 100644 --- a/xCAT-test/autotest/testcase/installation/setup_vm +++ b/xCAT-test/autotest/testcase/installation/setup_vm @@ -1,12 +1,12 @@ start:setup_vm description:set up vm environment -cmd:var=`expr substr "__GETNODEATTR($$CN,vmstorage)__" 1 3`;echo $var;if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then rmvm $$CN -f -p;if [[ "$var" = "phy" ]]; then mkvm $$CN;exit $? ; elif [[ "$var" = "dir" ]];then mkvm $$CN ; rmvm $$CN -f -p ; mkvm $$CN -s 20G ;exit $? ;elif [ "$var" = "nfs" -o "$var" = "lvm" -o "$var" = "nfs" ];then echo "Need to fix me. ";exit 2;else echo "Could not surpport vmstorage.";exit 3;fi;fi +cmd:var=`expr substr "__GETNODEATTR($$CN,vmstorage)__" 1 3`;echo $var;if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then rmvm $$CN -f -p;if [[ "$var" = "phy" ]]; then mkvm $$CN;exit $? ; elif [[ "$var" = "dir" ]];then mkvm $$CN ; rmvm $$CN -f -p ; mkvm $$CN -s 20G ;exit $? ;elif [ "$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me. ";exit 2;else echo "Could not surpport vmstorage.";exit 3;fi;fi check:rc==0 cmd:rpower $$CN on check:rc==0 cmd:rpower $$CN stat check:output=~on -cmd:var=`expr substr "__GETNODEATTR($$SN,vmstorage)__" 1 3`;echo $var;if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" ];then rmvm $$SN -f -p;if [[ "$var" = "phy" ]]; then mkvm $$SN;exit $? ; elif [[ "$var" = "dir" ]];then mkvm $$SN ; rmvm $$SN -f -p ; mkvm $$SN -s 20G ;exit $? ;elif [ "$var" = "nfs" -o "$var" = "lvm" -o "$var" = "nfs" ];then echo "Need to fix me. ";exit 2;else echo "Could not surpport vmstorage.";exit 3;fi;fi +cmd:var=`expr substr "__GETNODEATTR($$SN,vmstorage)__" 1 3`;echo $var;if [ "__GETNODEATTR($$SN,arch)__" != "ppc64" -a "__GETNODEATTR($$SN,mgt)__" != "ipmi" ];then rmvm $$SN -f -p;if [[ "$var" = "phy" ]]; then mkvm $$SN;exit $? ; elif [[ "$var" = "dir" ]];then mkvm $$SN ; rmvm $$SN -f -p ; mkvm $$SN -s 20G ;exit $? ;elif [ "$var" = "nfs" -o "$var" = "lvm" ];then echo "Need to fix me. ";exit 2;else echo "Could not surpport vmstorage.";exit 3;fi;fi check:rc==0 cmd:rpower $$SN on check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/redhat_migration b/xCAT-test/autotest/testcase/migration/redhat_migration index a5fad7718..58ffdfd42 100644 --- a/xCAT-test/autotest/testcase/migration/redhat_migration +++ b/xCAT-test/autotest/testcase/migration/redhat_migration @@ -5,9 +5,6 @@ description:update xCAT from $$MIGRATION1_VERSION to $$LATEST_VERSION, these two #cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi #cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN #check:rc==0 -cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi -check:rc==0 -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 cmd:makedns -n @@ -116,9 +113,6 @@ stop:yes #cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi #cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN #check:rc==0 -cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi -check:rc==0 -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 cmd:makedns -n diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index a41e56828..1117af3a0 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -5,9 +5,6 @@ description:update xCAT from $$MIGRATION1_VERSION to $$LATEST_VERSION, these two #cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi #cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN #check:rc==0 -cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi -check:rc==0 -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 cmd:makedns -n @@ -118,9 +115,6 @@ description:update xCAT from $$MIGRATION22VERSION to $$LATEST_VERSION, these two #cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi #cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN #check:rc==0 -cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi -check:rc==0 -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p; mkvm $$CN; else rmvm $$CN -f -p;mkvm $$CN;rmvm $$CN -f -p;mkvm $$CN -s 20G; fi;fi cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 cmd:makedns -n diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful index 9e5bd01d9..5bd9dcfaf 100644 --- a/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful +++ b/xCAT-test/autotest/testcase/xcatdebugmode/rhels_xcatdebugmode_diskful @@ -4,8 +4,6 @@ description:site.xcatdebugmode value is 0, the following logs will be shown and cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi -check:rc=0 cmd:makedns -n check:rc==0 cmd:makeconservercf @@ -68,8 +66,6 @@ check:rc==0 cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi -check:rc=0 cmd:makedns -n check:rc==0 cmd:makeconservercf @@ -161,8 +157,6 @@ check:rc==0 cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi -check:rc=0 cmd:makedns -n check:rc==0 cmd:makeconservercf diff --git a/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful b/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful index 3ba3a5bca..91607411a 100644 --- a/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful +++ b/xCAT-test/autotest/testcase/xcatdebugmode/sles_xcatdebugmode_diskful @@ -5,8 +5,6 @@ description:site.xcatdebugmode value is 0, the following logs will be shown and cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi -check:rc=0 cmd:makedns -n check:rc==0 cmd:makeconservercf @@ -78,8 +76,6 @@ check:rc==0 cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 -cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi -check:rc=0 cmd:makedns -n check:rc==0 cmd:makeconservercf From bb0161da610607cea9701752eca1227e06d0c151 Mon Sep 17 00:00:00 2001 From: junxiawang Date: Fri, 23 Dec 2016 05:07:39 -0500 Subject: [PATCH 08/28] mistake for delete during update vm testcases --- xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk | 1 + 1 file changed, 1 insertion(+) diff --git a/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk b/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk index fd5726b35..7252bf97f 100644 --- a/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk +++ b/xCAT-test/autotest/testcase/get_install_disk/fresh_install_disk @@ -3,6 +3,7 @@ os:Linux description:check fresh install disk, usded for x86 multi disk only, and not check RH7.2 for RH os wwn isue. cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=100" +cmd:xdsh $$CN "dd if=/dev/zero of=/dev/sdb bs=1048576 count=300 seek=60858" cmd:makedns -n check:rc==0 cmd:makeconservercf From 4f771e3dc3441bd763614987d8f873265667f390 Mon Sep 17 00:00:00 2001 From: immarvin Date: Thu, 10 Nov 2016 22:34:56 -0500 Subject: [PATCH 09/28] refine the cumulus support doc --- .../edgecore_switches/edgecore_switches.rst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst b/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst index db9a3cc11..63b60c24c 100644 --- a/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst +++ b/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst @@ -1,7 +1,18 @@ Edgecore Switch =============== -The Edgecore switch from Mellanox is 1Gb top-of-rack switch. It's coming with ONIE installer. Open Network Install Environment (ONIE)is an open source initiative that defines an open "install environment" for bare metal network switches. For more information, see http://onie.opencompute.org/. Mellanox will ship the switch with Cumulus Network OS and along with a license file installed. In some case, user may get whitebox without OS and licenses. Since edgecore switch has different configuration than other switches that xCAT supports, xCAT handles edgecore switch differently. +The Edgecore switch from Mellanox is 1Gb top-of-rack switch. Usually, Mellanox ships the switch with Cumulus Network OS(https://cumulusnetworks.com) and along with a license file installed. In some case, user may get whitebox switch hardware without OS and license installed. Since edgecore switch is different from other traditional switches that xCAT supports, xCAT supports edgecore switch in a different way. Currently, the features provided by xCAT includes: :: + + 1) Cumulus Network OS provision + 2) switch discovery + 3) switch configuration: + (a) enable root-passwordless ssh + (b) install licence file + (c) enable snmp + 4) distribute files with ``xdcp`` + 5) invoke commands or scripts remotely with `xdsh`` + 6) + ONIE Mode From 2e1e2732670de8c8ad50981d6331d68ed82b8f42 Mon Sep 17 00:00:00 2001 From: immarvin Date: Tue, 15 Nov 2016 02:27:58 -0500 Subject: [PATCH 10/28] refine cumulus support doc --- .../edgecore_switches/edgecore_switches.rst | 20 +++++++++++++++---- .../objects/node/cumulusswitch.stanza | 6 +++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst b/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst index 63b60c24c..31e1bd238 100644 --- a/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst +++ b/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst @@ -1,7 +1,9 @@ Edgecore Switch =============== -The Edgecore switch from Mellanox is 1Gb top-of-rack switch. Usually, Mellanox ships the switch with Cumulus Network OS(https://cumulusnetworks.com) and along with a license file installed. In some case, user may get whitebox switch hardware without OS and license installed. Since edgecore switch is different from other traditional switches that xCAT supports, xCAT supports edgecore switch in a different way. Currently, the features provided by xCAT includes: :: +The Edgecore switch from Mellanox is 1Gb top-of-rack switch. Usually, Mellanox ships the switch with Cumulus Network OS(https://cumulusnetworks.com) and along with a license file installed. In some case, user may get whitebox switch hardware without OS and license installed. + +Since edgecore switch is different from other traditional switches that xCAT supports, xCAT supports edgecore switch in a different way. Currently, the features provided by xCAT include: :: 1) Cumulus Network OS provision 2) switch discovery @@ -9,11 +11,21 @@ The Edgecore switch from Mellanox is 1Gb top-of-rack switch. Usually, Mellanox s (a) enable root-passwordless ssh (b) install licence file (c) enable snmp - 4) distribute files with ``xdcp`` - 5) invoke commands or scripts remotely with `xdsh`` - 6) + 4) distribute files to switches with ``xdcp`` + 5) invoke remote commands or scripts on switches with `xdsh`` + 6) configure switches with ``updatenode`` + +This documentation presents a typical workflow on how to setup a edgecore switch from white box, then configure and manage the switch with xCAT. +Create a edgecore switch object +------------------------------- + +If you have the information of the ip and mac information of the switch, the edgecore switch object definition can be created with the "cumulusswitch" template shipped in xCAT : :: + + mkdef edgecoresw1 --template cumulusswitch arch=armv71 ip=192.168.5.191 mac=8C:EA:1B:12:CA:40 + +Discover the switch ONIE Mode --------- diff --git a/xCAT/templates/objects/node/cumulusswitch.stanza b/xCAT/templates/objects/node/cumulusswitch.stanza index 48575c911..cff7d05ac 100644 --- a/xCAT/templates/objects/node/cumulusswitch.stanza +++ b/xCAT/templates/objects/node/cumulusswitch.stanza @@ -4,11 +4,11 @@ cumulusswitch: objtype=node arch="OPTIONAL: the arch of the switch management service processor, such as armv71" groups=switch - ip="MANDATORY:the ip address of the management interface" - mac="MANDATORY:the mac of the management interface" + ip="OPTIONAL:the ip address of the management interface" + mac="OPTIONAL:the mac of the management interface" mgt=switch netboot=onie nodetype=switch - switchtype="OPTIONAL: the manufacturer of switch" + switchtype=edgecore provmethod="OPTIONAL: the full path of the cumulus installer" usercomment="the template for cumulus switch definition" From 8ec1af2f0c07e09cad8644708b04a18d9c099e5d Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Fri, 23 Dec 2016 03:26:48 -0500 Subject: [PATCH 11/28] remove setupntp for sles12.1 ntpd doesn't synchronize to local clock anymore in version 4.2.8p4. see#2248 --- .../testcase/installation/Full_installation_flat_p8_le | 3 ++- .../testcase/installation/reg_linux_diskfull_installation_flat | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/installation/Full_installation_flat_p8_le b/xCAT-test/autotest/testcase/installation/Full_installation_flat_p8_le index 0b7779db2..107da18b7 100644 --- a/xCAT-test/autotest/testcase/installation/Full_installation_flat_p8_le +++ b/xCAT-test/autotest/testcase/installation/Full_installation_flat_p8_le @@ -24,7 +24,8 @@ cmd:makeconservercf $$CN check:rc==0 cmd:cat /etc/conserver.cf | grep $$CN check:output=~$$CN -cmd:chdef -t node -o $$CN postscripts=setupntp +cmd:if [ "__GETNODEATTR($$CN,os)__" != "sles12.1" ];then chdef -t node -o $$CN postscripts=setupntp; fi +cmd:lsdef -l $$CN check:rc==0 cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat index 130503f00..0800aa5d7 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat @@ -29,7 +29,8 @@ cmd:a=0;while true; do [ $a -eq 100 ] && exit 1;output=$(makedhcp -q $$CN);[ $? check:rc==0 cmd:copycds $$ISO check:rc==0 -cmd:chdef -t node -o $$CN postscripts=setupntp +cmd:if [ "__GETNODEATTR($$CN,os)__" != "sles12.1" ];then chdef -t node -o $$CN postscripts=setupntp; fi +cmd:lsdef -l $$CN check:rc==0 cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute check:rc==0 From 1ff745dbfef7ce7ed6a367ef08b3b50bf975e416 Mon Sep 17 00:00:00 2001 From: ypbj Date: Wed, 14 Dec 2016 02:48:10 -0500 Subject: [PATCH 12/28] fix copycds can't auto copycd centos iso --- xCAT-server/lib/xcat/plugins/anaconda.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 6decce701..4cdf82c10 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -2266,6 +2266,20 @@ sub copycd } close($dinfo); } + elsif ($desc =~ /^[\d\.]+$/) + { + open($dinfo, $mntpath . "/.treeinfo"); + while (<$dinfo>) { + chomp($_); + s/\s+$//; #remove trailing spaces + next if /^\s*$/; #-- skip empty lines + if ($_ =~ /family\s*=\s*CentOS/i) { + $distname = "centos" . $desc; + last; + } + } + close($dinfo); + } else { print "INFO - Could not auto-detect operating system.\n"; From a8522a97316871ef177362ab1a181186ae034dd8 Mon Sep 17 00:00:00 2001 From: ypbj Date: Mon, 26 Dec 2016 21:24:01 -0500 Subject: [PATCH 13/28] update man page for copycds --- docs/source/guides/admin-guides/references/man8/copycds.8.rst | 2 +- xCAT-client/pods/man8/copycds.8.pod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/guides/admin-guides/references/man8/copycds.8.rst b/docs/source/guides/admin-guides/references/man8/copycds.8.rst index a5ba210ec..37c399113 100644 --- a/docs/source/guides/admin-guides/references/man8/copycds.8.rst +++ b/docs/source/guides/admin-guides/references/man8/copycds.8.rst @@ -35,7 +35,7 @@ The \ **copycds**\ command copies all contents of Distribution DVDs/ISOs or Ser You can specify \ **-i**\ or \ **-**\ **-inspection**\ option to check whether the DVDs/ISOs can be recognized by xCAT. If recognized, the distribution name, architecture and the disc no (the disc sequence number of DVDs/ISOs in multi-disk distribution) of the DVD/ISO is displayed. If xCAT doesn't recognize the DVD/ISO, you must manually specify the distro name and architecture using the \ **-n**\ and \ **-a**\ options. This is sometimes the case for distros that have very recently been released, and the xCAT code hasn't been updated for it yet. -You can get xCAT to recognize new DVDs/ISOs by adding them to /opt/xcat/lib/perl/xCAT/data/discinfo.pm and reloading xcatd (\ **service xcatd reload**\ ). +You can get xCAT to recognize new DVDs/ISOs by adding them to /opt/xcat/lib/perl/xCAT/data/discinfo.pm (the key of the hash is the first line of .discinfo) and reloading xcatd (\ **service xcatd reload**\ ). ******* diff --git a/xCAT-client/pods/man8/copycds.8.pod b/xCAT-client/pods/man8/copycds.8.pod index 234c1e375..23a6af93e 100644 --- a/xCAT-client/pods/man8/copycds.8.pod +++ b/xCAT-client/pods/man8/copycds.8.pod @@ -16,7 +16,7 @@ The B command copies all contents of Distribution DVDs/ISOs or Service You can specify B<-i> or B<--inspection> option to check whether the DVDs/ISOs can be recognized by xCAT. If recognized, the distribution name, architecture and the disc no (the disc sequence number of DVDs/ISOs in multi-disk distribution) of the DVD/ISO is displayed. If xCAT doesn't recognize the DVD/ISO, you must manually specify the distro name and architecture using the B<-n> and B<-a> options. This is sometimes the case for distros that have very recently been released, and the xCAT code hasn't been updated for it yet. -You can get xCAT to recognize new DVDs/ISOs by adding them to /opt/xcat/lib/perl/xCAT/data/discinfo.pm and reloading xcatd (B). +You can get xCAT to recognize new DVDs/ISOs by adding them to /opt/xcat/lib/perl/xCAT/data/discinfo.pm (the key of the hash is the first line of .discinfo) and reloading xcatd (B). =head1 OPTIONS From 327db76f9e49b3bb0136b19f94e2e20815489868 Mon Sep 17 00:00:00 2001 From: neo954 Date: Wed, 23 Nov 2016 00:36:08 -0600 Subject: [PATCH 14/28] Make all the deb packages have the exactly same version and release numbers --- build-ubunturepo | 64 ++++++++++++--------- perl-xCAT/debian/compat | 2 +- perl-xCAT/debian/control | 7 ++- perl-xCAT/debian/rules | 6 +- xCAT-IBMhpc/debian/compat | 2 +- xCAT-IBMhpc/debian/control | 14 ++--- xCAT-IBMhpc/debian/rules | 6 +- xCAT-OpenStack-baremetal/debian/compat | 2 +- xCAT-OpenStack-baremetal/debian/control | 8 +-- xCAT-OpenStack/debian/compat | 2 +- xCAT-OpenStack/debian/control | 12 ++-- xCAT-UI/debian/compat | 2 +- xCAT-UI/debian/control | 11 ++-- xCAT-UI/debian/rules | 5 +- xCAT-buildkit/debian/compat | 2 +- xCAT-buildkit/debian/control | 8 +-- xCAT-buildkit/debian/rules | 4 -- xCAT-client/debian/compat | 2 +- xCAT-client/debian/control | 12 ++-- xCAT-client/debian/rules | 6 +- xCAT-genesis-builder/debian/compat | 2 +- xCAT-genesis-builder/debian/control | 8 +-- xCAT-genesis-scripts/debian/compat | 2 +- xCAT-genesis-scripts/debian/control-amd64 | 19 +++--- xCAT-genesis-scripts/debian/control-ppc64el | 13 +++-- xCAT-probe/debian/compat | 2 +- xCAT-probe/debian/control | 6 +- xCAT-probe/debian/rules | 6 +- xCAT-rmc/debian/compat | 2 +- xCAT-rmc/debian/control | 6 +- xCAT-rmc/debian/rules | 6 +- xCAT-server/debian/compat | 2 +- xCAT-server/debian/control | 14 +++-- xCAT-server/debian/install | 1 - xCAT-server/debian/rules | 3 +- xCAT-test/debian/compat | 2 +- xCAT-test/debian/control | 9 ++- xCAT-test/debian/rules | 6 +- xCAT-vlan/debian/compat | 2 +- xCAT-vlan/debian/control | 9 ++- xCAT-vlan/debian/rules | 2 + xCAT/debian/compat | 2 +- xCAT/debian/control | 28 +++++++-- xCAT/debian/rules | 6 +- xCATsn/debian/compat | 2 +- xCATsn/debian/control | 13 +++-- xCATsn/debian/rules | 6 +- 47 files changed, 181 insertions(+), 175 deletions(-) diff --git a/build-ubunturepo b/build-ubunturepo index b4220b4a6..8379d8201 100755 --- a/build-ubunturepo +++ b/build-ubunturepo @@ -4,7 +4,7 @@ # Author: Leonardo Tonetto (tonetto@linux.vnet.ibm.com) # Revisor: Arif Ali (aali@ocf.co.uk) # -# +# # Getting Started: # - Clone the xcat-core git repository int a directory called /src/xcat-core, where # is the same name as the release dir it is uploaded to xcat.org (e.g devel, 2.9, 2.10) @@ -15,21 +15,21 @@ # PROMOTE=1 - if the attribute "PROMOTE" is specified, means an official dot release. This does not # actually build xcat, just uploads the most recent snap build to http://xcat.org/files/xcat/ . # If not specified, a snap build is assumed, which uploads to https://xcat.org/files/xcat/ -# PREGA=1 - use this option with PROMOTE=1 on a branch that already has a released dot release, but this -# build is a GA candidate build, not to be released yet. This will result in the tarball +# PREGA=1 - use this option with PROMOTE=1 on a branch that already has a released dot release, but this +# build is a GA candidate build, not to be released yet. This will result in the tarball # being uploaded to http://xcat.org/files/xcat/repos/apt -# (but the tarball file name will be like a released tarball, not a snap build). +# (but the tarball file name will be like a released tarball, not a snap build). # When you are ready to release this build, use PROMOTE=1 without PREGA -# BUILDALL=1 - build all rpms, whether they changed or not. Should be used for snap builds that are in +# BUILDALL=1 - build all rpms, whether they changed or not. Should be used for snap builds that are in # prep for a release. # UP=0 or UP=1 - override the default upload behavior # LOG= - provide an LOG file option to redirect some output into log file # -# For the dependency packages 1. All the xcat dependency deb packages should be uploaded to +# For the dependency packages 1. All the xcat dependency deb packages should be uploaded to # "pokgsa/projects/x/xcat/build/ubuntu/xcat-dep/debs/" on GSA # 2. run ./build-ubunturepo -d # -# 3. the built xcat-dep deb packages tarball can be found in "../../xcat-dep" +# 3. the built xcat-dep deb packages tarball can be found in "../../xcat-dep" # related to the path of this script ############################ printusage() @@ -39,10 +39,10 @@ printusage() echo " -d : Create the xcat-dep repo." } # For the purpose of getting the distribution name -if [[ ! -f /etc/lsb-release ]]; then +if [[ ! -f /etc/lsb-release ]]; then echo "ERROR: Could not find /etc/lsb-release, is this script executed on a Ubuntu machine?" exit 1 -fi +fi . /etc/lsb-release # Check the necessary packages before starting the build @@ -84,7 +84,7 @@ do r) r_flag=1 genesis_rpm_path="$OPTARG" ;; - ?) printusage + ?) printusage exit 2 ;; esac @@ -129,7 +129,7 @@ fi export HOME=/root WGET_CMD="wget" -if [ ! -z ${LOG} ]; then +if [ ! -z ${LOG} ]; then WGET_CMD="wget -o ${LOG}" fi @@ -211,13 +211,13 @@ then build_string="Snap_Build" cur_date=`date +%Y%m%d%H%M` pkg_version="${ver}-${pkg_type}${cur_date}" - + if [ ! -d ../../$package_dir_name ];then mkdir -p "../../$package_dir_name" fi packages="xCAT-client xCAT-genesis-scripts perl-xCAT xCAT-server xCAT xCATsn xCAT-test xCAT-buildkit xCAT-vlan xCAT-confluent xCAT-probe" target_archs=(amd64 ppc64el) - for file in `echo $packages` + for file in $packages do file_low=`echo $file | tr '[A-Z]' '[a-z]'` if [ "$file" = "xCAT" -o "$file" = "xCAT-genesis-scripts" ]; then @@ -225,7 +225,7 @@ then else target_archs="all" fi - for target_arch in `echo $target_archs` + for target_arch in $target_archs do if grep -q $file $update_log || [ "$BUILDALL" == 1 -o "$file" = "perl-xCAT" ]; then rm -f ../../$package_dir_name/${file_low}_*.$target_arch.deb @@ -245,18 +245,28 @@ then cp -f ${CURDIR}/../perl-xCAT/xCAT/GlobalDef.pm ${CURDIR}/lib/perl/xCAT/ cp -f ${CURDIR}/../perl-xCAT/xCAT/ServiceNodeUtils.pm ${CURDIR}/lib/perl/xCAT/ fi - dpkg-buildpackage -uc -us + CURDIR=$(pwd) + cp ${CURDIR}/debian/control ${CURDIR}/debian/control.save.998 + # Magic string used here + sed -i -e "s#>= 2.13-snap000000000000#= ${pkg_version}#g" ${CURDIR}/debian/control + dpkg-buildpackage -rfakeroot -uc -us + mv ${CURDIR}/debian/control.save.998 ${CURDIR}/debian/control else if [ "$file" = "xCAT-genesis-scripts" ]; then CURDIR=$(pwd) - echo "Rename control file to build pkg: mv ${CURDIR}/debian/control-${target_arch} ${CURDIR}/debian/control" - mv ${CURDIR}/debian/control-${target_arch} ${CURDIR}/debian/control + echo "Rename control file to build pkg: cp ${CURDIR}/debian/control-${target_arch} ${CURDIR}/debian/control" + cp ${CURDIR}/debian/control-${target_arch} ${CURDIR}/debian/control fi - dpkg-buildpackage -uc -us -a$target_arch + CURDIR=$(pwd) + cp ${CURDIR}/debian/control ${CURDIR}/debian/control.save.998 + # Magic string used here + sed -i -e "s#>= 2.13-snap000000000000#= ${pkg_version}#g" ${CURDIR}/debian/control + dpkg-buildpackage -rfakeroot -uc -us -a$target_arch + mv ${CURDIR}/debian/control.save.998 ${CURDIR}/debian/control if [ "$file" = "xCAT-genesis-scripts" ]; then CURDIR=$(pwd) echo "Move control file back: mv ${CURDIR}/debian/control ${CURDIR}/debian/control-${target_arch}" - mv ${CURDIR}/debian/control ${CURDIR}/debian/control-${target_arch} + rm ${CURDIR}/debian/control fi fi rc=$? @@ -317,7 +327,7 @@ Label: xcat-core bazaar repository Codename: $dist Architectures: $tmp_out_arch Components: main -Description: Repository automatically genereted conf +Description: Repository automatically genereted conf SignWith: yes __EOF__ @@ -357,12 +367,12 @@ __EOF__ chmod 775 mklocalrepo.sh - #create the xcat-core.list file + #create the xcat-core.list file cd ../ if ! grep xcat /etc/group ; then groupadd xcat - fi + fi chgrp -R root xcat-core chmod -R g+w xcat-core @@ -388,7 +398,7 @@ then #the path of ubuntu xcat-dep deb packages on GSA GSA="/gsa/pokgsa/projects/x/xcat/build/ubuntu/xcat-dep" - + if [ ! -d $GSA ]; then echo "build-ubunturepo: It appears that you do not have gsa installed to access the xcat-dep pkgs." exit 1; @@ -400,10 +410,10 @@ then echo "Syncing RPMs from $GSA/ to $local_dep_repo_path/../ ..." rsync -ilrtpu --delete $GSA/ $local_dep_repo_path/../ - if [ $? -ne 0 ]; then + if [ $? -ne 0 ]; then echo "Error from rsync, cannot continue!" exit 1 - fi + fi #clean all old files if [ -e $local_dep_repo_path ];then @@ -427,7 +437,7 @@ Label: xcat-dep bazaar repository Codename: $dist Architectures: $tmp_out_arch Components: main -Description: Repository automatically genereted conf +Description: Repository automatically genereted conf SignWith: yes __EOF__ @@ -482,7 +492,7 @@ __EOF__ chmod g+w $dep_tar_name # Decide whether to upload or not (default NOT to upload) - if [ "$UP" != "1" ]; then + if [ "$UP" != "1" ]; then echo "Upload not specified, Done! (rerun with UP=1, to upload)" cd $old_pwd exit 0 diff --git a/perl-xCAT/debian/compat b/perl-xCAT/debian/compat index 7ed6ff82d..ec635144f 100644 --- a/perl-xCAT/debian/compat +++ b/perl-xCAT/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/perl-xCAT/debian/control b/perl-xCAT/debian/control index 5222978b0..cd7877d24 100644 --- a/perl-xCAT/debian/control +++ b/perl-xCAT/debian/control @@ -2,12 +2,13 @@ Source: perl-xcat Section: libs Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 5), libsoap-lite-perl, libdbi-perl -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 9), libsoap-lite-perl, libdbi-perl +Standards-Version: 3.9.4 +Homepage: https://xcat.org/ Package: perl-xcat Architecture: all -Depends: ${perl:Depends} +Depends: ${perl:Depends} Description: xCAT perl libraries Provides perl xCAT libraries for core functionality. Required for all xCAT installations. Includes xCAT::Table, xCAT::NodeRange, among others. diff --git a/perl-xCAT/debian/rules b/perl-xCAT/debian/rules index e5a0aa6fd..763812bba 100755 --- a/perl-xCAT/debian/rules +++ b/perl-xCAT/debian/rules @@ -9,9 +9,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=5 - - build: dh_testdir ./db2man @@ -27,7 +24,6 @@ install: dh_installdirs dh_install -X".svn" - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. @@ -36,7 +32,7 @@ binary-indep: build install binary-arch: build install dh_testdir dh_testroot - dh_installchangelogs + dh_installchangelogs dh_installdocs # dh_installexamples dh_install -X".svn" diff --git a/xCAT-IBMhpc/debian/compat b/xCAT-IBMhpc/debian/compat index 7ed6ff82d..ec635144f 100644 --- a/xCAT-IBMhpc/debian/compat +++ b/xCAT-IBMhpc/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/xCAT-IBMhpc/debian/control b/xCAT-IBMhpc/debian/control index 38a06c9af..2bdffb1be 100644 --- a/xCAT-IBMhpc/debian/control +++ b/xCAT-IBMhpc/debian/control @@ -2,14 +2,14 @@ Source: xcat-ibmhpc Section: admin Priority: extra Maintainer: Arif Ali -Build-Depends: debhelper (>= 5) -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 Package: xcat-ibmhpc Architecture: all -Depends: ${perl:Depends}, perl-xcat (>= 2.8.0), xcat-client (>= 2.8.0) -Description: Install and configuration utilities for IBM HPC products in an xCAT cluster - xCAT-IBMhpc provides sample installation and configuration scripts for running - the IBM HPC software stack in an xCAT cluser. Support for the following IBM - products is provided: GPFS, LoadLeveler, Parallel Environment, ESSL and Parallel +Depends: ${perl:Depends}, perl-xcat (>= 2.13-snap000000000000), xcat-client (>= 2.13-snap000000000000) +Description: Utilities for manage IBM HPC products in an xCAT cluster + xCAT-IBMhpc provides sample installation and configuration scripts for running + the IBM HPC software stack in an xCAT cluser. Support for the following IBM + products is provided: GPFS, LoadLeveler, Parallel Environment, ESSL and Parallel ESSL libraries, some compilers (vac, xlC, xlf). diff --git a/xCAT-IBMhpc/debian/rules b/xCAT-IBMhpc/debian/rules index 659821bd5..1bd639730 100755 --- a/xCAT-IBMhpc/debian/rules +++ b/xCAT-IBMhpc/debian/rules @@ -9,9 +9,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=5 - - build: pwd dh_quilt_patch @@ -29,7 +26,6 @@ install: dh_install -X".svn" dh_link - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. @@ -39,7 +35,7 @@ binary-arch: pwd dh_testdir dh_testroot - dh_installchangelogs + dh_installchangelogs dh_installdocs # dh_installexamples dh_install -X".svn" diff --git a/xCAT-OpenStack-baremetal/debian/compat b/xCAT-OpenStack-baremetal/debian/compat index 45a4fb75d..ec635144f 100644 --- a/xCAT-OpenStack-baremetal/debian/compat +++ b/xCAT-OpenStack-baremetal/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/xCAT-OpenStack-baremetal/debian/control b/xCAT-OpenStack-baremetal/debian/control index 61ad678eb..b62fc34bb 100644 --- a/xCAT-OpenStack-baremetal/debian/control +++ b/xCAT-OpenStack-baremetal/debian/control @@ -2,13 +2,11 @@ Source: xcat-openstack-baremetal Section: admin Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 8.0.0) +Build-Depends: debhelper (>= 9) Standards-Version: 3.9.4 -Homepage: http://xcat.org -#Vcs-Git: git://git.debian.org/collab-maint/xcat-openstack-baremetal.git -#Vcs-Browser: http://git.debian.org/?p=collab-maint/xcat-openstack-baremetal.git;a=summary +Homepage: https://xcat.org/ Package: xcat-openstack-baremetal Architecture: all Depends: xcat-client -Description: Executables and data of the xCAT baremetal driver for OpenStack +Description: Executables and data of xCAT baremetal driver for OpenStack diff --git a/xCAT-OpenStack/debian/compat b/xCAT-OpenStack/debian/compat index 45a4fb75d..ec635144f 100644 --- a/xCAT-OpenStack/debian/compat +++ b/xCAT-OpenStack/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/xCAT-OpenStack/debian/control b/xCAT-OpenStack/debian/control index 04cff6ab9..9f6ac5661 100644 --- a/xCAT-OpenStack/debian/control +++ b/xCAT-OpenStack/debian/control @@ -2,13 +2,13 @@ Source: xcat-openstack Section: admin Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 8.0.0) -Standards-Version: 3.9.2 -#Vcs-Git: git://git.debian.org/collab-maint/xcat-openstack.git -#Vcs-Browser: http://git.debian.org/?p=collab-maint/xcat-openstack.git;a=summary +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 Package: xcat-openstack Architecture: all Depends: xcat -Description: Meta-Metapackage for a common, default xCAT management node setup with OpenStack - xCAT-OpenStack is an xCAT management node package intended for at-scale management with OpenStack, including hardware management and software management. +Description: Metapackage for a xCAT management node setup with OpenStack + xCAT-OpenStack is an xCAT management node package intended for at-scale + management with OpenStack, including hardware management and software + management. diff --git a/xCAT-UI/debian/compat b/xCAT-UI/debian/compat index 7ed6ff82d..ec635144f 100644 --- a/xCAT-UI/debian/compat +++ b/xCAT-UI/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/xCAT-UI/debian/control b/xCAT-UI/debian/control index 4e91971ef..f9fe95278 100644 --- a/xCAT-UI/debian/control +++ b/xCAT-UI/debian/control @@ -2,11 +2,12 @@ Source: xcat-ui Section: admin Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 5) -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 Package: xcat-ui Architecture: all -Depends: ${perl:Depends}, python (>= 2.3), apache2, libapache2-mod-php5 -Description: Provides a browser-based interface for xCAT (extreme Cluster Administration Tool). - Provides a browser-based interface for xCAT (extreme Cluster Administration Tool). +Depends: ${perl:Depends}, python (>= 2.3), apache2, libapache2-mod-php +Description: Provides a browser-based interface for xCAT + Provides a browser-based interface for xCAT (extreme Cluster Administration + Tool). diff --git a/xCAT-UI/debian/rules b/xCAT-UI/debian/rules index ce79be57f..1cf265aa1 100755 --- a/xCAT-UI/debian/rules +++ b/xCAT-UI/debian/rules @@ -9,9 +9,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=5 - - build: pwd @@ -38,7 +35,7 @@ binary-arch: pwd dh_testdir dh_testroot - dh_installchangelogs + dh_installchangelogs dh_installdocs # dh_installexamples dh_install -X".svn" diff --git a/xCAT-buildkit/debian/compat b/xCAT-buildkit/debian/compat index 7ed6ff82d..ec635144f 100644 --- a/xCAT-buildkit/debian/compat +++ b/xCAT-buildkit/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/xCAT-buildkit/debian/control b/xCAT-buildkit/debian/control index dfe2c644d..ee045d41e 100644 --- a/xCAT-buildkit/debian/control +++ b/xCAT-buildkit/debian/control @@ -1,11 +1,11 @@ Source: xcat-buildkit Section: admin Priority: extra -Maintainer: xu qing -Build-Depends: debhelper (>= 5) -Standards-Version: 3.7.2 +Maintainer: Xu Qing +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 Package: xcat-buildkit Architecture: all Depends: dpkg-dev, devscripts, debhelper -Description: xCAT-buildkit provides the buildkit tool and sample kit files to build an xCAT kit. +Description: Provides build tools and sample files to build an xCAT kit diff --git a/xCAT-buildkit/debian/rules b/xCAT-buildkit/debian/rules index b5e90c11b..c792c4f31 100755 --- a/xCAT-buildkit/debian/rules +++ b/xCAT-buildkit/debian/rules @@ -9,9 +9,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=5 - - build: pwd mkdir -p share/man/man1 @@ -40,7 +37,6 @@ install: find debian/xcat-buildkit/opt/xcat/share/doc/packages/xCAT-buildkit -type f -exec chmod 644 {} \; dh_link - # Build architecture-independent files here. binary-indep: build install dh_installchangelogs diff --git a/xCAT-client/debian/compat b/xCAT-client/debian/compat index 7ed6ff82d..ec635144f 100644 --- a/xCAT-client/debian/compat +++ b/xCAT-client/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/xCAT-client/debian/control b/xCAT-client/debian/control index 032f70438..db9b62fe4 100644 --- a/xCAT-client/debian/control +++ b/xCAT-client/debian/control @@ -2,12 +2,14 @@ Source: xcat-client Section: admin Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 5) -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 Package: xcat-client Architecture: all -Depends: ${perl:Depends}, nmap, perl-xcat -Recommends: libsort-versions-perl +Depends: ${perl:Depends}, perl-xcat (>= 2.13-snap000000000000) +Recommends: libsort-versions-perl, nmap Description: Core executables and data of the xCAT management project - xCAT-client provides the fundamental xCAT commands (chtab, chnode, rpower, etc) helpful in administrating systems at scale, with particular attention paid to large HPC clusters. + xCAT-client provides the fundamental xCAT commands (chtab, chnode, rpower, + etc) helpful in administrating systems at scale, with particular attention + paid to large HPC clusters. diff --git a/xCAT-client/debian/rules b/xCAT-client/debian/rules index 5beff8b73..17e87fad6 100755 --- a/xCAT-client/debian/rules +++ b/xCAT-client/debian/rules @@ -9,9 +9,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=5 - - build: pwd ./xpod2man @@ -29,7 +26,6 @@ install: dh_install -X".svn" dh_link - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. @@ -39,7 +35,7 @@ binary-arch: pwd dh_testdir dh_testroot - dh_installchangelogs + dh_installchangelogs dh_installdocs # dh_installexamples dh_install -X".svn" diff --git a/xCAT-genesis-builder/debian/compat b/xCAT-genesis-builder/debian/compat index 7ed6ff82d..ec635144f 100644 --- a/xCAT-genesis-builder/debian/compat +++ b/xCAT-genesis-builder/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/xCAT-genesis-builder/debian/control b/xCAT-genesis-builder/debian/control index b107a09ab..ebb738dcf 100644 --- a/xCAT-genesis-builder/debian/control +++ b/xCAT-genesis-builder/debian/control @@ -2,15 +2,15 @@ Source: xcat-genesis-base-amd64 Section: admin Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 8.0.0) -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 Package: xcat-genesis-base-amd64 Architecture: all -Depends: +Depends: Replaces: xcat-genesis-amd64 Breaks: xcat-genesis-amd64 Description: xCAT Genesis netboot image xCAT genesis (Genesis Enhanced Netboot Environment for System Information and Servicing) is a small, embedded-like environment for xCAT's use in - discovery and management actions when interaction with an OS is infeasible. + discovery and management actions when interaction with an OS is infeasible. diff --git a/xCAT-genesis-scripts/debian/compat b/xCAT-genesis-scripts/debian/compat index 45a4fb75d..ec635144f 100644 --- a/xCAT-genesis-scripts/debian/compat +++ b/xCAT-genesis-scripts/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/xCAT-genesis-scripts/debian/control-amd64 b/xCAT-genesis-scripts/debian/control-amd64 index ada257a83..8c4de338e 100644 --- a/xCAT-genesis-scripts/debian/control-amd64 +++ b/xCAT-genesis-scripts/debian/control-amd64 @@ -2,14 +2,17 @@ Source: xcat-genesis-scripts Section: admin Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 8.0.0) -Standards-Version: 3.9.2 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 Package: xcat-genesis-scripts-amd64 -Architecture: all +Architecture: all Depends: xcat-genesis-base-amd64 (>=2.13.0) -Conflicts: xcat-genesis-scripts,xcat-genesis-scripts-x86-64 -Replaces: xcat-genesis-scripts,xcat-genesis-scripts-x86-64 -Description: xCAT genesis - (Genesis Enhanced Netboot Environment for System Information and Servicing) is a small, embedded-like environment for xCAT's use in discovery and management actions when interaction with an OS is infeasible. This package reperesents the EPL content that is more tightly bound to specific xcat-core versions - +Conflicts: xcat-genesis-scripts, xcat-genesis-scripts-x86-64 +Replaces: xcat-genesis-scripts, xcat-genesis-scripts-x86-64 +Description: xCAT genesis + (Genesis Enhanced Netboot Environment for System Information and Servicing) + is a small, embedded-like environment for xCAT's use in discovery and + management actions when interaction with an OS is infeasible. This package + reperesents the EPL content that is more tightly bound to specific xcat-core + versions. diff --git a/xCAT-genesis-scripts/debian/control-ppc64el b/xCAT-genesis-scripts/debian/control-ppc64el index 825592d88..2165376c7 100644 --- a/xCAT-genesis-scripts/debian/control-ppc64el +++ b/xCAT-genesis-scripts/debian/control-ppc64el @@ -2,14 +2,17 @@ Source: xcat-genesis-scripts Section: admin Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 8.0.0) -Standards-Version: 3.9.2 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 Package: xcat-genesis-scripts-ppc64 Architecture: all Depends: xcat-genesis-base-ppc64 (>=2.13.0) Conflicts: xcat-genesis-scripts Replaces: xcat-genesis-scripts -Description: xCAT genesis - (Genesis Enhanced Netboot Environment for System Information and Servicing) is a small, embedded-like environment for xCAT's use in discovery and management actions when interaction with an OS is infeasible. This package reperesents the EPL content that is more tightly bound to specific xcat-core versions - +Description: xCAT genesis + (Genesis Enhanced Netboot Environment for System Information and Servicing) + is a small, embedded-like environment for xCAT's use in discovery and + management actions when interaction with an OS is infeasible. This package + reperesents the EPL content that is more tightly bound to specific xcat-core + versions. diff --git a/xCAT-probe/debian/compat b/xCAT-probe/debian/compat index 7ed6ff82d..ec635144f 100644 --- a/xCAT-probe/debian/compat +++ b/xCAT-probe/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/xCAT-probe/debian/control b/xCAT-probe/debian/control index f0b56bb3f..2a7549362 100644 --- a/xCAT-probe/debian/control +++ b/xCAT-probe/debian/control @@ -2,11 +2,11 @@ Source: xcat-probe Section: admin Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 5) -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 Package: xcat-probe Architecture: all Depends: ${perl:Depends} Recommends: wget, dnsutils, tftp-hpa -Description: Provides a toolkit to help probe all the possible issues in xCAT +Description: Provides a toolkit to probe possible issues in xCAT diff --git a/xCAT-probe/debian/rules b/xCAT-probe/debian/rules index cb48348a6..bb1842ebe 100755 --- a/xCAT-probe/debian/rules +++ b/xCAT-probe/debian/rules @@ -9,9 +9,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=5 - - build: dh_testdir pwd @@ -29,7 +26,6 @@ install: dh_install -X".svn" dh_link - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. @@ -40,7 +36,7 @@ binary-arch: export dh_testdir dh_testroot - dh_installchangelogs + dh_installchangelogs dh_installdocs # dh_installexamples dh_install -X".svn" diff --git a/xCAT-rmc/debian/compat b/xCAT-rmc/debian/compat index 7ed6ff82d..ec635144f 100644 --- a/xCAT-rmc/debian/compat +++ b/xCAT-rmc/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/xCAT-rmc/debian/control b/xCAT-rmc/debian/control index 33f8bc9cd..e8e97d82d 100644 --- a/xCAT-rmc/debian/control +++ b/xCAT-rmc/debian/control @@ -2,11 +2,11 @@ Source: xcat-rmc Section: admin Priority: extra Maintainer: Arif Ali -Build-Depends: debhelper (>= 5) -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 Package: xcat-rmc Architecture: all -Depends: ${perl:Depends}, perl-xcat, xcat-server +Depends: ${perl:Depends}, perl-xcat (>= 2.13-snap000000000000), xcat-server (>= 2.13-snap000000000000) Description: RMC monitoring plug-in for xCAT Provides RMC monitoring plug-in module for xCAT, configuration scripts, predefined conditions, responses and sensors diff --git a/xCAT-rmc/debian/rules b/xCAT-rmc/debian/rules index 5099b8b4b..d880b083b 100755 --- a/xCAT-rmc/debian/rules +++ b/xCAT-rmc/debian/rules @@ -9,9 +9,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=5 - - build: pwd @@ -28,7 +25,6 @@ install: dh_install -X".svn" dh_link - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. @@ -39,7 +35,7 @@ binary-arch: export dh_testdir dh_testroot - dh_installchangelogs + dh_installchangelogs dh_installdocs # dh_installexamples dh_install -X".svn" diff --git a/xCAT-server/debian/compat b/xCAT-server/debian/compat index 7ed6ff82d..ec635144f 100644 --- a/xCAT-server/debian/compat +++ b/xCAT-server/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/xCAT-server/debian/control b/xCAT-server/debian/control index 83eb791fb..ae2306ed9 100644 --- a/xCAT-server/debian/control +++ b/xCAT-server/debian/control @@ -2,11 +2,15 @@ Source: xcat-server Section: admin Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 5) -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 +Homepage: https://xcat.org/ 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, libdigest-sha-perl,libcrypt-rijndael-perl,libcrypt-cbc-perl,libjson-perl, libnet-https-nb-perl, libhttp-async-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 +Depends: ${perl:Depends}, grub2-xcat, perl-xcat (>= 2.13-snap000000000000), xcat-client (>= 2.13-snap000000000000), 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, libdigest-sha-perl,libcrypt-rijndael-perl,libcrypt-cbc-perl,libjson-perl, libnet-https-nb-perl, libhttp-async-perl +Description: Server and configuration utilities of xCAT + xCAT-server provides the core server and configuration management components + of xCAT. + . + This package should be installed on the xCAT management node. diff --git a/xCAT-server/debian/install b/xCAT-server/debian/install index 7941d95c2..ec21c731e 100644 --- a/xCAT-server/debian/install +++ b/xCAT-server/debian/install @@ -19,7 +19,6 @@ share/xcat/devicetype/* opt/xcat/share/xcat/devicetype share/xcat/ib/netboot/sles/* opt/xcat/share/xcat/ib/netboot/sles share/xcat/ib/netboot/rh/* opt/xcat/share/xcat/ib/netboot/rh - lib/perl/xCAT/* opt/xcat/lib/perl/xCAT/ lib/xcat/plugins/* opt/xcat/lib/perl/xCAT_plugin/ lib/xcat/schema/* opt/xcat/lib/perl/xCAT_schema/ diff --git a/xCAT-server/debian/rules b/xCAT-server/debian/rules index 027559171..72d780fc1 100755 --- a/xCAT-server/debian/rules +++ b/xCAT-server/debian/rules @@ -9,7 +9,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=5 export buildroot=$(PWD)/debian/xcat-server export prefix=/opt/xcat export rootdir=$(buildroot)/$(prefix) @@ -41,7 +40,7 @@ binary-arch: pwd dh_testdir dh_testroot - dh_installchangelogs + dh_installchangelogs dh_installdocs # dh_installexamples dh_install -X".svn" diff --git a/xCAT-test/debian/compat b/xCAT-test/debian/compat index 7ed6ff82d..ec635144f 100644 --- a/xCAT-test/debian/compat +++ b/xCAT-test/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/xCAT-test/debian/control b/xCAT-test/debian/control index 10e475fb5..fa073a669 100644 --- a/xCAT-test/debian/control +++ b/xCAT-test/debian/control @@ -2,10 +2,13 @@ Source: xcat-test Section: admin Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 5) -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 +Homepage: https://xcat.org/ Package: xcat-test Architecture: all Depends: ${perl:Depends} -Description: Provides automated test tool and buckets to help test xCAT commands automatically +Description: xCAT automated test tool + Provides automated test tool and buckets to help test xCAT commands + automatically. diff --git a/xCAT-test/debian/rules b/xCAT-test/debian/rules index 2d65f3a62..ad419b385 100755 --- a/xCAT-test/debian/rules +++ b/xCAT-test/debian/rules @@ -9,9 +9,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=5 - - build: dh_testdir mkdir -p share/man/man1 @@ -33,7 +30,6 @@ install: dh_install -X".svn" dh_link - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. @@ -44,7 +40,7 @@ binary-arch: export dh_testdir dh_testroot - dh_installchangelogs + dh_installchangelogs dh_installdocs # dh_installexamples dh_install -X".svn" diff --git a/xCAT-vlan/debian/compat b/xCAT-vlan/debian/compat index 45a4fb75d..ec635144f 100755 --- a/xCAT-vlan/debian/compat +++ b/xCAT-vlan/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/xCAT-vlan/debian/control b/xCAT-vlan/debian/control index b6d89e310..5eddaa6e8 100755 --- a/xCAT-vlan/debian/control +++ b/xCAT-vlan/debian/control @@ -2,12 +2,11 @@ Source: xcat-vlan Section: admin Priority: extra Maintainer: root -Build-Depends: debhelper (>= 8.0.0) -Standards-Version: 3.9.2 -#Vcs-Git: git://git.debian.org/collab-maint/xcat-vlan.git -#Vcs-Browser: http://git.debian.org/?p=collab-maint/xcat-vlan.git;a=summary +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 +Homepage: https://xcat.org/ Package: xcat-vlan Architecture: all -Depends: xcat-client +Depends: xcat-client (>= 2.13-snap000000000000) Description: xCAT-vlan provides the xCAT vlan confiuration. diff --git a/xCAT-vlan/debian/rules b/xCAT-vlan/debian/rules index 4ab16dbff..2ab51a5dd 100755 --- a/xCAT-vlan/debian/rules +++ b/xCAT-vlan/debian/rules @@ -11,10 +11,12 @@ build: ./xpod2man + clean: dh_testdir dh_testroot dh_clean -d + install: pwd dh_installdirs diff --git a/xCAT/debian/compat b/xCAT/debian/compat index 7ed6ff82d..ec635144f 100644 --- a/xCAT/debian/compat +++ b/xCAT/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/xCAT/debian/control b/xCAT/debian/control index 913d00c94..fae5030f6 100644 --- a/xCAT/debian/control +++ b/xCAT/debian/control @@ -2,11 +2,29 @@ Source: xcat Section: admin Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 5) -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 +Vcs-browser: https://github.com/xcat2/xcat-core.git +Homepage: https://xcat.org/ Package: xcat Architecture: amd64 ppc64el -Depends: ${perl:Depends}, xcat-server, xcat-client, libdbd-sqlite3-perl, isc-dhcp-server, apache2, nfs-kernel-server, nmap, bind9, libxml-parser-perl, xinetd, tftpd-hpa, tftp-hpa, conserver-xcat, libnet-telnet-perl, ipmitool-xcat (>=1.8.17-1), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat, xnba-undi, xcat-genesis-scripts-ppc64, xcat-genesis-scripts-amd64, elilo-xcat, xcat-buildkit, xcat-probe (>=2.12) -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 +Depends: ${perl:Depends}, xcat-server (>= 2.13-snap000000000000), xcat-client (>= 2.13-snap000000000000), libdbd-sqlite3-perl, isc-dhcp-server, apache2, nfs-kernel-server, libxml-parser-perl, xinetd, tftpd-hpa, conserver-xcat, libnet-telnet-perl, xcat-genesis-scripts-ppc64 (>= 2.13-snap000000000000), xcat-genesis-scripts-amd64 (>= 2.13-snap000000000000) +Recommends: bind9, nmap, tftp-hpa, ipmitool-xcat (>= 1.8.17-1), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat, xnba-undi, elilo-xcat, xcat-buildkit (>= 2.13-snap000000000000), xcat-probe (>= 2.13-snap000000000000) +Suggests: yaboot-xcat +Description: Metapackage for a common, default xCAT setup + xCAT is Extreme Cluster/Cloud Administration Toolkit. xCAT offers complete + management for HPC clusters, RenderFarms, Grids, WebFarms, Online Gaming + Infrastructure, Clouds, Datacenters, and whatever tomorrow's buzzwords may + be. It is agile, extensible, and based on years of system administration best + practices and experience. + . + It enables you to: + . + * Provision Operating Systems on physical or virtual machines: RHEL, CentOS, + Fedora, SLES, Ubuntu, AIX, Windows, VMWare, KVM, PowerVM, PowerKVM, zVM. + * Provision using scripted install, stateless, statelite, iSCSI, or cloning + * Remotely manage systems: lights-out management, remote console, and + distributed shell support + * Quickly configure and control management node services: DNS, HTTP, DHCP, + TFTP, NFS diff --git a/xCAT/debian/rules b/xCAT/debian/rules index b45ba65a7..14d8be8b1 100755 --- a/xCAT/debian/rules +++ b/xCAT/debian/rules @@ -9,9 +9,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=5 - - build: pwd @@ -28,7 +25,6 @@ install: dh_install -X".svn" dh_link - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. @@ -39,7 +35,7 @@ binary-arch: export dh_testdir dh_testroot - dh_installchangelogs + dh_installchangelogs dh_installdocs # dh_installexamples dh_install -X".svn" diff --git a/xCATsn/debian/compat b/xCATsn/debian/compat index 7ed6ff82d..ec635144f 100644 --- a/xCATsn/debian/compat +++ b/xCATsn/debian/compat @@ -1 +1 @@ -5 +9 diff --git a/xCATsn/debian/control b/xCATsn/debian/control index 7ed6120d9..250449a81 100644 --- a/xCATsn/debian/control +++ b/xCATsn/debian/control @@ -2,12 +2,15 @@ Source: xcatsn Section: admin Priority: extra Maintainer: xCAT -Build-Depends: debhelper (>= 5) -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.4 +Homepage: https://xcat.org/ Package: xcatsn Architecture: all -Depends: ${perl:Depends}, xcat-server, perl-xcat, xcat-client, libdbd-sqlite3-perl, libxml-parser-perl, tftpd-hpa, tftp-hpa, conserver-xcat, libnet-telnet-perl, dhcp3-server, apache2, expect, nfs-kernel-server, nmap, bind9, ipmitool-xcat (>=1.8.17-1), syslinux-xcat, xnba-undi, xcat-genesis-scripts-ppc64, xcat-genesis-scripts-amd64, elilo-xcat,libsys-virt-perl, xcat-probe (>=2.12) -Recommends: yaboot-xcat +Depends: ${perl:Depends}, xcat-server (>= 2.13-snap000000000000), xcat-client (>= 2.13-snap000000000000), libdbd-sqlite3-perl, libxml-parser-perl, tftpd-hpa, conserver-xcat, libnet-telnet-perl, isc-dhcp-server, apache2, nfs-kernel-server, xcat-genesis-scripts-ppc64 (>= 2.13-snap000000000000), xcat-genesis-scripts-amd64 (>= 2.13-snap000000000000) +Recommends: bind9, nmap, tftp-hpa, ipmitool-xcat (>= 1.8.17-1), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat, xnba-undi, elilo-xcat, xcat-buildkit (>= 2.13-snap000000000000), xcat-probe (>= 2.13-snap000000000000) +Suggests: yaboot-xcat Description: Metapackage for a common, default xCAT service node setup - xCATsn is a service node management package intended for at-scale management, including hardware management and software management. + xCATsn is a service node management package intended for at-scale + management, including hardware management and software management. diff --git a/xCATsn/debian/rules b/xCATsn/debian/rules index ce79be57f..38689173d 100755 --- a/xCATsn/debian/rules +++ b/xCATsn/debian/rules @@ -9,9 +9,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=5 - - build: pwd @@ -28,7 +25,6 @@ install: dh_install -X".svn" dh_link - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. @@ -38,7 +34,7 @@ binary-arch: pwd dh_testdir dh_testroot - dh_installchangelogs + dh_installchangelogs dh_installdocs # dh_installexamples dh_install -X".svn" From a2c05045b39ab17274c06a5106b99cd14dcd1ca3 Mon Sep 17 00:00:00 2001 From: caomengmeng Date: Tue, 3 Jan 2017 01:22:04 -0500 Subject: [PATCH 15/28] complete --- xCAT-test/autotest/testcase/migration/redhat_migration | 10 ++++------ xCAT-test/autotest/testcase/migration/sles_migration | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/xCAT-test/autotest/testcase/migration/redhat_migration b/xCAT-test/autotest/testcase/migration/redhat_migration index 58ffdfd42..652121f03 100644 --- a/xCAT-test/autotest/testcase/migration/redhat_migration +++ b/xCAT-test/autotest/testcase/migration/redhat_migration @@ -1,6 +1,6 @@ start:redhat_migration1 os:Linux -description:update xCAT from $$MIGRATION1_VERSION to $$LATEST_VERSION, these two global parameter defined in config file +description:update xCAT from $$MIGRATION1_VERSION to latest version, these two global parameter defined in config file #cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi #cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN @@ -100,14 +100,13 @@ cmd:xdsh $$CN "lsdef" check:output=~node0001 cmd:xdsh $$CN "noderm node0001" check:rc==0 -cmd:xdsh $$CN "lsxcatd -v" +cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 -check:output=~$$LATEST_VERSION end start:redhat_migration2 os:Linux -description:update xCAT from $$MIGRATION2_VERSION to $$LATEST_VERSION, these two global parameter defined in config file +description:update xCAT from $$MIGRATION2_VERSION to latest version, these two global parameter defined in config file stop:yes #cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi @@ -208,8 +207,7 @@ cmd:xdsh $$CN "lsdef" check:output=~node0001 cmd:xdsh $$CN "noderm node0001" check:rc==0 -cmd:xdsh $$CN "lsxcatd -v" +cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 -check:output=~$$LATEST_VERSION end diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index 1117af3a0..474a42adc 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -1,6 +1,6 @@ start:sles_migration1 os:Linux -description:update xCAT from $$MIGRATION1_VERSION to $$LATEST_VERSION, these two global parameter defined in config file +description:update xCAT from $$MIGRATION1_VERSION to latest version, these two global parameter defined in config file #cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi #cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN @@ -103,14 +103,13 @@ cmd:xdsh $$CN "lsdef" check:output=~node0001 cmd:xdsh $$CN "noderm node0001" check:rc==0 -cmd:xdsh $$CN "lsxcatd -v" +cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 -check:output=~$$LATEST_VERSION end start:sles_migration2 os:Linux -description:update xCAT from $$MIGRATION22VERSION to $$LATEST_VERSION, these two global parameter defined in config file +description:update xCAT from $$MIGRATION22VERSION to latest version, these two global parameter defined in config file #cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi #cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN @@ -213,8 +212,7 @@ cmd:xdsh $$CN "lsdef" check:output=~node0001 cmd:xdsh $$CN "noderm node0001" check:rc==0 -cmd:xdsh $$CN "lsxcatd -v" +cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 -check:output=~$$LATEST_VERSION end From 6ebfd712bb3e8b45e0658c196395575a24d3adea Mon Sep 17 00:00:00 2001 From: chenglch Date: Tue, 3 Jan 2017 16:10:24 +0800 Subject: [PATCH 16/28] return error code when updatenode command completed close-issue: #2281 --- xCAT-server/lib/xcat/plugins/updatenode.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index 2b9c9e6af..a81388bbc 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -2252,6 +2252,9 @@ s/Running of postscripts has completed/Redeliver security files has completed/; } } } + if($response->{errorcode}) { + $rsp->{errorcode} = $response->{errorcode}; + } $CALLBACK->($rsp); } From 5c9a3624d6800a79a160aeccb02ddcb8a55950d3 Mon Sep 17 00:00:00 2001 From: immarvin Date: Fri, 16 Dec 2016 09:42:50 -0500 Subject: [PATCH 17/28] refine the doc on cumulus switch --- .../edgecore_switches/edgecore_switches.rst | 152 ------------------ .../networks/edgecore_switches/index.rst | 6 +- .../edgecore_switches/onie_switches.rst | 135 ++++++++++++++++ xCAT/postscripts/enablesnmp | 26 +++ ...cumulusswitch.stanza => onieswitch.stanza} | 6 +- 5 files changed, 167 insertions(+), 158 deletions(-) delete mode 100644 docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst create mode 100644 docs/source/advanced/networks/edgecore_switches/onie_switches.rst create mode 100755 xCAT/postscripts/enablesnmp rename xCAT/templates/objects/node/{cumulusswitch.stanza => onieswitch.stanza} (82%) diff --git a/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst b/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst deleted file mode 100644 index 31e1bd238..000000000 --- a/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst +++ /dev/null @@ -1,152 +0,0 @@ -Edgecore Switch -=============== - -The Edgecore switch from Mellanox is 1Gb top-of-rack switch. Usually, Mellanox ships the switch with Cumulus Network OS(https://cumulusnetworks.com) and along with a license file installed. In some case, user may get whitebox switch hardware without OS and license installed. - -Since edgecore switch is different from other traditional switches that xCAT supports, xCAT supports edgecore switch in a different way. Currently, the features provided by xCAT include: :: - - 1) Cumulus Network OS provision - 2) switch discovery - 3) switch configuration: - (a) enable root-passwordless ssh - (b) install licence file - (c) enable snmp - 4) distribute files to switches with ``xdcp`` - 5) invoke remote commands or scripts on switches with `xdsh`` - 6) configure switches with ``updatenode`` - -This documentation presents a typical workflow on how to setup a edgecore switch from white box, then configure and manage the switch with xCAT. - - -Create a edgecore switch object -------------------------------- - -If you have the information of the ip and mac information of the switch, the edgecore switch object definition can be created with the "cumulusswitch" template shipped in xCAT : :: - - mkdef edgecoresw1 --template cumulusswitch arch=armv71 ip=192.168.5.191 mac=8C:EA:1B:12:CA:40 - -Discover the switch - -ONIE Mode ---------- - -If the switch arrives without an OS pre-loaded, the ONIE installer and management port is the only thing enabled on the switch. Once the switch connects to the xCAT network, the switch should get a dynamic IP address. The xCAT DHCP server will get requests from the onie-installer from the switch and attempt to find an OS binary file to execute. The following messages will be logged in /var/log/messages on the management node. :: - - Info: Fetching http://172.1.0.1/onie-installer-arm-accton_as4610_54-r0 ... - Info: Fetching http://172.1.0.1/onie-installer-arm-accton_as4610_54 ... - Info: Fetching http://172.1.0.1/onie-installer-accton_as4610_54 ... - Info: Fetching http://172.1.0.1/onie-installer-arm ... - Info: Fetching http://172.1.0.1/onie-installer . - - -To remove the installed Cumulus Linux OS to boot back to ONIE mode, connect to the switch via serial-port or ssh and execute the following commands: :: - - ssh cumulus@172.1.0.1 - #clean up all the configuration - sudo onie-select -k - sudo reboot - #boot back to onie mode - sudo onie-select -i - sudo reboot - - -After switch reboots, it will enter ONIE mode and send DHCP request to attempt to fetch the OS binary file. - - -Discover Edgecore Switch ------------------------- - -ONIE supports a number of methods for locating OS binary file. xCAT choose to use a DHCP server to provide specific information to the switch. - -* IP address of the switch -* URL of the OS binary file on the Web server - -With the xCAT DHCP configuration, ONIE picks up an IP address and downloads the URL specified by the user and start to install of the OS. The steps take to discover the edgecore switch and process request from ONIE installer as follows: - -#. Pre-define switch object into xCAT db, make sure ip adress, netboot and provemethod are set, also define core switch and port number where edgecore switch connect to. :: - - - #lsdef edgecoresw1 - Object name: edgecoresw1 - groups=switch - ip=192.168.23.1 - mgt=switch - netboot=onie - nodetype=switch - postbootscripts=otherpkgs - postscripts=syslog,remoteshell,syncfiles - provmethod=/install/custom/sw/edgecore/cumulus-linux-3.1.0-bcm-armel-1471981017.dc7e2adzfb43f6b.bin - switch=switch-10-5-23-1 - switchport=1 - - #makehosts edgecoresw1 - - -#. Run ``switchdiscover`` command, it will find edgecore switch and update mac address on pre-defined switch node definition. :: - - #switchdiscover --range 192.168.5.170-190 -s nmap - #lsdef edgecoresw1 - Object name: edgecoresw1 - groups=switch - ip=192.168.23.1 - mac=8C:EA:1B:12:CA:40 - mgt=switch - netboot=onie - nodetype=switch - postbootscripts=otherpkgs - postscripts=syslog,remoteshell,syncfiles - provmethod=/install/custom/sw/edgecore/cumulus-linux-3.1.0-bcm-armel-1471981017.dc7e2adzfb43f6b.bin - status=Matched - switch=switch-10-5-23-1 - switchport=1 - switchtype=cumulus - usercomment=Edgecore switch - - -#. Run ``makedhcp`` after edgecore switch discovered, it will update ``dhcpd.conf`` and response the DHCP request from the onie-installer. :: - - #makedhcp -n - #makedhcp -a edgecoresw1 - - -#. Installation of the Cumulus Linux OS takes about 50 minutes. Monitor the /var/log/messages to check the status of the installation. :: - - - Oct 27 15:28:08 fs4 dhcpd: DHCPDISCOVER from 8c:ea:1b:12:ca:40 via enP4p1s0f2 - Oct 27 15:28:08 fs4 dhcpd: DHCPOFFER on 192.168.23.1 to 8c:ea:1b:12:ca:40 via enP4p1s0f2 - Oct 27 15:28:08 fs4 dhcpd: DHCPREQUEST for 192.168.23.1 (192.168.3.25) from 8c:ea:1b:12:ca:40 via enP4p1s0f2 - Oct 27 15:28:08 fs4 dhcpd: DHCPACK on 192.168.23.1 to 8c:ea:1b:12:ca:40 via enP4p1s0f2 - - -#. Once installation finished, the pre-defined switch name and IP address will be configured on edgecore switch. :: - - cumulus@edgecoresw1:~$ ifconfig - eth0 Link encap:Ethernet HWaddr 8c:ea:1b:12:ca:40 - inet addr:192.168.23.1 Bcast:192.168.255.255 Mask:255.255.0.0 - inet6 addr: fe80::8eea:1bff:fe12:ca40/64 Scope:Link - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - cumulus@edgecoresw1:~$ hostname - edgecoresw1 - - -Configure Edgecore Switch -------------------------- - -xCAT provides a script ``/opt/xcat/share/xcat/script/configcumulus`` to configure attributes in the Cumulus Switch. Use the ``--help`` option to see more details. :: - - #configcumulus --help - Usage: - configcumulus [-?│-h│--help] - configcumulus [--switches switchnames] [--all] - configcumulus [--switches switchnames] [--ssh] - configcumulus [--switches switchnames] [--license filename ] - configcumulus [--switches switchnames] [--snmp] [--user snmp_user] [--password snmp_password] - configcumulus [--switches switchnames] [--ntp] - - - - - - - - diff --git a/docs/source/advanced/networks/edgecore_switches/index.rst b/docs/source/advanced/networks/edgecore_switches/index.rst index 6d3bdf038..0c897d340 100644 --- a/docs/source/advanced/networks/edgecore_switches/index.rst +++ b/docs/source/advanced/networks/edgecore_switches/index.rst @@ -1,7 +1,7 @@ -Edgecore Switches -================= +ONIE Compatible Bare Metal Switches +=================================== .. toctree:: :maxdepth: 2 - edgecore_switches.rst + onie_switches.rst diff --git a/docs/source/advanced/networks/edgecore_switches/onie_switches.rst b/docs/source/advanced/networks/edgecore_switches/onie_switches.rst new file mode 100644 index 000000000..dd41a8c71 --- /dev/null +++ b/docs/source/advanced/networks/edgecore_switches/onie_switches.rst @@ -0,0 +1,135 @@ +ONIE compatible bare metal switch +================================= + +The ONIE [1]_. compatible bare metal switches(abbreviated as "ONIE switch") from vendors such as Mellanox or Edgecore are often used as top-of-rack switches in the cluster. Usually, the switches are shipped with a Cumulus Network OS(https://cumulusnetworks.com) and a license pre-installed. In some cases, user may get whitebox switch hardware with a standalone Cumulus installer and license file. This documentation presents a typical workflow on how to setup ONIE switch from white box, then configure and manage the switch with xCAT. + +.. [1] Open Network Install Environment: Created by Cumulus Networks, Inc. in 2012, the Open Network Install Environment (ONIE) Project is a small operating system, pre-installed as firmware on bare metal network switches, that provides an environment for automated operating system provisioning. + +Create an ONIE switch object +------------------------------- + +The ONIE switch object can be created with the "onieswitch" template shipped in xCAT, the ip address and mac of the switch management ethernet port should be specified : :: + + mkdef edgecoresw1 --template onieswitch arch=armv71 ip=192.168.5.191 mac=8C:EA:1B:12:CA:40 + +Provision the Cumulus OS on ONIE switch +--------------------------------------- + +To provision Cumulus OS, the Cumulus installation file, a binary shipped with the switch, should be saved in a directory exported in the http server. + +Run ``chdef`` to specify the "provmethod" attribute of the switch object to the full path of the installation file: :: + + chdef edgecoresw1 netboot=onie provmethod="/install/custom/sw/edgecore/cumulus-linux-3.1.0-bcm-armel-1471981017.dc7e2adzfb43f6b.bin" + +Run ``makedhcp`` to prepare the DHCP/BOOTP lease. :: + + makedhcp -a edgecoresw1 + +The command or operation to start the provision dependes on the status of switch: + +1. If the switch is a white box without Cumulus OS installed, simply connect the management ethernet port of the switch to xCAT management node, then power on the switch. + +2. If a Cumulus OS has been installed on the switch, you need to login to the switch(the default user is ``cumulus`` and the password is ``CumulusLinux!``) and run a batch of commands: :: + + sudo onie-select -i + sudo reboot + +If the passwordless-ssh of "root" has been enabled, the commands can be issued with: :: + + xdsh edgecoresw1 "/usr/cumulus/bin/onie-select -i -f;reboot" + +After reboot, the switch will enter ONIE install mode and begin the installation. The provision might take about 50 minutes. + + +Switch Configuration +-------------------- + +Enable the passwordless ssh for "root" +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In a newly installed Cumulus OS, a default user ``cumulus`` will be created, the switch can be accessed via ssh with the default password ``CumulusLinux!``. + +The passwordless ssh access of "root" should be enabled with the script ``/opt/xcat/share/xcat/scripts/configcumulus`` :: + + /opt/xcat/share/xcat/scripts/configcumulus --switches edgecoresw1 --ssh + +After the passwordless access for "root" is setup successfully, the switch can be managed with the node management commands such as ``xdsh``, ``xdcp`` and ``updatenode``, etc. + +Licence file installation +~~~~~~~~~~~~~~~~~~~~~~~~~ + +On the newly installed switch, only the serial console and the management ethernet port are enabled. To activate the data ports, the licence file shipped with the switch should be installed: :: + + xdcp edgecoresw1 /install/custom/sw/edgecore/licensefile.txt /tmp + xdsh edgecoresw1 "/usr/cumulus/bin/cl-license -i /tmp/licensefile.txt" + +To check whether the license file is installed successfully: :: + + ~: xdsh edgecoresw1 /usr/cumulus/bin/cl-license + edgecoresw1: xxx@xx.com|xxxxxxxxxxxxxxx + +Reboot the switch to apply the licence file: :: + + xdsh edgecoresw1 reboot + +Enable SNMP +~~~~~~~~~~~ + +The snmpd in the switch is not enabled by default, xCAT ships a postscript to enable it: :: + + updatenode edgecoresw1 -P enablesnmp + + +Switch Discovery +---------------- + +The ONIE switch can be scaned and discovered with ``switchdiscover`` :: + + ~: switchdiscover --range 192.168.23.1-10 + Discovering switches using nmap for 192.168.23.1-10. It may take long time... + ip name vendor mac + ------------ ------------ ------------ ------------ + 192.168.23.1 edgecoresw1 Edgecore switch 8C:EA:1B:12:CA:40 + Switch discovered: edgecoresw1 + +Once SNMP on the ONIE switch is enabled, the ONIE switch can be discovered with "snmp" method: :: + + ~: switchdiscover --range 192.168.23.1-10 -s snmp + Discovering switches using snmpwalk for 192.168.23.1-10 .... + ip name vendor mac + ------------ ------------ ------------ ------------ + 192.168.23.1 edgecoresw1 Linux edgecoresw1 4.1.0-cl-2-iproc #1 SMP Debian 4.1.25-1+cl3u4 (2016-08-13) armv7l 8c:ea:1b:12:ca:40 + Switch discovered: edgecoresw1 + + +Switch Management +----------------- + +File Dispatch +~~~~~~~~~~~~~ + +The files can be dispatched to ONIE switches with ``xdcp`` :: + + xdcp edgecoresw1 + +Refer to :doc:`xdcp manpage ` for details. + +Remote Commands +~~~~~~~~~~~~~~~ + +Commands can be run on ONIE switches remotely with ``xdsh`` :: + + xdsh edgecoresw1 + +Refer to :doc:`xdsh manpage ` for details. + +Run scripts remotely +~~~~~~~~~~~~~~~~~~~~ + +The scripts under "/install/postscripts" can be run on ONIE switches with ``updatenode -P`` :: + + updatenode edgecoresw1 -P