From 8cce4d90784afbd5662b9cce8eae89924cb19677 Mon Sep 17 00:00:00 2001 From: huweihua Date: Sun, 31 Mar 2019 22:28:06 -0400 Subject: [PATCH 1/3] add more debug information to investigate why operate goconserver frequently will trigger problem --- xCAT-test/autotest/testcase/install_xCAT/case0 | 9 +++++++++ .../installation/reg_linux_diskless_installation_flat | 8 ++++++++ xCAT-test/autotest/testcase/xcatconfig/case0 | 6 ++++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/install_xCAT/case0 b/xCAT-test/autotest/testcase/install_xCAT/case0 index 80d030fa9..87b29595a 100644 --- a/xCAT-test/autotest/testcase/install_xCAT/case0 +++ b/xCAT-test/autotest/testcase/install_xCAT/case0 @@ -37,15 +37,24 @@ cmd:cp /xcat-dep*.tar.bz2 /install_xCAT_xcat-dep.tar.bz2 check:rc==0 cmd:ls /go-xcat check:rc==0 +cmd:service goconserver status +cmd:service conserver status cmd:chmod 777 /go-xcat; /go-xcat --xcat-core=/install_xCAT_xcat-core.tar.bz2 --xcat-dep=/install_xCAT_xcat-dep.tar.bz2 -y install; check:rc==0 cmd:source "/etc/profile.d/xcat.sh";env;lsxcatd -v check:rc==0 check:output=~Version +cmd:service goconserver status +cmd:service conserver status cmd:service xcatd status check:rc==0 check:output=~running cmd:rm -rf /install_xCAT_xcat-core.tar.bz2 /install_xCAT_xcat-dep.tar.bz2 +cmd:service goconserver stop +cmd:service conserver stop +cmd:sleep 5 +cmd:service goconserver status +cmd:service conserver status end diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat index c1bfd7c5c..30928dc85 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat @@ -11,9 +11,13 @@ check:rc==0 cmd:makedns -n check:rc==0 +cmd:service goconserver status +cmd:service conserver status cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$CN; else makeconservercf $$CN; fi check:rc==0 cmd:sleep 20 +cmd:service goconserver status +cmd:service conserver status cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]] && [[ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]]; then getmacs -D $$CN; fi check:rc==0 cmd:makedhcp -n @@ -76,7 +80,11 @@ check:rc==0 cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" cmd:xdsh $$CN "cat /test.synclist" check:rc==0 +cmd:service goconserver status +cmd:service conserver status cmd:if [ -x /usr/bin/goconserver ]; then makegocons -d $$CN; else makeconservercf -d $$CN; fi +cmd:service goconserver status +cmd:service conserver status cmd:if [[ -f /test.synclist.bak ]] ;then mv -f /test.synclist.bak /test.synclist;else rm -rf /test.synclist;fi cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists= check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcatconfig/case0 b/xCAT-test/autotest/testcase/xcatconfig/case0 index 038d238fc..33d2f71df 100644 --- a/xCAT-test/autotest/testcase/xcatconfig/case0 +++ b/xCAT-test/autotest/testcase/xcatconfig/case0 @@ -99,6 +99,8 @@ description:To regenerate cretials label:mn_only #step1:backup: /etc/xcat/ca /etc/xcat/cert cmd:cp -r /etc/xcat/ca /etc/xcat/cabak;cp -r /etc/xcat/cert /etc/xcat/certbak +cmd: service goconserver status +cmd:service conserver status #step2:run command and check the output cmd:xcatconfig -c 2>&1 | tee /tmp/xcatconfig.test check:rc==0 @@ -118,8 +120,8 @@ cmd:rm -rf /tmp/xcatconfig.test check:rc==0 cmd:rm -rf /etc/xcat/cabak /etc/xcat/certbak check:rc==0 -cmd:if service goconserver status > /dev/null 2>&1; then service goconserver restart; fi -cmd:if service conserver status > /dev/null 2>&1; then service conserver restart ; fi +cmd:if service goconserver status; then echo "----->To restart goconserver"; service goconserver restart; sleep 10; echo "---------------------"; service goconserver status;echo "---------------------"; makegocons $$CN; fi +cmd:if service conserver status; then echo "---->To restart conserver"; service conserver restart;sleep 10;echo "---------------------"; service conserver status;echo "---------------------"; makeconservercf $$CN; fi cmd:if lsdef service > /dev/null 2>&1; then updatenode service -P servicenode;fi check:rc==0 cmd:if lsdef service > /dev/null 2>&1; then rpower $$CN stat;fi From d5ecc62fdb71e3e340951be0700c59ec58dfe663 Mon Sep 17 00:00:00 2001 From: huweihua Date: Tue, 2 Apr 2019 21:53:17 -0400 Subject: [PATCH 2/3] move useless lines --- .../reg_linux_diskless_installation_flat | 8 ----- xCAT-test/autotest/testcase/xcatconfig/case0 | 29 +++++++++++++++++-- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat index 30928dc85..c1bfd7c5c 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat @@ -11,13 +11,9 @@ check:rc==0 cmd:makedns -n check:rc==0 -cmd:service goconserver status -cmd:service conserver status cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$CN; else makeconservercf $$CN; fi check:rc==0 cmd:sleep 20 -cmd:service goconserver status -cmd:service conserver status cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]] && [[ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]]; then getmacs -D $$CN; fi check:rc==0 cmd:makedhcp -n @@ -80,11 +76,7 @@ check:rc==0 cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" cmd:xdsh $$CN "cat /test.synclist" check:rc==0 -cmd:service goconserver status -cmd:service conserver status cmd:if [ -x /usr/bin/goconserver ]; then makegocons -d $$CN; else makeconservercf -d $$CN; fi -cmd:service goconserver status -cmd:service conserver status cmd:if [[ -f /test.synclist.bak ]] ;then mv -f /test.synclist.bak /test.synclist;else rm -rf /test.synclist;fi cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists= check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcatconfig/case0 b/xCAT-test/autotest/testcase/xcatconfig/case0 index 33d2f71df..f3ba948eb 100644 --- a/xCAT-test/autotest/testcase/xcatconfig/case0 +++ b/xCAT-test/autotest/testcase/xcatconfig/case0 @@ -120,8 +120,33 @@ cmd:rm -rf /tmp/xcatconfig.test check:rc==0 cmd:rm -rf /etc/xcat/cabak /etc/xcat/certbak check:rc==0 -cmd:if service goconserver status; then echo "----->To restart goconserver"; service goconserver restart; sleep 10; echo "---------------------"; service goconserver status;echo "---------------------"; makegocons $$CN; fi -cmd:if service conserver status; then echo "---->To restart conserver"; service conserver restart;sleep 10;echo "---------------------"; service conserver status;echo "---------------------"; makeconservercf $$CN; fi +cmd:#!/bin/bash +rc=0 +if service goconserver status;then + echo "----->goconserver is working, to restart goconserver" + service goconserver restart + sleep 5 + echo "----->To check the status of goconserver" + if ! service goconserver status; then + rc=1 + fi + echo "----->To enforce conserver stop" + service conserver stop + sleep 5 + echo "----->To check the status of conserver" + if service conserver status; then + rc=1 + fi +elif service conserver status;then + echo "----->conserver is working, to restart conserver" + service conserver restart + echo "----->To check the status of conserver" + if ! service conserver status; then + rc=1 + fi +fi +exit $rc +check:rc==0 cmd:if lsdef service > /dev/null 2>&1; then updatenode service -P servicenode;fi check:rc==0 cmd:if lsdef service > /dev/null 2>&1; then rpower $$CN stat;fi From d1ac7c6327618ab25f3452e7dd76f98e8f89c4d8 Mon Sep 17 00:00:00 2001 From: huweihua Date: Wed, 3 Apr 2019 02:16:17 -0400 Subject: [PATCH 3/3] remove useless sleep --- xCAT-test/autotest/testcase/xcatconfig/case0 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xCAT-test/autotest/testcase/xcatconfig/case0 b/xCAT-test/autotest/testcase/xcatconfig/case0 index f3ba948eb..05f888c72 100644 --- a/xCAT-test/autotest/testcase/xcatconfig/case0 +++ b/xCAT-test/autotest/testcase/xcatconfig/case0 @@ -123,16 +123,14 @@ check:rc==0 cmd:#!/bin/bash rc=0 if service goconserver status;then - echo "----->goconserver is working, to restart goconserver" + echo "----->goconserver is working, to restart goconserver and enforce conserver stop" service goconserver restart + service conserver stop sleep 5 echo "----->To check the status of goconserver" if ! service goconserver status; then rc=1 fi - echo "----->To enforce conserver stop" - service conserver stop - sleep 5 echo "----->To check the status of conserver" if service conserver status; then rc=1 @@ -140,6 +138,7 @@ if service goconserver status;then elif service conserver status;then echo "----->conserver is working, to restart conserver" service conserver restart + sleep 5 echo "----->To check the status of conserver" if ! service conserver status; then rc=1