From 5485ab50792e886c1405359a480377a8c3889d29 Mon Sep 17 00:00:00 2001 From: litingt Date: Fri, 4 Apr 2014 01:05:14 -0700 Subject: [PATCH 01/10] merge different with 2.9 --- xCAT-test/autotest/testcase/chdef/cases0 | 32 +++++++++++++----------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/xCAT-test/autotest/testcase/chdef/cases0 b/xCAT-test/autotest/testcase/chdef/cases0 index 1b2a35d09..f3ad24b73 100644 --- a/xCAT-test/autotest/testcase/chdef/cases0 +++ b/xCAT-test/autotest/testcase/chdef/cases0 @@ -22,21 +22,6 @@ cmd:rmdef -t node testnode check:rc==0 end -start:chdef_group_p -cmd:chdef abcnode1 -p groups=abc -check:rc==0 -cmd:chdef abcnode2 -p groups=abcabc -check:rc==0 -cmd:chdef -t group abc members=abcnode2 -check:rc==0 -cmd:nodels abc -check:output!~abcnode1 -check:output=~abcnode2 -cmd:rmdef abcnode1 -cmd:rmdef abcnode2 -end - - start:chdef_t_network description:chdef -t network cmd:chdef -t network -o testnetwork net=111.222.33.0 mask=255.255.255.254 @@ -130,6 +115,23 @@ cmd:rmdef -t node -o testnode1-testnode4 check:rc==0 end + +start:chdef_group_p +cmd:chdef abcnode1 -p groups=abc +check:rc==0 +cmd:chdef abcnode2 -p groups=abcabc +check:rc==0 +cmd:chdef -t group abc members=abcnode2 +check:rc==0 +cmd:nodels abc +check:output!~abcnode1 +check:output=~abcnode2 +cmd:rmdef abcnode1 +cmd:rmdef abcnode2 +end + + + start:chdef_dynamic_group description:chdef with dynamic node group cmd:mkdef -t node -o testnode1-testnode2 mgt=hmc cons=hmc groups=all,systemp From 3a3eff189f713c6bcddd1ce5a959e76beeffa378 Mon Sep 17 00:00:00 2001 From: ligc Date: Fri, 4 Apr 2014 14:46:26 -0500 Subject: [PATCH 02/10] Build a separate xCAT-server for PCM, because of the perl-JSON dependency caused by RESTAPI --- buildcore.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildcore.sh b/buildcore.sh index 6a1ba7233..c6a665a22 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -44,8 +44,10 @@ FRS=/home/frs/project/x/xc/xcat ALLBUILD="perl-xCAT xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xCAT-buildkit xCAT xCATsn xCAT-genesis-scripts xCAT-OpenStack xCAT-SoftLayer xCAT-OpenStack-baremetal" ZVMBUILD="perl-xCAT xCAT-server xCAT-UI" ZVMLINK="xCAT-client xCAT xCATsn" -PCMBUILD="xCAT" -PCMLINK="perl-xCAT xCAT-client xCAT-server xCAT-buildkit xCAT-genesis-scripts-x86_64" +# xCAT has PCM specific configuration - conserver-xcat, syslinux-xcat +# xCAT-server has PCM specific configuration - RESTAPI(perl-JSON) +PCMBUILD="xCAT xCAT-server" +PCMLINK="perl-xCAT xCAT-client xCAT-buildkit xCAT-genesis-scripts-x86_64" # Note: for FSM, the FlexCAT rpm is built separately from gsa/git FSMBUILD="perl-xCAT xCAT-client xCAT-server" FSMLINK="" From 5366151b02e374e6fb71171ae89911a23b88b841 Mon Sep 17 00:00:00 2001 From: litingt Date: Fri, 4 Apr 2014 01:15:13 -0700 Subject: [PATCH 03/10] merge 2.8 and 2.9 code --- .../linux_cn_with_sn_diskless_installation_x86_64_redhat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_diskless_installation_x86_64_redhat b/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_diskless_installation_x86_64_redhat index f653f99be..d0a67d785 100644 --- a/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_diskless_installation_x86_64_redhat +++ b/xCAT-test/autotest/testcase/installation/linux_cn_with_sn_diskless_installation_x86_64_redhat @@ -30,6 +30,8 @@ cmd:xdsh $$SN df|grep /install;if [ $? -ne 0 ] ;then xdsh $$SN mount $$MN:/insta check:rc==0 cmd:nodeset $$CNWITHSN osimage=__GETNODEATTR($$CNWITHSN,os)__-__GETNODEATTR($$CNWITHSN,arch)__-netboot-compute check:rc==0 +cmd:rsetboot $$CNWITHSN net +check:rc==0 cmd:rpower $$CNWITHSN reset check:rc==0 cmd:sleep 200 @@ -52,6 +54,8 @@ check:rc==0 check:output=~\d\d:\d\d:\d\d cmd:nodeset $$CNWITHSN netboot check:rc==0 +cmd:rsetboot $$CNWITHSN net +check:rc==0 cmd:rpower $$CNWITHSN reset check:rc==0 cmd:sleep 200 From 28ef6ce19e8feb7ce9ecc21e54d16fc4510a9bc3 Mon Sep 17 00:00:00 2001 From: litingt Date: Fri, 4 Apr 2014 01:18:26 -0700 Subject: [PATCH 04/10] merge 2.8 and 2.9 code --- .../autotest/testcase/installation/linux_diskless_installation | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/installation/linux_diskless_installation b/xCAT-test/autotest/testcase/installation/linux_diskless_installation index d1b2bea77..757b341e6 100644 --- a/xCAT-test/autotest/testcase/installation/linux_diskless_installation +++ b/xCAT-test/autotest/testcase/installation/linux_diskless_installation @@ -2,7 +2,7 @@ start:Linux_diskless_installation_flat_ppc64 os:Linux cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 -cmd:makedns -n +cmd:makedns check:rc==0 cmd:service named restart check:rc==0 From 04cc48fdb08d459791c19952f0ea9e300bf43509 Mon Sep 17 00:00:00 2001 From: litingt Date: Fri, 4 Apr 2014 01:24:46 -0700 Subject: [PATCH 05/10] add case from 2.9 to 2.8 branch --- .../linux_diskless_installation_x86_64_sles | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 xCAT-test/autotest/testcase/installation/linux_diskless_installation_x86_64_sles diff --git a/xCAT-test/autotest/testcase/installation/linux_diskless_installation_x86_64_sles b/xCAT-test/autotest/testcase/installation/linux_diskless_installation_x86_64_sles new file mode 100644 index 000000000..17a87bdf9 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/linux_diskless_installation_x86_64_sles @@ -0,0 +1,55 @@ +start:Linux_diskless_installation_flat_x86_64_sles +os:Linux +cmd:makedns -n +check:rc==0 +cmd:service named restart +check:rc==0 +cmd:makeconservercf $$CN +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:sleep 60 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:service dhcpd restart +check:rc==0 +cmd:cat /var/lib/dhcp/db/dhcpd.leases| grep $$CN +check:output=~$$CN +cmd:if [ ! -d /install/custom/netboot/sles ]; then mkdir -p /install/custom/netboot/sles; fi +check:rc==0 +cmd:if [ ! -e /install/custom/netboot/sles/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/sles/compute.synclist; fi +check:rc==0 +cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-__GETNODEATTR($$CN,provmethod)__-__GETNODEATTR($$CN,profile)__ synclists=/install/custom/netboot/sles/compute.synclist +cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/x86_64/compute +check:rc==0 +cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +check:rc==0 +cmd:packimage -o __GETNODEATTR($$CN,os)__ -p compute -a __GETNODEATTR($$CN,arch)__ +check:rc==0 +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute +check:rc==0 +cmd:rsetboot $$CN net +check:rc==0 +cmd:rpower $$CN reset +check:rc==0 +cmd:sleep 200 +cmd:lsdef -l $$CN | grep status +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:nodeset $$CN osimage +check:rc==0 +cmd:rsetboot $$CN net +check:rc==0 +cmd:rpower $$CN reset +check:rc==0 +cmd:sleep 200 +cmd:lsdef -l $$CN | grep status +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +end From dec6b1959a773e37d9c99a8c5b39b1db9c3b531f Mon Sep 17 00:00:00 2001 From: litingt Date: Fri, 4 Apr 2014 01:27:07 -0700 Subject: [PATCH 06/10] merge 2.8 with 2.9 --- .../autotest/testcase/installation/linux_full_installation | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/installation/linux_full_installation b/xCAT-test/autotest/testcase/installation/linux_full_installation index 7c0850c8a..3a404c656 100644 --- a/xCAT-test/autotest/testcase/installation/linux_full_installation +++ b/xCAT-test/autotest/testcase/installation/linux_full_installation @@ -2,7 +2,7 @@ start:Linux_full_installation_flat_ppc64 os:Linux cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 -cmd:makedns -n +cmd:makedns check:rc==0 cmd:service named restart check:rc==0 From 3b57c88ab7d97d586b8b69197bde570c8f188fd9 Mon Sep 17 00:00:00 2001 From: litingt Date: Fri, 4 Apr 2014 01:29:25 -0700 Subject: [PATCH 07/10] add case from 2.9 to 2.8 --- .../linux_full_installation_x86_64_sles | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 xCAT-test/autotest/testcase/installation/linux_full_installation_x86_64_sles diff --git a/xCAT-test/autotest/testcase/installation/linux_full_installation_x86_64_sles b/xCAT-test/autotest/testcase/installation/linux_full_installation_x86_64_sles new file mode 100644 index 000000000..a14c5da1a --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/linux_full_installation_x86_64_sles @@ -0,0 +1,48 @@ +start:Linux_full_installation_flat_x86_64_sles +os:Linux +cmd:makedns -n +check:rc==0 +cmd:service named restart +check:rc==0 +cmd:makeconservercf $$CN +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$CN +check:output=~$$CN +cmd:sleep 60 +cmd:makedhcp -n +check:rc==0 +cmd:makedhcp -a +check:rc==0 +cmd:service dhcpd restart +check:rc==0 +cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute synclists=/install/custom/install/sles/compute.synclist +check:rc==0 +cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +cmd:rsetboot $$CN net +check:rc==0 +cmd:rpower $$CN reset +check:rc==0 +cmd:sleep 2000 +cmd:ping $$CN -c 3 +check:output=~64 bytes from $$CN +cmd:lsdef -l $$CN | grep status +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:nodeset $$CN osimage +check:rc==0 +cmd:rsetboot $$CN net +check:rc==0 +cmd:rpower $$CN reset +check:rc==0 +cmd:sleep 2000 +cmd:ping $$CN -c 3 +check:output=~64 bytes from $$CN +cmd:lsdef -l $$CN | grep status +check:output=~booted +cmd:xdsh $$CN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +end From ff91be5c39e6360883280de6e2f5e80dda14f1bb Mon Sep 17 00:00:00 2001 From: litingt Date: Fri, 4 Apr 2014 01:36:01 -0700 Subject: [PATCH 08/10] merge 2.9 case to 2.8 --- .../linux_sn_installation_x86_64_redhat | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 xCAT-test/autotest/testcase/installation/linux_sn_installation_x86_64_redhat diff --git a/xCAT-test/autotest/testcase/installation/linux_sn_installation_x86_64_redhat b/xCAT-test/autotest/testcase/installation/linux_sn_installation_x86_64_redhat new file mode 100644 index 000000000..66815d00e --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/linux_sn_installation_x86_64_redhat @@ -0,0 +1,53 @@ +#first define +start:Linux_sn_installation_flat_x86_64_redhat +os:Linux +cmd:makedns -n +check:rc==0 +cmd:chdef $$SN groups=service,all +check:rc==0 +cmd:chdef -t group service arch=__GETNODEATTR($$SN,arch)__ os=__GETNODEATTR($$SN,os)__ profile=service netboot=xnba primarynic=eth0 +check:rc==0 +cmd:chdef -t group -o service setupnfs=1 setupdhcp=1 setuptftp=1 setupnameserver=1 setupconserver=1 +check:rc==0 +cmd:chdef $$SN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 +cmd:makeconservercf +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$SN +check:output=~$$SN +cmd:sleep 60 +cmd:makedhcp -n +cmd:makedhcp -a +check:rc==0 +cmd:service dhcpd restart +check:rc==0 +cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-service synclists=/install/custom/install/rh/service.synclist +check:rc==0 +cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.rhels6.x86_64.otherpkgs.pkglist +check:rc==0 +cmd:mkdir -p /install/post/otherpkgs/__GETNODEATTR($$CN,os)__/x86_64/xcat/ +check:rc==0 +cmd:cp -rf /xcat-core /install/post/otherpkgs/__GETNODEATTR($$CN,os)__/x86_64/xcat/ +check:rc==0 +cmd:createrepo /install/post/otherpkgs/__GETNODEATTR($$CN,os)__/x86_64/xcat/xcat-core +check:rc==0 +cmd:for i in mysql-server mysql mysql-bench mysql-devel mysql-connector-odbc; do cat /opt/xcat/share/xcat/install/rh/service.rhels6.x86_64.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/rh/service.rhels6.x86_64.pkglist; fi done +cmd:chtab node=service postscripts.postscripts="servicenode,odbcsetup" +check:rc==0 +cmd:nodeset $$SN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-service +check:rc==0 +cmd:rsetboot $$SN net +check:rc==0 +cmd:rpower $$SN reset +check:rc==0 +cmd:sleep 700 +cmd:ping $$SN -c 3 +check:output=~64 bytes from $$SN +cmd:lsdef -l $$SN | grep status +check:output=~booted +cmd:xdsh $$SN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:xdsh $$SN nodels +check:rc==0 +end From f41edd8ea936f345082145e51324b53a14a1cef5 Mon Sep 17 00:00:00 2001 From: litingt Date: Fri, 4 Apr 2014 01:38:35 -0700 Subject: [PATCH 09/10] merge 2.9 case to 2.8 --- .../linux_sn_installation_x86_64_sles | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 xCAT-test/autotest/testcase/installation/linux_sn_installation_x86_64_sles diff --git a/xCAT-test/autotest/testcase/installation/linux_sn_installation_x86_64_sles b/xCAT-test/autotest/testcase/installation/linux_sn_installation_x86_64_sles new file mode 100644 index 000000000..74600f1e7 --- /dev/null +++ b/xCAT-test/autotest/testcase/installation/linux_sn_installation_x86_64_sles @@ -0,0 +1,53 @@ +#first define +start:Linux_sn_installation_flat_x86_64_sles +os:Linux +cmd:makedns -n +check:rc==0 +cmd:chdef $$SN groups=ipmi,service,all +check:rc==0 +cmd:chdef -t group service arch=__GETNODEATTR($$SN,arch)__ os=__GETNODEATTR($$SN,os)__ profile=service netboot=xnba primarynic=eth0 +check:rc==0 +cmd:chdef -t group -o service setupnfs=1 setupdhcp=1 setuptftp=1 setupnameserver=1 setupconserver=1 +check:rc==0 +cmd:chdef $$SN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 +cmd:makeconservercf +check:rc==0 +cmd:cat /etc/conserver.cf | grep $$SN +check:output=~$$SN +cmd:sleep 60 +cmd:makedhcp -n +cmd:makedhcp -a +check:rc==0 +cmd:service dhcpd restart +check:rc==0 +cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-service synclists=/install/custom/install/sles/service.synclist +check:rc==0 +cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/sles/service.sles11.x86_64.otherpkgs.pkglist +check:rc==0 +cmd:mkdir -p /install/post/otherpkgs/sles11.2/x86_64/xcat/ +check:rc==0 +cmd:cp -rf /xcat-core /install/post/otherpkgs/sles11.2/x86_64/xcat/ +check:rc==0 +cmd:createrepo /install/post/otherpkgs/sles11.2/x86_64/xcat/xcat-core +check:rc==0 +cmd:for i in mysql-client libmysqlclient_r15 libqt4-sql-mysql libmysqlclient15 perl-DBD-mysql mysql iscsi-initiator-utils bridge-utils kvm perl-Sys-Virt; do cat /opt/xcat/share/xcat/install/sles/service.sles11.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/sles/service.sles11.pkglist; fi done +cmd:chtab node=service postscripts.postscripts="servicenode,odbcsetup" +check:rc==0 +cmd:nodeset $$SN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-service +check:rc==0 +cmd:rsetboot $$SN net +check:rc==0 +cmd:rpower $$SN reset +check:rc==0 +cmd:sleep 3000 +cmd:ping $$SN -c 3 +check:output=~64 bytes from $$SN +cmd:lsdef -l $$SN | grep status +check:output=~booted +cmd:xdsh $$SN date +check:rc==0 +check:output=~\d\d:\d\d:\d\d +cmd:xdsh $$SN nodels +check:rc==0 +end From 2474427a83a138fda4164d2d0fa0effd2c01087f Mon Sep 17 00:00:00 2001 From: ligc Date: Fri, 4 Apr 2014 04:33:37 -0400 Subject: [PATCH 10/10] Temporary remove the grub2-xcat dependency for PCM, it blockes PCM test --- xCAT-server/xCAT-server.spec | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/xCAT-server/xCAT-server.spec b/xCAT-server/xCAT-server.spec index eab526467..91f5b5351 100755 --- a/xCAT-server/xCAT-server.spec +++ b/xCAT-server/xCAT-server.spec @@ -16,19 +16,23 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root AutoReqProv: no %endif -# AIX will build with an arch of "ppc" -# also need to fix Requires for AIX -%ifos linux -BuildArch: noarch -Requires: perl-IO-Socket-SSL perl-XML-Simple perl-XML-Parser grub2-xcat -Obsoletes: atftp-xcat -%endif - %define fsm %(if [ "$fsm" = "1" ];then echo 1; else echo 0; fi) %define pcm %(if [ "$pcm" = "1" ];then echo 1; else echo 0; fi) %define notpcm %(if [ "$pcm" = "1" ];then echo 0; else echo 1; fi) +# AIX will build with an arch of "ppc" +# also need to fix Requires for AIX +%ifos linux +BuildArch: noarch +Requires: perl-IO-Socket-SSL perl-XML-Simple perl-XML-Parser +Obsoletes: atftp-xcat +%endif + +%if %notpcm +Requires: grub2-xcat +%endif + %if %fsm # nothing needed here %else