Skip to content
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

Fix ZWE messages #4200

Open
wants to merge 15 commits into
base: v3.x/staging
Choose a base branch
from
1 change: 0 additions & 1 deletion bin/commands/.errors
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ ZWEL0200E||Failed to copy USS file %s to MVS data set %s.
ZWEL0201E||File %s does not exist.
ZWEL0202E||Unable to find samplib key for %s.
ZWEL0203E||Env value in key-value pair %s has not been defined.
ZWEL0316E||Command requires zowe.useConfigmgr=true to use.
ZWEL0319E||NodeJS required but not found. Errors such as ZWEL0157E may occur as a result. The value 'node.home' in the Zowe YAML is not correct.
2 changes: 1 addition & 1 deletion bin/commands/certificate/pkcs12/create/ca/.errors
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ZWEL0300W||%s already exists. This %s will be overwritten during configuration.
ZWEL0300W||%s already exists. This %s will be overwritten.
ZWEL0158E|158|%s already exists.
ZWEL0168E|168|Failed to create certificate authority %s.
2 changes: 1 addition & 1 deletion bin/commands/certificate/pkcs12/create/ca/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ keystore="${ZWE_CLI_PARAMETER_KEYSTORE_DIR}/${ZWE_CLI_PARAMETER_ALIAS}/${ZWE_CLI
if [ -f "${keystore}" ]; then
if [ "${ZWE_CLI_PARAMETER_ALLOW_OVERWRITE}" = "true" ]; then
# warning
print_message "Warning ZWEL0300W: Keystore \"${keystore}\" already exists. This keystore will be overwritten during configuration."
print_message "Warning ZWEL0300W: Keystore \"${keystore}\" already exists. This keystore will be overwritten."
rm -fr "${ZWE_CLI_PARAMETER_KEYSTORE_DIR}/${ZWE_CLI_PARAMETER_ALIAS}"
else
# error
Expand Down
2 changes: 1 addition & 1 deletion bin/commands/certificate/pkcs12/create/cert/.errors
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ZWEL0300W||%s already exists. This %s will be overwritten during configuration.
ZWEL0300W||%s already exists. This %s will be overwritten.
ZWEL0158E|158|%s already exists.
ZWEL0169E|169|Failed to create certificate "%s".
2 changes: 1 addition & 1 deletion bin/commands/certificate/pkcs12/create/cert/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ keystore="${ZWE_CLI_PARAMETER_KEYSTORE_DIR}/${ZWE_CLI_PARAMETER_KEYSTORE}/${ZWE_
if [ -f "${keystore}" ]; then
if [ "${ZWE_CLI_PARAMETER_ALLOW_OVERWRITE}" = "true" ]; then
# warning
print_message "Warning ZWEL0300W: Keystore \"${keystore}\" already exists. This keystore will be overwritten during configuration."
print_message "Warning ZWEL0300W: Keystore \"${keystore}\" already exists. This keystore will be overwritten."
rm -fr "${ZWE_CLI_PARAMETER_KEYSTORE_DIR}/${ZWE_CLI_PARAMETER_KEYSTORE}"
else
# error
Expand Down
2 changes: 1 addition & 1 deletion bin/commands/certificate/pkcs12/trust-service/.errors
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ZWEL0300W||%s already exists. This %s will be overwritten during configuration.
ZWEL0300W||%s already exists. This %s will be overwritten.
ZWEL0170E|170|Failed to trust service "%s".
13 changes: 4 additions & 9 deletions bin/commands/components/search/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@
# Copyright Contributors to the Zowe Project.
#######################################################################

