From 6282677cab6ad01226791e960eb3360d5dcc415a Mon Sep 17 00:00:00 2001 From: mm667937 Date: Wed, 23 Oct 2024 16:35:51 +0200 Subject: [PATCH 1/7] more detail for failed test about zowe.yaml check Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 15 ++++- pswi/scripts/base_diff.txt | 126 +++++++++++++++++++++++-------------- 2 files changed, 93 insertions(+), 48 deletions(-) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index 346c997e45..29adf86401 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -55,6 +55,17 @@ pwd cp ../example-zowe.yaml example-zowe.yaml -diff --ed example-zowe.yaml zowe_.yaml > diff.txt || true +diff example-zowe.yaml zowe_.yaml > diff.txt || true -diff --ed diff.txt scripts/base_diff.txt > final_diff.txt +diff diff.txt scripts/base_diff.txt > final_diff.txt || true + +concat=`cat final_diff.txt` + +if [ -n "$concat" ] +then + echo "There are some discrepancies between the example-zowe.yaml and the zowe.yaml created by ZWECONF.xml workflow." + echo "Please add or delete the workflow so everything is there." + echo "First line is from the example and the line bellow is from the workflow." + echo $concat + exit -1 +fi diff --git a/pswi/scripts/base_diff.txt b/pswi/scripts/base_diff.txt index ad4425a61f..6dd8a5668f 100644 --- a/pswi/scripts/base_diff.txt +++ b/pswi/scripts/base_diff.txt @@ -1,46 +1,80 @@ -471c - home: "#delete_me#" -. -456c - home: "#delete_me#" -. -281c - runtimeDirectory: "/tmp" -. -106c - # directory: -. -100,103c - # certificate: - # Type of certificate storage. Valid values are: PKCS12, JCEKS, JCECCAKS, JCERACFKS, JCECCARACFKS, or JCEHYBRIDRACFKS - # type: - # pkcs12: -. -66,91c - # Security related configurations. This setup is optional. - security: - # security product name. Can be RACF, ACF2 or TSS - product: RACF - # security group name - groups: - # Zowe admin user group - admin: ZWEADMIN - # Zowe STC group - stc: ZWEADMIN - # Zowe SysProg group - sysProg: ZWEADMIN - # security user name - users: - # Zowe runtime user name of main service - zowe: ZWESVUSR - # Zowe runtime user name of ZIS - zis: ZWESIUSR - # STC names - stcs: - # STC name of Zowe main service - zowe: ZWESLSTC - # STC name of Zowe ZIS - zis: ZWESISTC - # STC name of Zowe ZIS Auxiliary Server - aux: ZWESASTC -. +66,91c66,91 +< # # Security related configurations. This setup is optional. +< # security: +< # # security product name. Can be RACF, ACF2 or TSS +< # product: RACF +< # # security group name +< # groups: +< # # Zowe admin user group +< # admin: ZWEADMIN +< # # Zowe STC group +< # stc: ZWEADMIN +< # # Zowe SysProg group +< # sysProg: ZWEADMIN +< # # security user name +< # users: +< # # Zowe runtime user name of main service +< # zowe: ZWESVUSR +< # # Zowe runtime user name of ZIS +< # zis: ZWESIUSR +< # # STC names +< # stcs: +< # # STC name of Zowe main service +< # zowe: ZWESLSTC +< # # STC name of Zowe ZIS +< # zis: ZWESISTC +< # # STC name of Zowe ZIS Auxiliary Server +< # aux: ZWESASTC +--- +> # Security related configurations. This setup is optional. +> security: +> # security product name. Can be RACF, ACF2 or TSS +> product: RACF +> # security group name +> groups: +> # Zowe admin user group +> admin: ZWEADMIN +> # Zowe STC group +> stc: ZWEADMIN +> # Zowe SysProg group +> sysProg: ZWEADMIN +> # security user name +> users: +> # Zowe runtime user name of main service +> zowe: ZWESVUSR +> # Zowe runtime user name of ZIS +> zis: ZWESIUSR +> # STC names +> stcs: +> # STC name of Zowe main service +> zowe: ZWESLSTC +> # STC name of Zowe ZIS +> zis: ZWESISTC +> # STC name of Zowe ZIS Auxiliary Server +> aux: ZWESASTC +100,103c100,103 +< certificate: +< # Type of certificate storage. Valid values are: PKCS12, JCERACFKS. APIML additionally supports: JCEKS, JCECCAKS, JCECCARACFKS, or JCEHYBRIDRACFKS +< type: PKCS12 +< pkcs12: +--- +> # certificate: +> # Type of certificate storage. Valid values are: PKCS12, JCEKS, JCECCAKS, JCERACFKS, JCECCARACFKS, or JCEHYBRIDRACFKS +> # type: +> # pkcs12: +106c106 +< directory: /var/zowe/keystore +--- +> # directory: +281c281 +< runtimeDirectory: "" +--- +> runtimeDirectory: "/tmp" +456c456 +< home: "" +--- +> home: "#delete_me#" +471c471 +< home: "" +--- +> home: "#delete_me#" From 363228a2292f10164537d42e76f75e525877abad Mon Sep 17 00:00:00 2001 From: mm667937 Date: Mon, 4 Nov 2024 15:57:14 +0100 Subject: [PATCH 2/7] smol changes Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index a7a65263c4..df936b3f56 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -55,11 +55,11 @@ pwd cp ../example-zowe.yaml example-zowe.yaml -diff example-zowe.yaml zowe_.yaml > diff.txt || true +diff example-zowe.yaml zowe_.yaml >diff.txt || true -diff diff.txt scripts/base_diff.txt > final_diff.txt || true +diff diff.txt scripts/base_diff.txt >final_diff.txt || true -concat=`cat final_diff.txt` +concat=$(cat final_diff.txt) if [ -n "$concat" ] then From 1253903a0a4cc731dabe64dfda5debfb22a9d69c Mon Sep 17 00:00:00 2001 From: mm667937 Date: Mon, 4 Nov 2024 16:47:08 +0100 Subject: [PATCH 3/7] probably fixed the log problem Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index df936b3f56..f3a927f036 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -4,6 +4,9 @@ export ZOSMF_SYSTEM="S0W1" export JOBNAME="ZWECONF1" export HOST=${ZOSMF_URL#https:\/\/} export BASE_URL="${ZOSMF_URL}:${ZOSMF_PORT}" +CURR_TIME=$(date +%s) +export LOG_DIR="logs/$CURR_TIME" +mkdir -p $LOG_DIR WORK_MOUNT="/tmp" echo "Changing runtime path in ZWECONF.properties." @@ -66,6 +69,7 @@ then echo "There are some discrepancies between the example-zowe.yaml and the zowe.yaml created by ZWECONF.xml workflow." echo "Please add or delete the workflow so everything is there." echo "First line is from the example and the line bellow is from the workflow." + #TODO: while loop final_diff.txt and delete every line that doesn't start with '<' and redirect into final_final_diff.txt and do cat final_final_diff.txt echo $concat exit -1 fi From 0bb131cab460697d934e2d25316b9eca9d9d4cc3 Mon Sep 17 00:00:00 2001 From: mm667937 Date: Mon, 4 Nov 2024 17:16:23 +0100 Subject: [PATCH 4/7] while Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index f3a927f036..41901ba08a 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -69,7 +69,11 @@ then echo "There are some discrepancies between the example-zowe.yaml and the zowe.yaml created by ZWECONF.xml workflow." echo "Please add or delete the workflow so everything is there." echo "First line is from the example and the line bellow is from the workflow." - #TODO: while loop final_diff.txt and delete every line that doesn't start with '<' and redirect into final_final_diff.txt and do cat final_final_diff.txt - echo $concat + while read -r line; do + if [[ "$line" =~ ^\< ]]; then + echo $line >> final_final_diff.txt + fi + done Date: Tue, 5 Nov 2024 16:09:14 +0100 Subject: [PATCH 5/7] some more info added Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index 41901ba08a..186897ccb8 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -67,13 +67,20 @@ concat=$(cat final_diff.txt) if [ -n "$concat" ] then echo "There are some discrepancies between the example-zowe.yaml and the zowe.yaml created by ZWECONF.xml workflow." - echo "Please add or delete the workflow so everything is there." - echo "First line is from the example and the line bellow is from the workflow." + echo "Please add to or delete from the ZWECONF.xml workflow what needs or doesn't need to be there." + echo "Eg. if there is a new variable you need to add it first to the workflow variables, then add the variable to the" + echo "'main_variables' step and then also to the step where the zowe.yaml is created." + echo "If there was added/deleted just a comment in the example-zowe.yaml please add it also to the workflow so" + echo "this step is not failing." + echo "Here is the output from the diff command:" # They will surely know what is diff cmd, right while read -r line; do if [[ "$line" =~ ^\< ]]; then echo $line >> final_final_diff.txt fi done Date: Wed, 6 Nov 2024 12:59:04 +0100 Subject: [PATCH 6/7] line needed splitting Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index 186897ccb8..c58e53f922 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -80,7 +80,8 @@ then done Date: Thu, 7 Nov 2024 14:37:13 +0100 Subject: [PATCH 7/7] Fix of the workflow so the test can finally pass Signed-off-by: mm667937 --- pswi/ZWECONF_test.sh | 2 +- workflows/files/ZWECONF.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pswi/ZWECONF_test.sh b/pswi/ZWECONF_test.sh index c58e53f922..2fb2696dc3 100755 --- a/pswi/ZWECONF_test.sh +++ b/pswi/ZWECONF_test.sh @@ -68,7 +68,7 @@ if [ -n "$concat" ] then echo "There are some discrepancies between the example-zowe.yaml and the zowe.yaml created by ZWECONF.xml workflow." echo "Please add to or delete from the ZWECONF.xml workflow what needs or doesn't need to be there." - echo "Eg. if there is a new variable you need to add it first to the workflow variables, then add the variable to the" + echo "E.g. if there is a new variable you need to add it first to the workflow variables, then add the variable to the" echo "'main_variables' step and then also to the step where the zowe.yaml is created." echo "If there was added/deleted just a comment in the example-zowe.yaml please add it also to the workflow so" echo "this step is not failing." diff --git a/workflows/files/ZWECONF.xml b/workflows/files/ZWECONF.xml index cbee9b53e0..9b8032d02c 100644 --- a/workflows/files/ZWECONF.xml +++ b/workflows/files/ZWECONF.xml @@ -1809,7 +1809,7 @@ echo ' # ZWED_TN3270_PORT: 23' >> "${instance-zowe_runtimeDirectory}/zowe.yam echo '' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # You can define any Zowe message portions to be checked for and the message added to the' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" -echo ' # system log upon its logging, truncated to 126 characters.' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" +echo ' # system log upon its logging, truncated to 126 characters (wildcards are not supported).' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' sysMessages:' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' # # Zowe starting' >> "${instance-zowe_runtimeDirectory}/zowe.yaml" echo ' - "ZWEL0021I"' >> "${instance-zowe_runtimeDirectory}/zowe.yaml"