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

#683 updated for v3.x/staging #739

Open
wants to merge 26 commits into
base: feature/zwegener
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
209b97e
set right version for zss v3
Jan 9, 2024
0aa9b0e
Merge pull request #678 from zowe/users/jstruga/setup-v3-zss
JoeNemo Jan 10, 2024
e96239d
fix merge conflicts
Jan 10, 2024
3f58b99
add new deps
Jan 17, 2024
62bf9de
remove Jenkinsfile
Jan 17, 2024
29a5ddd
Merge pull request #682 from zowe/users/jstruga/merge-v2-into-v3
1000TurquoisePogs Jan 18, 2024
996709d
Update start.sh
1000TurquoisePogs Feb 14, 2024
ff4f724
Merge pull request #687 from zowe/feature/v3/default-to-zss64
JoeNemo Feb 21, 2024
c067830
fix merge conflict
Aug 9, 2024
a972451
Merge pull request #723 from zowe/users/jstruga/updatev3
1000TurquoisePogs Aug 9, 2024
7527fa7
Do not log into zowe.runtimeDirectory
Martin-Zeithaml Aug 20, 2024
2431282
If no log dir, disable logging in prod
Martin-Zeithaml Aug 23, 2024
3ef0e05
Minor update
Martin-Zeithaml Aug 23, 2024
2cd75d0
Do not create empty dir
Martin-Zeithaml Aug 23, 2024
b55b510
Update start.sh
Martin-Zeithaml Aug 27, 2024
144625d
Merge pull request #726 from zowe/v3.x/logging
JoeNemo Aug 28, 2024
71876a6
Sync v3 with v2 staging
1000TurquoisePogs Sep 18, 2024
cc70add
Merge pull request #730 from zowe/chore/v3-sync
1000TurquoisePogs Sep 18, 2024
e14c898
Update zowe-common-c pointer
Sep 19, 2024
a00d2a6
Merge pull request #731 from zowe/users/jstruga/updt-pointer
ifakhrutdinov Sep 19, 2024
9a4f8cd
Remove a large video file
ifakhrutdinov Oct 22, 2024
0e674cb
Merge pull request #735 from zowe/feature/remove-large-files
ifakhrutdinov Oct 23, 2024
a7bfee6
Utilize the module registry
ifakhrutdinov Sep 25, 2024
940ad1a
Merge pull request #732 from zowe/feature/module-registry
JoeNemo Oct 30, 2024
84d6c8f
Merge branch 'v3.x/staging' into feature/zwegener
MarkAckert Dec 11, 2024
df349d2
update zss version to 3.1.0
MarkAckert Dec 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Build and Test Workflow
on:
push:
branches:
- v2.x/staging
- v3.x/staging
- v3.x/rc
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

All notable changes to the ZSS package will be documented in this file.

