-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce shell count by one when configmgr used by using pipe directly #3812
Reduce shell count by one when configmgr used by using pipe directly #3812
Conversation
Signed-off-by: 1000TurquoisePogs <[email protected]>
build 5128 SUCCEEDED. |
Test workflow 4381 is started. |
Signed-off-by: 1000TurquoisePogs <[email protected]>
build 5131 SUCCEEDED. |
Test workflow 4384 is started. |
I tested and confirmed if i kill a server process the launcher understands it needs to restart it. so, seems like this code causes no regression. |
const pipeArray = os.pipe(); | ||
if (!pipeArray) { | ||
//TODO error message | ||
common.printFormattedError("ZWELS", "zwe-internal-start-component", `Error ZWEL???E: Could not create pipe.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New error message or use existing. ZWEL0064E is generic, but referring to command.
Working fine on our system. I have noticed this
|
I think the "node not found" came from the PR where node was removed as a prereq. Some code somewhere must be checking for it and then complaining, yet continuing anyway. |
Signed-off-by: 1000TurquoisePogs <[email protected]>
build 5140 SUCCEEDED. |
Error message assigned. |
Test workflow 4399 is started. |
Signed-off-by: Martin Zeithaml <[email protected]>
const startScriptContents = `cd ${COMPONENT_DIR} ; . "${ZOWE_CONFIG.zowe.runtimeDirectory}/bin/libs/configmgr-index.sh" ; ${xplatform.loadFileUTF8(fullPath, xplatform.AUTO_DETECT)} ; wait;`; | ||
const pipeArray = os.pipe(); | ||
if (!pipeArray) { | ||
common.printFormattedError("ZWELS", "zwe-internal-start-component", `Error ZWEL064E: failed to run command os.pipe - Connot start component ${componentId}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo Connot
build 5141 SUCCEEDED. |
Test workflow 4400 is started. |
When inspecting for optimizations and reduction of shell usage for TMPDIR troubleshooting, I noticed that there's some unneeded use of shell wrappers for running each server.
In the code today, each time a start.sh of a server is run we spawn a shell to run that in, and then pipe its contents to ANOTHER shell so that we can put
wait
at the end.We could have just spawned one shell with that pipe, instead of a shell-within-a-shell.
This looks to be largely from the old non-configmgr code, and configmgr can just further optimize.
The process tree goes from 7 processes in the case of zss:
To 6:
An effort here can further reduce it to 5 zowe/launcher#109
With both efforts combined, the tree of a given Zowe server would just be
But today it is
How to test this PR?
If the servers come up the same as they did before, success.
If a server is crashed (intentionally or unintentionally), launcher should have the same restart behavior as before.