USE_CONFIGMGR=$(check_configmgr_enabled)
if [ "${USE_CONFIGMGR}" = "true" ]; then
if [ -z "${ZWE_PRIVATE_TMP_MERGED_YAML_DIR}" ]; then
# user-facing command, use tmpdir to not mess up workspace permissions
export ZWE_PRIVATE_TMP_MERGED_YAML_DIR=1
fi
_CEE_RUNOPTS="XPLINK(ON),HEAPPOOLS(OFF),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/components/search/cli.js"
else
print_error_and_exit "Error ZWEL0316E: Command requires zowe.useConfigmgr=true to use." "" 316
if [ -z "${ZWE_PRIVATE_TMP_MERGED_YAML_DIR}" ]; then
# user-facing command, use tmpdir to not mess up workspace permissions
export ZWE_PRIVATE_TMP_MERGED_YAML_DIR=1
fi
_CEE_RUNOPTS="XPLINK(ON),HEAPPOOLS(OFF),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/components/search/cli.js"

1 change: 0 additions & 1 deletion bin/commands/components/uninstall/.errors
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ ZWEL0307E|307|Component %s cannot be uninstalled, because it is a core component
ZWEL0308W|308|Component directory %s could not be removed, rc=%s.
ZWEL0309W|309|Skipping removal of component %s because it is a core component.
ZWEL0312W|312|Component %s marked for removal but is not installed.
ZWEL????E|???|Command requires zowe.useConfigmgr=true to use.
13 changes: 4 additions & 9 deletions bin/commands/components/uninstall/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@
# Copyright Contributors to the Zowe Project.
#######################################################################

USE_CONFIGMGR=$(check_configmgr_enabled)
if [ "${USE_CONFIGMGR}" = "true" ]; then
if [ -z "${ZWE_PRIVATE_TMP_MERGED_YAML_DIR}" ]; then
# user-facing command, use tmpdir to not mess up workspace permissions
export ZWE_PRIVATE_TMP_MERGED_YAML_DIR=1
fi
_CEE_RUNOPTS="XPLINK(ON),HEAPPOOLS(OFF),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/components/uninstall/cli.js"
else
print_error_and_exit "Error ZWEL0316E: Command requires zowe.useConfigmgr=true to use." "" 316
if [ -z "${ZWE_PRIVATE_TMP_MERGED_YAML_DIR}" ]; then
# user-facing command, use tmpdir to not mess up workspace permissions
export ZWE_PRIVATE_TMP_MERGED_YAML_DIR=1
fi
_CEE_RUNOPTS="XPLINK(ON),HEAPPOOLS(OFF),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/components/uninstall/cli.js"
13 changes: 4 additions & 9 deletions bin/commands/components/upgrade/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@
# Copyright Contributors to the Zowe Project.
#######################################################################

USE_CONFIGMGR=$(check_configmgr_enabled)
if [ "${USE_CONFIGMGR}" = "true" ]; then
if [ -z "${ZWE_PRIVATE_TMP_MERGED_YAML_DIR}" ]; then
# user-facing command, use tmpdir to not mess up workspace permissions
export ZWE_PRIVATE_TMP_MERGED_YAML_DIR=1
fi
_CEE_RUNOPTS="XPLINK(ON),HEAPPOOLS(OFF),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/components/upgrade/cli.js"
else
print_error_and_exit "Error ZWEL0316E: Command requires zowe.useConfigmgr=true to use." "" 316
if [ -z "${ZWE_PRIVATE_TMP_MERGED_YAML_DIR}" ]; then
# user-facing command, use tmpdir to not mess up workspace permissions
export ZWE_PRIVATE_TMP_MERGED_YAML_DIR=1
fi
_CEE_RUNOPTS="XPLINK(ON),HEAPPOOLS(OFF),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/components/upgrade/cli.js"
1 change: 1 addition & 0 deletions bin/commands/init/certificate/.errors
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ZWEL0157E|157|%s (%s) is not defined in Zowe YAML configuration file.
ZWEL0164E|164|Value of %s (%s) defined in Zowe YAML configuration file is invalid. Valid values are %s.
ZWEL0300W||%s already exists. This %s will be overwritten.
2 changes: 1 addition & 1 deletion bin/commands/init/certificate/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ elif [[ "${cert_type}" == JCE*KS ]]; then
# should we clean up before creating new
if [ "${ZWE_CLI_PARAMETER_ALLOW_OVERWRITE}" = "true" ]; then
# warning
print_message "Warning ZWEL0300W: Keyring \"safkeyring://${keyring_owner}/${keyring_name}\" will be overwritten during configuration."
print_message "Warning ZWEL0300W: Keyring \"safkeyring://${keyring_owner}/${keyring_name}\" already exists. This keyring will be overwritten."

