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="" 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 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 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 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 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 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 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 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 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