From d5e706ec438dd1ba72a5319ef30f7ed7886c6349 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Fri, 21 Apr 2017 00:21:05 -0400 Subject: [PATCH 1/5] This case is to verify bug 2614. To support addkcmdline when netboot=xnba --- xCAT-test/autotest/testcase/nodeset/cases0 | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/xCAT-test/autotest/testcase/nodeset/cases0 b/xCAT-test/autotest/testcase/nodeset/cases0 index 3f81504ec..792ecbff2 100644 --- a/xCAT-test/autotest/testcase/nodeset/cases0 +++ b/xCAT-test/autotest/testcase/nodeset/cases0 @@ -173,3 +173,27 @@ check:output=~Warning: testnode1: petitboot might be invalid|testnode1 could not cmd:noderm testnode1 end +start:nodeset_addkcmdline_bug2614 +description: This case is to verify bug 2614. To support addkcmdline when netboot=xnba. +cmd:mkdef -t node -o testnode1 arch=x86_64 cons=kvm groups=kvm ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=kvm monserver=10.1.1.1 nameservers=10.1.1.1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 +os=__GETNODEATTR($$CN,os)__ +check:rc==0 +cmd:cp -f /etc/hosts /etc/hosts.bak +cmd:echo "10.1.1.200 testnode1" >> /etc/hosts +cmd:makedns -n +check:rc==0 +cmd:chdef testnode1 netboot=xnba addkcmdline=rd.break=pre-pivot +check:rc==0 +cmd: mkdef "__GETNODEATTR($$CN,os)__-x86_64-install-compute" -u profile=compute provmethod=install osvers=__GETNODEATTR($$CN,os)__ +check:rc==0 +cmd:nodeset testnode1 osimage=__GETNODEATTR($$CN,os)__-x86_64-install-compute +check:rc==0 +cmd:grep "rd.break=pre-pivot" /tftpboot/xcat/xnba/nodes/testnode1 +check:rc==0 +cmd:grep "rd.break=pre-pivot" /tftpboot/xcat/xnba/nodes/testnode1.elilo +check:rc==0 +cmd:noderm testnode1 +cmd:rmdef -t osimage -o "__GETNODEATTR($$CN,os)__-x86_64-install-compute" +cmd:cp -f /etc/hosts.bak /etc/hosts +end + From 1919e5a1ed6bd64ce919e011a93c2a83772a69bb Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Fri, 21 Apr 2017 03:13:56 -0400 Subject: [PATCH 2/5] update according to comments --- xCAT-test/autotest/testcase/nodeset/cases0 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/nodeset/cases0 b/xCAT-test/autotest/testcase/nodeset/cases0 index 792ecbff2..539a57bae 100644 --- a/xCAT-test/autotest/testcase/nodeset/cases0 +++ b/xCAT-test/autotest/testcase/nodeset/cases0 @@ -178,7 +178,7 @@ description: This case is to verify bug 2614. To support addkcmdline when netboo cmd:mkdef -t node -o testnode1 arch=x86_64 cons=kvm groups=kvm ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=kvm monserver=10.1.1.1 nameservers=10.1.1.1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 os=__GETNODEATTR($$CN,os)__ check:rc==0 -cmd:cp -f /etc/hosts /etc/hosts.bak +cmd:cp -f /etc/hosts /etc/hosts.xcattestbak cmd:echo "10.1.1.200 testnode1" >> /etc/hosts cmd:makedns -n check:rc==0 @@ -194,6 +194,6 @@ cmd:grep "rd.break=pre-pivot" /tftpboot/xcat/xnba/nodes/testnode1.elilo check:rc==0 cmd:noderm testnode1 cmd:rmdef -t osimage -o "__GETNODEATTR($$CN,os)__-x86_64-install-compute" -cmd:cp -f /etc/hosts.bak /etc/hosts +cmd:cp -f /etc/hosts.xcattestbak /etc/hosts end From 465f99e768ceb6d17fb6ed407b8a1ffd6d4aaf51 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Fri, 21 Apr 2017 04:41:13 -0400 Subject: [PATCH 3/5] update according to comments --- xCAT-test/autotest/testcase/nodeset/cases0 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xCAT-test/autotest/testcase/nodeset/cases0 b/xCAT-test/autotest/testcase/nodeset/cases0 index 539a57bae..91bd23af0 100644 --- a/xCAT-test/autotest/testcase/nodeset/cases0 +++ b/xCAT-test/autotest/testcase/nodeset/cases0 @@ -173,8 +173,8 @@ check:output=~Warning: testnode1: petitboot might be invalid|testnode1 could not cmd:noderm testnode1 end -start:nodeset_addkcmdline_bug2614 -description: This case is to verify bug 2614. To support addkcmdline when netboot=xnba. +start:nodeset_addkcmdline +description: This case is to verify when netboot=xnba, addkcmdline is correctly supported. cmd:mkdef -t node -o testnode1 arch=x86_64 cons=kvm groups=kvm ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=kvm monserver=10.1.1.1 nameservers=10.1.1.1 profile=compute tftpserver=10.1.1.1 xcatmaster=10.1.1.1 os=__GETNODEATTR($$CN,os)__ check:rc==0 @@ -188,9 +188,7 @@ cmd: mkdef "__GETNODEATTR($$CN,os)__-x86_64-install-compute" -u profile=compute check:rc==0 cmd:nodeset testnode1 osimage=__GETNODEATTR($$CN,os)__-x86_64-install-compute check:rc==0 -cmd:grep "rd.break=pre-pivot" /tftpboot/xcat/xnba/nodes/testnode1 -check:rc==0 -cmd:grep "rd.break=pre-pivot" /tftpboot/xcat/xnba/nodes/testnode1.elilo +cmd:find -L /tftpboot -name '*testnode1*' -exec cat {} + | grep "rd.break=pre-pivot" check:rc==0 cmd:noderm testnode1 cmd:rmdef -t osimage -o "__GETNODEATTR($$CN,os)__-x86_64-install-compute" From 1ce6191e768e23fa7f3079a4cec9b18cab0a8779 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Fri, 21 Apr 2017 04:43:18 -0400 Subject: [PATCH 4/5] remove invalid case --- xCAT-test/autotest/testcase/nodeset/cases1 | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 xCAT-test/autotest/testcase/nodeset/cases1 diff --git a/xCAT-test/autotest/testcase/nodeset/cases1 b/xCAT-test/autotest/testcase/nodeset/cases1 deleted file mode 100644 index 816f4ee59..000000000 --- a/xCAT-test/autotest/testcase/nodeset/cases1 +++ /dev/null @@ -1,9 +0,0 @@ -start:nodeset_addkcmdline -cmd:chdef $$CN addkcmdline=debug -check:rc==0 -cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute -check:rc==0 -cmd:find -L /tftpboot -name '*$$CN*' -exec cat {} + | grep debug -check:rc==0 -cmd:chdef $$CN addkcmdline= -end From 4228ec1efba82749e19738f2c301c68b6f8837d0 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Fri, 21 Apr 2017 04:56:56 -0400 Subject: [PATCH 5/5] update for comments --- xCAT-test/autotest/testcase/nodeset/cases0 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/nodeset/cases0 b/xCAT-test/autotest/testcase/nodeset/cases0 index 91bd23af0..6972152d3 100644 --- a/xCAT-test/autotest/testcase/nodeset/cases0 +++ b/xCAT-test/autotest/testcase/nodeset/cases0 @@ -188,7 +188,9 @@ cmd: mkdef "__GETNODEATTR($$CN,os)__-x86_64-install-compute" -u profile=compute check:rc==0 cmd:nodeset testnode1 osimage=__GETNODEATTR($$CN,os)__-x86_64-install-compute check:rc==0 -cmd:find -L /tftpboot -name '*testnode1*' -exec cat {} + | grep "rd.break=pre-pivot" +cmd:grep "rd.break=pre-pivot" /tftpboot/xcat/xnba/nodes/testnode1 +check:rc==0 +cmd:grep "rd.break=pre-pivot" /tftpboot/xcat/xnba/nodes/testnode1.elilo check:rc==0 cmd:noderm testnode1 cmd:rmdef -t osimage -o "__GETNODEATTR($$CN,os)__-x86_64-install-compute"