zwecli_inline_execute_command \
certificate keyring-jcl clean \
Expand Down
2 changes: 1 addition & 1 deletion bin/commands/init/mvs/.errors
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ZWEL0157E|157|%s (%s) is not defined in Zowe YAML configuration file.
ZWEL0300W||%s already exists. This data set member will be overwritten during configuration.
ZWEL0300W||%s already exists. This %s will be overwritten.
ZWEL0301W||%s already exists and will not be overwritten. For upgrades, you must use --allow-overwrite.
ZWEL0158E|158|%s already exists.
2 changes: 1 addition & 1 deletion bin/commands/init/mvs/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ while read -r line; do
if [ "${ds_existence}" = "true" ]; then
if [ "${ZWE_CLI_PARAMETER_ALLOW_OVERWRITE}" = "true" ]; then
# warning
print_message "Warning ZWEL0300W: ${ds} already exists. Members in this data set will be overwritten."
print_message "Warning ZWEL0300W: ${ds} already exists. This dataset will be overwritten."
else
# print_error_and_exit "Error ZWEL0158E: ${ds} already exists." "" 158
# warning
Expand Down
4 changes: 2 additions & 2 deletions bin/commands/init/stc/.errors
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ZWEL0157E|157|%s (%s) is not defined in Zowe YAML configuration file.
ZWEL0300W||%s already exists. This data set member will be overwritten during configuration.
ZWEL0300W||%s already exists. This %s will be overwritten.
ZWEL0301W||%s already exists and will not be overwritten. For upgrades, you must use --allow-overwrite.
ZWEL0143E|143|Cannot find data set member %s. You may need to re-run `zwe install`.
ZWEL0143E|143|%s.%s(%s) already exists. This data set member will be overwritten during configuration.
ZWEL0158E|158|%s already exists.
ZWEL0159E|159|Failed to modify %s.
ZWEL0160E|160|Failed to write to %s. Please check if target data set is opened by others.
4 changes: 2 additions & 2 deletions bin/commands/init/stc/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ for mb in ${target_proclibs}; do
if [ "${jcl_existence}" = "true" ]; then
if [ "${ZWE_CLI_PARAMETER_ALLOW_OVERWRITE}" = "true" ]; then
# warning
print_message "Warning ZWEL0300W: ${jcllib}(${mb}) already exists. This data set member will be overwritten during configuration."
print_message "Warning ZWEL0300W: ${jcllib}(${mb}) already exists. This member will be overwritten."
else
# print_error_and_exit "Error ZWEL0158E: ${jcllib}(${mb}) already exists." "" 158
# warning
Expand All @@ -92,7 +92,7 @@ for mb in ${target_proclibs}; do
if [ "${stc_existence}" = "true" ]; then
if [ "${ZWE_CLI_PARAMETER_ALLOW_OVERWRITE}" = "true" ]; then
# warning
print_message "Warning ZWEL0300W: ${proclib}(${mb}) already exists. This data set member will be overwritten during configuration."
print_message "Warning ZWEL0300W: ${proclib}(${mb}) already exists. This member will be overwritten."
else
# print_error_and_exit "Error ZWEL0158E: ${proclib}(${mb}) already exists." "" 158
# warning
Expand Down
4 changes: 2 additions & 2 deletions bin/commands/init/vsam/.errors
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ZWEL0157E|157|%s (%s) is not defined in Zowe YAML configuration file.
ZWEL0300W||%s already exists. This data set member will be overwritten during configuration.
ZWEL0300W||%s already exists. This %s will be overwritten.
ZWEL0301W||%s already exists and will not be overwritten. For upgrades, you must use --allow-overwrite.
ZWEL0158E|158|%s already exists.
ZWEL0159E|159|Failed to modify %s.
ZWEL0160E|160|Failed to write to %s. Please check if target data set is opened by others.
ZWEL0161E|161|Failed to run JCL %s.
ZWEL0162E|162|Failed to find job %s result.
ZWEL0163E|163|Job %s ends with code %s.
ZWEL0301W|0|Zowe Caching Service is not configured to use VSAM. Command skipped.
ZWEL0321W|0|Zowe Caching Service is not configured to use VSAM. Command skipped.
4 changes: 2 additions & 2 deletions bin/commands/init/vsam/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require_zowe_yaml "skipnode"

