diff --git a/xCAT-test/autotest/testcase/commoncmd/check_provisioning_source.sh b/xCAT-test/autotest/testcase/commoncmd/check_provisioning_source.sh index 9b6f7f632..0310e6fb3 100755 --- a/xCAT-test/autotest/testcase/commoncmd/check_provisioning_source.sh +++ b/xCAT-test/autotest/testcase/commoncmd/check_provisioning_source.sh @@ -21,7 +21,8 @@ # Run --baseline before provisioning: an earlier flat run leaves management-node requests for the # same address, and counting the whole log fails a later hierarchical run for them. And only a # request under /install or /tftpboot is a boot payload: a 404 for /favicon.ico is a request from -# the compute node that carries no payload, and it must not stand for one. +# the compute node that carries no payload, and it must not stand for one. wget asks for the root +# image as //install/..., so the leading slash repeats. # # Scope: the PXE ROM exchange hands out xcat/xnba.kpxe over TFTP and httpd never sees it. # xnba.kpxe is the same binary on both servers, so it decides nothing about the fetch source. @@ -102,7 +103,7 @@ count_local_requests() if ($1 != ip && $2 != ip) next path = "" for (i = 1; i <= NF; i++) if ($i ~ /^"(GET|HEAD|POST)$/) { path = $(i + 1); break } - if (path ~ /^\/(install|tftpboot)\//) payload++ + if (path ~ /^\/+(install|tftpboot)\//) payload++ } END { print token, "ok", payload + 0, fresh + 0, total + 0 } ' $logs @@ -202,10 +203,11 @@ if [ "$SN_STATE" != ok ]; then RC=1 fi -# The management node provisioned the service node over http, so its log gains lines on every -# hierarchical run. A log with nothing new cannot show that the management node served nothing. -if [ "$MN_STATE" != ok ] || [ "$MN_NEW" -eq 0 ]; then - echo "provisioning source error: no httpd access log with new entries could be read on $MN" >&2 +# An empty log answers nothing: it counts 0 whether the management node served the compute node +# or not. It does NOT have to gain lines after the baseline -- it provisions the service node +# before it and is then idle, and that silence is the hierarchical result. +if [ "$MN_STATE" != ok ] || [ "$MN_LINES" -eq 0 ]; then + echo "provisioning source error: no httpd access log with any entry could be read on $MN" >&2 RC=1 fi