Skip to content

Commit

Permalink
Merge branch 'v2.x/staging' into user/markackert/smarter-pr-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkAckert authored May 1, 2024
2 parents 577ce7c + 2b08d66 commit 7bf71a5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to the Zowe Installer will be documented in this file.
## `2.16.0

## Minor enhancements/defect fixes
- Enhancement: Reduced resource consumption by removal of one shell process per server that was used when starting each server. (#3812)
- Enhancement: The command `zwe support` now includes CEE Runtime option output to better diagnose issues related to environment customization. (#3799)
- Bugfix: zowe.network.validatePortFree and zowe.network.vipaIp variables were moved from zowe.network to zowe.network.server in the schema but not in the code, causing inability to use them without the workaround of specifying them as environment variables ZWE_NETWORK_VALIDATE_PORT_FREE and ZWE_NETWORK_VIPA_IP instead. Now, the variables match the schema: zowe.network.server is used instead of zowe.network.
- Bugfix: configmgr operations now run with HEAPPOOLS64 set to OFF to avoid abends caused when this parameter is not OFF. (#3799)
Expand Down
2 changes: 1 addition & 1 deletion bin/commands/init/stc/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ else
print_message "Please manually verify if this path works for your environment, especially when you are working in Sysplex environment."
fi
result=$(cat "//'${prefix}.${ZWE_PRIVATE_DS_SZWESAMP}(ZWESLSTC)'" | \
sed "s/^\/\/STEPLIB .*\$/\/\/STEPLIB DD DSNAME=${authLoadlib},DISP=SHR/" | \
sed "s/^\/\/STEPLIB .*\$/\/\/STEPLIB DD DSNAME=${authLoadlib},/" | \
sed "s#^CONFIG=.*\$#CONFIG=$(convert_to_absolute_path ${ZWE_CLI_PARAMETER_CONFIG})#" \
> "${tmpfile}")
code=$?
Expand Down
24 changes: 22 additions & 2 deletions bin/commands/internal/start/component/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
import * as std from 'cm_std';
import * as os from 'cm_os';
import * as zos from 'zos';
import * as xplatform from 'xplatform';
import * as common from '../../../../libs/common';
import * as config from '../../../../libs/config';
import * as shell from '../../../../libs/shell';
import * as varlib from '../../../../libs/var';
import * as stringlib from '../../../../libs/string';
import * as java from '../../../../libs/java';
import * as fs from '../../../../libs/fs';
import * as component from '../../../../libs/component';
Expand Down Expand Up @@ -93,8 +95,26 @@ export function execute(componentId: string, runInBackground: boolean=false) {
} else {
// wait for all background subprocesses created by bin/start.sh exit
// re-source libs is necessary to reclaim shell functions since this will be executed in a new shell
//TODO does this do the same as the shell script before it?
shell.execSync('sh', '-c', `cd ${COMPONENT_DIR} ; cat "${fullPath}" | { echo ". \"${ZOWE_CONFIG.zowe.runtimeDirectory}/bin/libs/configmgr-index.sh\"" ; cat ; echo; echo wait; } | /bin/sh`);
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 ZWEL0064E: failed to run command os.pipe - Cannot start component ${componentId}`);
return;
}
//TODO this will not work with unicode codepoints longer than a byte
const buf = new ArrayBuffer(startScriptContents.length);
const view = new Uint8Array(buf);
const ebcdicString = stringlib.asciiToEbcdic(startScriptContents);
for (let i = 0; i < startScriptContents.length; i++) {
view[i] = ebcdicString.charCodeAt(i);
}

os.write(pipeArray[1], buf, 0, startScriptContents.length);
os.close(pipeArray[1]);
os.exec(['/bin/sh'],
{block: true, usePath: true, stdin: pipeArray[0]});
os.close(pipeArray[0]);

}
} else {
common.printFormattedError("ZWELS", "zwe-internal-start-component", `Error ZWEL0172E: Component ${componentId} has commands.start defined but the file is missing.`);
Expand Down

0 comments on commit 7bf71a5

Please sign in to comment.