From bd7c13c8d19fc8d50098460f8c7b6c67ddaacbb4 Mon Sep 17 00:00:00 2001 From: Aditya Ranshinge Date: Tue, 12 Apr 2022 17:28:31 +0530 Subject: [PATCH 1/6] Removed hardcoded 1 from jobname Signed-off-by: Aditya Ranshinge --- bin/zssServer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/zssServer.sh b/bin/zssServer.sh index 241ccf93a..f47967a6b 100755 --- a/bin/zssServer.sh +++ b/bin/zssServer.sh @@ -164,9 +164,9 @@ fi if [ -f "$CONFIG_FILE" ] then - _BPX_SHAREAS=NO _BPX_JOBNAME=${ZOWE_PREFIX}SZ1 ${ZSS_SERVER} "${CONFIG_FILE}" 2>&1 | tee $ZWES_LOG_FILE + _BPX_SHAREAS=NO _BPX_JOBNAME=${ZOWE_PREFIX}SZ ${ZSS_SERVER} "${CONFIG_FILE}" 2>&1 | tee $ZWES_LOG_FILE else - _BPX_SHAREAS=NO _BPX_JOBNAME=${ZOWE_PREFIX}SZ1 ${ZSS_SERVER} 2>&1 | tee $ZWES_LOG_FILE + _BPX_SHAREAS=NO _BPX_JOBNAME=${ZOWE_PREFIX}SZ ${ZSS_SERVER} 2>&1 | tee $ZWES_LOG_FILE fi # This program and the accompanying materials are # made available under the terms of the Eclipse Public License v2.0 which accompanies From e27e2bd7357dae0a71c4cf2f5069b0654be12172 Mon Sep 17 00:00:00 2001 From: Aditya Ranshinge Date: Tue, 19 Apr 2022 22:44:38 +0530 Subject: [PATCH 2/6] get instanceID from new env var Signed-off-by: Aditya Ranshinge --- c/zss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/zss.c b/c/zss.c index 017cb909f..3b681184c 100644 --- a/c/zss.c +++ b/c/zss.c @@ -1167,7 +1167,7 @@ static void readAgentAddressAndPort(JsonObject *serverConfig, JsonObject *envCon static char* generateCookieName(JsonObject *envConfig, int port) { int cookieLength=256; char *cookieName = safeMalloc(cookieLength+1, "CookieName"); - char *zoweInstanceId = getenv("ZOWE_INSTANCE"); + char *zoweInstanceId = getenv("ZWE_zowe_cookieIdentifier"); char *haInstanceCountStr = getenv("ZWE_HA_INSTANCES_COUNT"); int haInstanceCount=0; if (haInstanceCountStr != NULL) { From ce71e1ca8f4227ee0fb77c1011bb447ccb5e591f Mon Sep 17 00:00:00 2001 From: Aditya Ranshinge Date: Tue, 19 Apr 2022 23:45:57 +0530 Subject: [PATCH 3/6] fixed review comments Signed-off-by: Aditya Ranshinge --- c/zss.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/c/zss.c b/c/zss.c index 3b681184c..753dbdb47 100644 --- a/c/zss.c +++ b/c/zss.c @@ -1168,12 +1168,7 @@ static char* generateCookieName(JsonObject *envConfig, int port) { int cookieLength=256; char *cookieName = safeMalloc(cookieLength+1, "CookieName"); char *zoweInstanceId = getenv("ZWE_zowe_cookieIdentifier"); - char *haInstanceCountStr = getenv("ZWE_HA_INSTANCES_COUNT"); - int haInstanceCount=0; - if (haInstanceCountStr != NULL) { - haInstanceCount = atoi(haInstanceCountStr); - } - if (haInstanceCount > 1 && zoweInstanceId != NULL) { + if (zoweInstanceId != NULL) { snprintf(cookieName, cookieLength, "%s.%s", SESSION_TOKEN_COOKIE_NAME, zoweInstanceId); } else { snprintf(cookieName, cookieLength, "%s.%d", SESSION_TOKEN_COOKIE_NAME, port); From 6ef6c0915bc322dc0923f17d5e68cbada5682a2b Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Tue, 19 Apr 2022 16:27:32 -0400 Subject: [PATCH 4/6] Fix keyring Strip safkeyring:// and safkeyring://// when reading keyring location so that gskit can read the keyring. Signed-off-by: 1000TurquoisePogs --- bin/configure.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/configure.sh b/bin/configure.sh index adb482f36..b990e9f8e 100755 --- a/bin/configure.sh +++ b/bin/configure.sh @@ -75,8 +75,17 @@ fi # Keystore settings are used for both https server and Caching Service export "${HTTPS_PREFIX}label=${KEY_ALIAS}" -if [ "${KEYSTORE_TYPE}" = "JCERACFKS" ]; then - export "${HTTPS_PREFIX}keyring=${KEYRING_OWNER}/${KEYRING_NAME}" + +if [ "${ZWE_zowe_certificate_keystore_type}" = "JCERACFKS" ]; then + export "${HTTPS_PREFIX}keyring=${ZWE_zowe_certificate_keystore_file}" + case "${ZWE_zowe_certificate_keystore_file}" in + safkeyring:////*) + export ZWED_node_mediationLayer_enabled=$(echo $ZWE_zowe_certificate_keystore_file | cut -c 16-) + ;; + safkeyring://*) + export ZWED_node_mediationLayer_enabled=$(echo $ZWE_zowe_certificate_keystore_file | cut -c 14-) + ;; + esac else export "${HTTPS_PREFIX}keyring=${KEYSTORE}" export "${HTTPS_PREFIX}password=${KEYSTORE_PASSWORD}" From bc3dcda9e5b47b53bfd81ceba63a39d1699ee731 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Wed, 20 Apr 2022 09:27:24 -0400 Subject: [PATCH 5/6] Update pointer Signed-off-by: 1000TurquoisePogs --- deps/zowe-common-c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/zowe-common-c b/deps/zowe-common-c index 6858714a3..ed8ae5f97 160000 --- a/deps/zowe-common-c +++ b/deps/zowe-common-c @@ -1 +1 @@ -Subproject commit 6858714a312dd0d1401561a9dd235c8f18fab85c +Subproject commit ed8ae5f9794179da06102c13970081d308e09543 From e19bd1d2e7171ae96ad4625236be4cbf1d2effda Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Wed, 20 Apr 2022 09:31:33 -0400 Subject: [PATCH 6/6] Update configure.sh Fix typo Signed-off-by: 1000TurquoisePogs --- bin/configure.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/configure.sh b/bin/configure.sh index b990e9f8e..c5025f25c 100755 --- a/bin/configure.sh +++ b/bin/configure.sh @@ -80,10 +80,12 @@ if [ "${ZWE_zowe_certificate_keystore_type}" = "JCERACFKS" ]; then export "${HTTPS_PREFIX}keyring=${ZWE_zowe_certificate_keystore_file}" case "${ZWE_zowe_certificate_keystore_file}" in safkeyring:////*) - export ZWED_node_mediationLayer_enabled=$(echo $ZWE_zowe_certificate_keystore_file | cut -c 16-) + trimmed=$(echo $ZWE_zowe_certificate_keystore_file | cut -c 16-) + export "${HTTPS_PREFIX}keyring=$trimmed" ;; safkeyring://*) - export ZWED_node_mediationLayer_enabled=$(echo $ZWE_zowe_certificate_keystore_file | cut -c 14-) + trimmed=$(echo $ZWE_zowe_certificate_keystore_file | cut -c 14-) + export "${HTTPS_PREFIX}keyring=$trimmed" ;; esac else