zowe / zss

Zowe System Services Server for enabling low-level microservices
Eclipse Public License 2.0
13 stars 45 forks source link

runtimeDirectory path corruption configuration #619

Closed 1000TurquoisePogs closed 1 year ago

1000TurquoisePogs commented 1 year ago

From Madeleine Dudek in Slack:

Okay, so ... We use Zowe 2.9, we installed our own apps and UMS, and ever since we have UMS, the Zowe server start gets an error: cd: /S0W1/var/zowe/nightly/components/app-server/bin/configure.sh 30: .: /S0W1/var/zowe/nightly0/components/app-server/share/zlux-app-server/bin/init: EDC5129I No such file or directory. (errno2=0x0594003D) which probably prevents app-server from configuring a few things ... (the path should say nightly, not nightly0) This happens after our apps and UMS do their validations, so to rule out that one of ours caused that error, I did some Zowe "elevator testing" (up and down and up and down ...) I removed our apps and restarted Zowe: no error. I re-added one app and restarted Zowe: slightly different error: cd: /S0W1/var/zowe/nightly/components/app-server/bin/configure.sh 30: .: /S0W1/var/zowe/nightly�/components/app-server/share/zlux-app-server/bin/init: EDC5129I No such file or directory. (errno2=0x0594003D) I removed the first and added the other app and restarted Zowe: 2nd error I removed most of our app's validation (commented it out) and restarted Zowe: no error I re-added the validation stuff bit by bit until it all was complete again, and restarted Zowe every time: no error, not even with the full code. :face_with_raised_eyebrow: At this point stuff stopped making sense. I re-added the remainder of our apps, restarted Zowe and the first error (nightly0) returned. I specified logLevel: trace and restarted Zowe once more. With all this extra outputting, stuff seems to happen in a different sequence. Now app-server's configure.sh seems to run before our own apps' validation, at least according to the log, and it ran into the error again. Interestingly, the only variable with the wrong path (nightly0 instead of nightly) is ROOT_DIR, which is not even used by app-server's scripts. I was not able to track down where $ROOT_DIR's value becomes $ZWE_zowe_runtimeDirectory's value. Any ideas? (side note: my search unearthed a different typo: $ZOE_ROOT_DIR in /components/app-server/share/zlux-app-server/bin/zlux-install-script.sh (though that scripts seems to be unused))

JoeNemo commented 1 year ago

Is this a ZSS issue or App Server??

1000TurquoisePogs commented 1 year ago

it's a QJS issue i guess. the extra character appears as a result of this template: https://github.com/zowe/zowe-install-packaging/blob/v2.x/staging/bin/libs/component.ts#L71

1000TurquoisePogs commented 1 year ago

All the reports so far are from the app-server being in the corrupt string, and i have no idea why because the code in question isnt specific to ANY component. But, it does derive from reading the zowe.yaml, so, is there some corrupt, invisible character in here? https://github.com/zowe/zowe-install-packaging/blob/v2.x/staging/example-zowe.yaml#L544C1-L544C3

1000TurquoisePogs commented 1 year ago

Fixed for v2.11