From edb7d3217a9727f9b2e07e8e73b04701977194a2 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Fri, 2 Oct 2026 16:36:52 -0300 Subject: [PATCH] fix(xcat-core): encrypted_passwd_openssl_diskfull reports no password on openEuler The case failed on openeuler20.03sp4, openeuler22.03sp4 and openeuler24.03sp4, 3 occurrences in xcat-ci build 89. The diff check failed, not the extraction. encrypted_passwd_openssl_diskfull is the only case in passwd/case0 that selects the extraction by distribution. It greps /etc/*release for SUSE, then for "Red Hat|CentOS|Rocky|Alma", then for Ubuntu. On an openEuler management node all three miss and openEuler matches, so the case takes the final arm, prints "Sorry,this is not supported os", writes nothing to /tmp/instcryptedpasswd, and the diff against the password table reports rc=2. openEuler now takes the Red Hat arm. compute.openeuler.tmpl writes "rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password#", which is byte-identical to every EL template, so field 3 holds the hash and the EL cells already pass with that arm. The diff check is unchanged, so the case still fails when the extraction reads the wrong field: field 3 of the expanded line gives diff rc=0 and field 4 gives rc=1. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> (cherry picked from commit a1b9372c413f54d18ba6a60d3839e9f75d7b8261) --- xCAT-test/autotest/testcase/passwd/case0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/passwd/case0 b/xCAT-test/autotest/testcase/passwd/case0 index 9b5954d68..19a0825d6 100644 --- a/xCAT-test/autotest/testcase/passwd/case0 +++ b/xCAT-test/autotest/testcase/passwd/case0 @@ -235,7 +235,7 @@ check:rc==0 cmd:if grep Ubuntu /etc/*release;then if [ ! -e /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot/initrd.gz ]; then copycds $$ISO;mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot/;touch /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot/initrd.gz;fi;fi cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute check:rc==0 -cmd:if grep SUSE /etc/*release;then grep '\$6\$' /install/autoinst/$$CN | awk 'gsub(/^ *| *$/,"")'| awk -v head="" -v tail="" '{print substr($0, index($0,head)+length(head),index($0,tail)-index($0,head)-length(head))}' > /tmp/instcryptedpasswd; elif grep -E "Red Hat|CentOS|Rocky|Alma" /etc/*release;then grep '\$6\$' /install/autoinst/$$CN |awk -F " " '{print $3}' > /tmp/instcryptedpasswd; elif grep Ubuntu /etc/*release;then grep '\$6\$' /install/autoinst/$$CN |awk -F " " '{print $4}' > /tmp/instcryptedpasswd;else echo "Sorry,this is not supported os"; fi +cmd:if grep SUSE /etc/*release;then grep '\$6\$' /install/autoinst/$$CN | awk 'gsub(/^ *| *$/,"")'| awk -v head="" -v tail="" '{print substr($0, index($0,head)+length(head),index($0,tail)-index($0,head)-length(head))}' > /tmp/instcryptedpasswd; elif grep -E "Red Hat|CentOS|Rocky|Alma|openEuler" /etc/*release;then grep '\$6\$' /install/autoinst/$$CN |awk -F " " '{print $3}' > /tmp/instcryptedpasswd; elif grep Ubuntu /etc/*release;then grep '\$6\$' /install/autoinst/$$CN |awk -F " " '{print $4}' > /tmp/instcryptedpasswd;else echo "Sorry,this is not supported os"; fi check:rc==0 cmd:diff /tmp/tmpcryptedpasswd /tmp/instcryptedpasswd check:rc==0