caching_storage=$(read_yaml_configmgr "${ZWE_CLI_PARAMETER_CONFIG}" ".components.caching-service.storage.mode" | upper_case)
if [ "${caching_storage}" != "VSAM" ]; then
print_error "Warning ZWEL0301W: Zowe Caching Service is not configured to use VSAM. Command skipped."
print_error "Warning ZWEL0321W: Zowe Caching Service is not configured to use VSAM. Command skipped."
return 0
fi

Expand Down Expand Up @@ -63,7 +63,7 @@ jcl_existence=$(is_data_set_exists "${jcllib}(ZWECSVSM)")
if [ "${jcl_existence}" = "true" ]; then
if [ "${ZWE_CLI_PARAMETER_ALLOW_OVERWRITE}" = "true" ]; then
# warning
print_message "Warning ZWEL0300W: ${jcllib}(ZWECSVSM) already exists. This data set member will be overwritten during configuration."
print_message "Warning ZWEL0300W: ${jcllib}(ZWECSVSM) already exists. This member will be overwritten."
else
# print_error_and_exit "Error ZWEL0158E: ${jcllib}(ZWECSVSM) already exists." "" 158
# warning
Expand Down
2 changes: 1 addition & 1 deletion bin/commands/install/.errors
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ZWEL0157E|157|%s (%s) is not defined in Zowe YAML configuration file.
ZWEL0300W||%s already exists. Members in this data set will be overwritten.
ZWEL0300W||%s already exists. This %s will be overwritten.
ZWEL0301W||%s already exists and will not be overwritten. For upgrades, you must use --allow-overwrite.
ZWEL0158E|158|%s already exists.
2 changes: 1 addition & 1 deletion bin/commands/install/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ while read -r line; do
if [ "${ds_existence}" = "true" ]; then
if [ "${ZWE_CLI_PARAMETER_ALLOW_OVERWRITE}" = "true" ]; then
# warning
print_message "Warning ZWEL0300W: ${prefix}.${ds} already exists. Members in this data set will be overwritten."
print_message "Warning ZWEL0300W: ${prefix}.${ds} already exists. This dataset will be overwritten."
else
# print_error_and_exit "Error ZWEL0158E: ${prefix}.${ds} already exists." "" 158
# warning
Expand Down
1 change: 1 addition & 0 deletions bin/commands/start/.errors
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ZWEL0064E|64|failed to run command os.pipe - Cannot start component %
ZWEL0165E|165|Failed to start job %s: %s.
1 change: 1 addition & 0 deletions bin/commands/support/verify-fingerprints/.errors
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ ZWEL0122E|122|Cannot find java. Please define JAVA_HOME environment variable.
ZWEL0150E|150|Failed to find file %s. Zowe runtimeDirectory is invalid.
ZWEL0151E|151|Failed to create temporary file %s. Please check permission or volume free space.
ZWEL0181E|181|Failed to verify Zowe file fingerprints.
ZWEL0320E|320|Failed to compare hashes of %s and current.
14 changes: 9 additions & 5 deletions bin/commands/support/verify-fingerprints/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export function execute(doNotExit: Boolean, javaHome: string): void {
if (fs.fileExists(manifest)) {
manifestContent = xplatform.loadFileUTF8(manifest, xplatform.AUTO_DETECT);
} else {
common.printErrorAndExit(`Error ZWEL0150E: Failed to find file "${manifest}". Zowe runtimeDirectory is invalid.`, undefined, 150);
const missingFile = manifest;
common.printErrorAndExit(`Error ZWEL0150E: Failed to find file ${missingFile}. Zowe runtimeDirectory is invalid.`, undefined, 150);
}
if (manifestContent) {
manifestJson = JSON.parse(manifestContent);
Expand All @@ -68,18 +69,20 @@ export function execute(doNotExit: Boolean, javaHome: string): void {
const zoweVersion = manifestJson.version;

if (!fs.fileExists(`${zoweRuntime}/bin/utils/HashFiles.class`)) {
common.printErrorAndExit(`Error ZWEL0150E: Failed to find file "${zoweRuntime}/bin/utils/HashFiles.class". Zowe runtimeDirectory is invalid.`, undefined, 150);
const missingFile = `${zoweRuntime}/bin/utils/HashFiles.class`;
common.printErrorAndExit(`Error ZWEL0150E: Failed to find file ${missingFile}. Zowe runtimeDirectory is invalid.`, undefined, 150);
}

if (!fs.fileExists(`${zoweRuntime}/fingerprint/RefRuntimeHash-${zoweVersion}.txt`)) {
common.printErrorAndExit(`Error ZWEL0150E: Failed to find file "${zoweRuntime}/fingerprint/RefRuntimeHash-${zoweVersion}.txt". Zowe runtimeDirectory is invalid.`, undefined, 150);
const missingFile = `${zoweRuntime}/fingerprint/RefRuntimeHash-${zoweVersion}.txt`;
common.printErrorAndExit(`Error ZWEL0150E: Failed to find file ${missingFile}. Zowe runtimeDirectory is invalid.`, undefined, 150);
}

common.printMessage('- Create Zowe directory file list');
const allFiles = fs.createTmpFile(tmpFilePrefix);
shell.execOutSync('sh', '-c', `cd '${zoweRuntime}' && find . -name ./SMPE -prune -o -name "./ZWE*" -prune -o -name ./fingerprint -prune -o -type f -print > "${allFiles}"`);
if (!fs.fileExists(allFiles)) {
common.printErrorAndExit(`Error ZWEL0151E: Failed to create temporary file "${allFiles}". Please check permission or volume free space.`, undefined, 151);
common.printErrorAndExit(`Error ZWEL0151E: Failed to create temporary file ${allFiles}. Please check permission or volume free space.`, undefined, 151);
}

common.printDebug(` * File list created as ${allFiles}`);
Expand Down Expand Up @@ -122,7 +125,8 @@ export function execute(doNotExit: Boolean, javaHome: string): void {
common.printMessage(`- Find ${commStepName} files`);
const commResult = shell.execOutSync('sh', '-c', `cd '${zoweRuntime}' && comm -${commParameter} "${zoweRuntime}/fingerprint/RefRuntimeHash-${zoweVersion}.txt" "${customHashes}"`);
if (commResult.rc) {
common.printError(` * Error ZWEL0151E: Failed to compare hashes of fingerprint/RefRuntimeHash-${zoweVersion}.txt and current.`);
const hashFile = `fingerprint/RefRuntimeHash-${zoweVersion}.txt`;
common.printError(` * Error ZWEL0320E: Failed to compare hashes of ${hashFile} and current.`);
common.printError(` * Exit code: ${commResult.rc}`);
if (commResult.out) {
common.printError(` * Output:`);
Expand Down
Loading