## `2.18.1`
## `3.1.0`
- Enhancement: module registry (#732)

## `3.0.0`
- Enhancement: if no `zowe.logDirectory` is defined in config, logging is disabled. (#726)
- Bugfix: Support cross-memory server parameters longer than 128 characters (#684)
- Enhancement: Expose new cross-memory server's functions in dynlink (#684)

Expand Down
46 changes: 0 additions & 46 deletions Jenkinsfile

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export ZWE_zowe_runtimeDirectory=/path/to/zowe-install-packaging
ZWE_CLI_PARAMETER_CONFIG="FILE(/my/zowe.yaml)" ./zssServer.sh
```

Note: ZSS defaults are in [defaults.yaml](https://github.com/zowe/zss/blob/v2.x/staging/defaults.yaml) so you only need to provide customizations in your own zowe.yaml.
Note: ZSS defaults are in [defaults.yaml](https://github.com/zowe/zss/blob/v3.x/staging/defaults.yaml) so you only need to provide customizations in your own zowe.yaml.

## How to submit a pull request

Expand All @@ -57,15 +57,15 @@ git add deps/zowe-common-c/
When using ZSS as the agent to host files and folders, for example: for the Zowe Editor Desktop app by the App server, may lead to '401 Impersonator Error'
Fix: Make sure the program-controlled bit is set for your ZSS binary `extattr +p zssServer`

ZSS in V2 takes advantage of V2 by using schemas and the Zowe configuration YAML. If you're running `zssServer` accidentally, instead of `zssServer.sh` or your `zssServer.sh` is out of date, you may see an error on start like `ZSS 2.x requires schemas and config`
ZSS in V3 takes advantage of V3 by using schemas and the Zowe configuration YAML. If you're running `zssServer` accidentally, instead of `zssServer.sh` or your `zssServer.sh` is out of date, you may see an error on start like `ZSS 2.x requires schemas and config`

When starting ZSS, you may encounter a schema validation issue i.e. `Configuration has validity exceptions: Schema at '' invalid [...]`.
Fix: To read these errors, consult: https://docs.zowe.org/stable/user-guide/configmgr-using/#validation-error-reporting
Note: ZSS has a default schema in `$ZWES_COMPONENT_HOME/schemas` and default configuration YAML in `$ZWES_COMPONENT_HOME/defaults.yaml`

## Mock server

If you don't have access to z/OS, or want to help expand the Mock server, find it at: https://github.com/zowe/zss/tree/v2.x/staging/mock
If you don't have access to z/OS, or want to help expand the Mock server, find it at: https://github.com/zowe/zss/tree/v3.x/staging/mock

This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
Expand Down
23 changes: 15 additions & 8 deletions bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,27 @@ if [[ "${OSNAME}" == "OS/390" ]]; then
then
ZWES_LOG_DIR=${ZWE_zowe_logDirectory}
else
ZWES_LOG_DIR="../log"
if [ -z "${ZWE_zowe_runtimeDirectory}" ]; then
ZWES_LOG_DIR="../log"
else
echo "No log directory. Logging disabled."
ZWES_LOG_DIR=
ZWES_LOG_FILE=/dev/null
fi
fi
fi
if [ -f "$ZWES_LOG_DIR" ]
then
ZWES_LOG_FILE=$ZWES_LOG_DIR
elif [ ! -d "$ZWES_LOG_DIR" ]
then
echo "Will make log directory $ZWES_LOG_DIR"
mkdir -p $ZWES_LOG_DIR
if [ $? -ne 0 ]
then
echo "Cannot make log directory. Logging disabled."
ZWES_LOG_FILE=/dev/null
if [ -n "${ZWES_LOG_DIR}" ]; then
echo "Will make log directory $ZWES_LOG_DIR"
mkdir -p $ZWES_LOG_DIR
if [ $? -ne 0 ]; then
echo "Cannot make log directory. Logging disabled."
ZWES_LOG_FILE=/dev/null
fi
fi
fi
ZWES_ROTATE_LOGS=0
Expand Down Expand Up @@ -168,7 +175,7 @@ if [[ "${OSNAME}" == "OS/390" ]]; then
ZSS_SERVER_31="./zssServer"
ZSS_SERVER_64="./zssServer64"

if [ "$ZWE_components_zss_agent_64bit" = "true" ] && [ -x "${ZSS_SERVER_64}" ]; then
if [ "$ZWE_components_zss_agent_64bit" != "false" ] && [ -x "${ZSS_SERVER_64}" ]; then
ZSS_SERVER="${ZSS_SERVER_64}"
else
ZSS_SERVER="${ZSS_SERVER_31}"
Expand Down
6 changes: 6 additions & 0 deletions build/build_dynamic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ xlc -S -M -qmetal -q64 -DSUBPOOL=132 -DMETTLE=1 -DMSGPREFIX=\"ZWE\" \
-DZISDYN_REVISION="$micro" \
-DZISDYN_VERSION_DATE_STAMP="$date_stamp" \
-DZISDYN_PLUGIN_VERSION=${DYNLINK_PLUGIN_VERSION} \
-DLPA_LOG_DEBUG_MSG_ID=\"ZWES0100I\" \
-DMODREG_LOG_DEBUG_MSG_ID=\"ZWES0100I\" \
-qreserved_reg=r12 \
-DRCVR_CPOOL_STATES \
-DHAVE_METALIO=1 \
-Wc,langlvl\(extc99\),arch\(8\),agg,exp,list\(\),so\(\),off,xref,roconst,longname,lp64 \
-I ${COMMON}/h -I ${ZSS}/h \
-I ${ZSS}/zis-aux/include -I ${ZSS}/zis-aux/src \
-I /usr/include/zos \
${ZSS}/c/zis/zisdynamic.c \
${ZSS}/c/zis/server-api.c \
${ZSS}/c/zis/client.c \
Expand All @@ -81,6 +84,7 @@ xlc -S -M -qmetal -q64 -DSUBPOOL=132 -DMETTLE=1 -DMSGPREFIX=\"ZWE\" \
${COMMON}/c/logging.c \
${COMMON}/c/lpa.c \
${COMMON}/c/metalio.c \
${COMMON}/c/modreg.c \
${COMMON}/c/nametoken.c \
${COMMON}/c/pause-element.c \
${COMMON}/c/pc.c \
Expand Down Expand Up @@ -125,6 +129,7 @@ for file in \
logging \
lpa \
metalio \
modreg \
nametoken \
pause-element \
pc \
Expand Down Expand Up @@ -173,6 +178,7 @@ le.o \
logging.o \
lpa.o \
metalio.o \
modreg.o \
nametoken.o \
pause-element.o \
pc.o \
Expand Down
8 changes: 7 additions & 1 deletion build/build_zis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ xlc -S -M -qmetal -q64 -DSUBPOOL=132 -DMETTLE=1 -DMSGPREFIX=\"ZWE\" \
-DZIS_VERSION_DATE_STAMP="$date_stamp" \
-DRADMIN_XMEM_MODE \
-DRCVR_CPOOL_STATES \
-DLPA_LOG_DEBUG_MSG_ID=\"ZWES0100I\" \
-DMODREG_LOG_DEBUG_MSG_ID=\"ZWES0100I\" \
-qreserved_reg=r12 \
-Wc,arch\(8\),agg,exp,list\(\),so\(\),off,xref,roconst,longname,lp64 \
-I ${COMMON}/h -I ${ZSS}/h -I ${ZSS}/zis-aux/include -I ${ZSS}/zis-aux/src \
-I /usr/include/zos \
${COMMON}/c/alloc.c \
${COMMON}/c/as.c \
${COMMON}/c/cellpool.c \
Expand All @@ -70,6 +73,7 @@ xlc -S -M -qmetal -q64 -DSUBPOOL=132 -DMETTLE=1 -DMSGPREFIX=\"ZWE\" \
${COMMON}/c/logging.c \
${COMMON}/c/lpa.c \
${COMMON}/c/metalio.c \
${COMMON}/c/modreg.c \
${COMMON}/c/mtlskt.c \
${COMMON}/c/nametoken.c \
${COMMON}/c/pause-element.c \
Expand Down Expand Up @@ -102,7 +106,7 @@ xlc -S -M -qmetal -q64 -DSUBPOOL=132 -DMETTLE=1 -DMSGPREFIX=\"ZWE\" \
${ZSS}/zis-aux/src/aux-host.c

for file in \
alloc as cellpool cmutils collections crossmemory isgenq le logging lpa metalio mtlskt nametoken \
alloc as cellpool cmutils collections crossmemory isgenq le logging lpa metalio modreg mtlskt nametoken \
pause-element pc qsam radmin recovery resmgr scheduling shrmem64 stcbase timeutls utils xlate \
zos zvt \
parm plugin server server-api service \
Expand All @@ -125,6 +129,7 @@ ld -V -b ac=1 -b rent -b case=mixed -b map -b xref -b reus \
logging.o \
lpa.o \
metalio.o \
modreg.o \
mtlskt.o \
nametoken.o \
qsam.o \
Expand Down Expand Up @@ -165,6 +170,7 @@ ld -V -b ac=1 -b rent -b case=mixed -b map -b xref -b reus \
logging.o \
lpa.o \
metalio.o \
modreg.o \
mtlskt.o \
nametoken.o \
pause-element.o \
Expand Down
2 changes: 1 addition & 1 deletion build/zis.proj.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT="zis"
VERSION=2.18.0
VERSION=3.0.0
DYNLINK_PLUGIN_VERSION=11
DEPS=""
2 changes: 1 addition & 1 deletion build/zss.proj.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROJECT="zss"
VERSION=2.18.0
VERSION=3.1.0
DEPS="QUICKJS LIBYAML"

QUICKJS="quickjs"
Expand Down
4 changes: 4 additions & 0 deletions c/zis/server-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ _Bool zisIsLPADevModeOn(const ZISContext *context) {
return (context->cmsFlags & devFlags) || ZIS_LPA_DEV_MODE;
}

_Bool zisIsModregOn(const ZISContext *context) {
return context->cmsFlags & CMS_SERVER_FLAG_USE_MODREG;
}

void zisGetServerVersion(int *major, int *minor, int *revision) {
*major = -1;
*minor = -1;
Expand Down
64 changes: 57 additions & 7 deletions c/zis/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "stcbase.h"
#include "utils.h"
#include "recovery.h"
#include "modreg.h"

#include "zis/message.h"
#include "zis/parm.h"
Expand Down Expand Up @@ -82,6 +83,9 @@ See details in the ZSS Cross Memory Server installation guide
#define ZIS_PARM_DEV_MODE_LPA CMS_PROD_ID".DEV_MODE.LPA"
#define ZIS_PARM_DEV_MODE_ON "YES"

#define ZIS_PARM_MODREG CMS_PROD_ID".MODULE_REGISTRY"
#define ZIS_PARM_MODREG_OFF "NO"

#define ZIS_PARMLIB_PARM_SERVER_NAME CMS_PROD_ID".NAME"

#define ZIS_DYN_LINKAGE_PLUGIN_MOD_SUFFIX "ISDL"
Expand Down Expand Up @@ -676,18 +680,49 @@ static int relocatePluginToLPAIfNeeded(ZISContext *context,
/* Check if LPA, and load if needed */
if (lpaNeeded) {

const char *status = "n/a";

if (!lpaPresent) {

EightCharString ddname = {"STEPLIB "};
int lpaRSN = 0;
int lpaRC = lpaAdd(&anchor->moduleInfo, &ddname, &moduleName, &lpaRSN);
if (lpaRC != 0) {
zowelog(NULL, LOG_COMP_ID_CMS, ZOWE_LOG_SEVERE, ZIS_LOG_LPA_FAILURE_MSG,
"ADD", anchor->moduleInfo.inputInfo.name, lpaRC, lpaRSN);
return RC_ZIS_ERROR;

if (zisIsModregOn(context) && !zisIsLPADevModeOn(context)) {
uint64_t modregRSN;
int modregRC = modregRegister(ddname, moduleName, &anchor->moduleInfo,
&modregRSN);
if (modregRC == RC_MODREG_OK) {
status = "new instance added to registry";
lpaPresent = true;
} else if (modregRC == RC_MODREG_ALREADY_REGISTERED) {
status = "existing instance reused from registry";
lpaPresent = true;
} else if (modregRC == RC_MODREG_MARK_MISSING) {
zowelog(NULL, LOG_COMP_ID_CMS, ZOWE_LOG_INFO,
ZIS_LOG_MODREG_NO_MARK_MSG, moduleName.text);
} else {
zowelog(NULL, LOG_COMP_ID_CMS, ZOWE_LOG_SEVERE,
ZIS_LOG_MODREG_FAILURE_MSG, moduleName.text,
modregRC, modregRSN);
return RC_ZIS_ERROR;
}
}

if (!lpaPresent) {
int lpaRSN = 0;
int lpaRC = lpaAdd(&anchor->moduleInfo, &ddname, &moduleName, &lpaRSN);
if (lpaRC == 0) {
status = "own instance loaded to LPA";
} else {
zowelog(NULL, LOG_COMP_ID_CMS, ZOWE_LOG_SEVERE,
ZIS_LOG_LPA_FAILURE_MSG,
"ADD", moduleName.text, lpaRC, lpaRSN);
return RC_ZIS_ERROR;
}
}

anchor->flags |= ZIS_PLUGIN_ANCHOR_FLAG_LPA;
} else {
status = "previously added/loaded instance reused";
}

/* Invoke EP to get relocated services */
Expand All @@ -699,6 +734,16 @@ static int relocatePluginToLPAIfNeeded(ZISContext *context,

*pluginAddr = getPluginDescriptor();

zowelog(NULL, LOG_COMP_ID_CMS, ZOWE_LOG_INFO,
ZIS_LOG_MODULE_STATUS_MSG" (%p)", moduleName.text, status,
lpaInfo->outputInfo.stuff.successInfo.loadPointAddr);

} else {

zowelog(NULL, LOG_COMP_ID_CMS, ZOWE_LOG_INFO,
ZIS_LOG_MODULE_STATUS_MSG, moduleName.text,
"private storage instance used");

}

return RC_ZIS_OK;
Expand Down Expand Up @@ -1443,7 +1488,7 @@ static int loadConfig(ZISContext *context,

static int getCMSConfigFlags(const ZISParmSet *zisParms) {

int flags = CMS_SERVER_FLAG_NONE;
int flags = CMS_SERVER_FLAG_USE_MODREG;

const char *coldStartValue = zisGetParmValue(zisParms, ZIS_PARM_COLD_START);
if (coldStartValue && strlen(coldStartValue) == 0) {
Expand Down Expand Up @@ -1475,6 +1520,11 @@ static int getCMSConfigFlags(const ZISParmSet *zisParms) {
flags |= CMS_SERVER_FLAG_RESET_LOOKUP;
}

const char *modregMode = zisGetParmValue(zisParms, ZIS_PARM_MODREG);
if (modregMode && !strcmp(modregMode, ZIS_PARM_MODREG_OFF)) {
flags &= ~CMS_SERVER_FLAG_USE_MODREG;
}

return flags;
}

Expand Down
2 changes: 2 additions & 0 deletions c/zis/stubinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
stubVector[ZIS_STUB_ZISDYNPV] = (void*)zisdynGetPluginVersion;
stubVector[ZIS_STUB_ZISGVRSN] = (void*)zisGetServerVersion;
stubVector[ZIS_STUB_ZISLPADV] = (void*)zisIsLPADevModeOn;
stubVector[ZIS_STUB_ZISMDREG] = (void*)zisIsModregOn;
stubVector[ZIS_STUB_ZISCSRVC] = (void*)zisCallService;
stubVector[ZIS_STUB_ZISCUSVC] = (void*)zisCallServiceUnchecked;
stubVector[ZIS_STUB_ZISCVSVC] = (void*)zisCallVersionedService;
Expand Down Expand Up @@ -558,6 +559,7 @@
stubVector[ZIS_STUB_ZVTFENTR] = (void*)zvtFreeEntry;
stubVector[ZIS_STUB_ZVTGXMLR] = (void*)zvtGetCMSLookupRoutineAnchor;
stubVector[ZIS_STUB_ZVTSXMLR] = (void*)zvtSetCMSLookupRoutineAnchor;
stubVector[ZIS_STUB_MODRRGST] = (void*)modregRegister;
/*
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
Expand Down
3 changes: 3 additions & 0 deletions c/zis/zisdynamic.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "logging.h"
#include "lpa.h"
#include "metalio.h"
#include "modreg.h"
#include "nametoken.h"
#include "pause-element.h"
#include "pc.h"
Expand Down Expand Up @@ -423,6 +424,8 @@ static int verifyZISVersion(void) {

ZISPlugin *getPluginDescriptor(void) {

MODREG_MARK_MODULE();

if (verifyZISVersion() != 0) {
return NULL;
}
Expand Down
Loading
Loading