Skip to content

Commit

Permalink
Merge pull request #723 from zowe/users/jstruga/updatev3
Browse files Browse the repository at this point in the history
Update v3 staging
  • Loading branch information
1000TurquoisePogs authored Aug 9, 2024
2 parents ff4f724 + c067830 commit a972451
Show file tree
Hide file tree
Showing 19 changed files with 74 additions and 168 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,25 @@ All notable changes to the ZSS package will be documented in this file.
## `3.0.0`


## `2.18.0`
- Change log level for setting default value of 'httpRequestHeapMaxBlocks' to DEBUG instead of INFO.(#719)

## `2.17.0`
- Code to configure the SLH block size of the http server through 'httpRequestHeapMaxBlocks' in the yaml.(#701)

## `2.16.0`
- Bugfix: AUX should take leap seconds into account in their log messages' timestamp (#690, #691)

## `2.14.0`
- Bugfix: ZSS would not use zowe.cookieIdentifier when an HA config was used.

## `2.13.0`
- Enhancement: Added support for using "zowe.network" and "components.zss.zowe.network" to set listener IP and TLS version properties. (#659)
- Enhancement: Added support for using "zowe.network" and "components.zss.zowe.network" to set cipher suites.
- Enhancement: Change pattern matching for keyrings to allow more types of keyrings in the future (#581)
- Enhancement: Consolidate JWK warnings into improved ZWES1606W message (#663)
- Bugfix: Corrected build environment file's use of IP address to github.com (#660)


## `2.10.0`
- This action making a CHANGELOG note via special syntax from the GitHub PR commit message, like it could automatically update CHANGELOG.md with the message. First job checks if PR body has changelog note or not if it's not there then it asked them to add it and second job is to check if changelog note has been added in changelog.md file or not. (#636)
- Bugfix: Datasets with VOLSER set to an MVS Symbol would cause dataset read, write, and metadata API calls to fail for those datasets. (#603)
Expand Down
2 changes: 1 addition & 1 deletion bin/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ if [ -n "${ZWE_components_zss_pluginsDir}" ]; then
fi

if [ "${ZWE_components_app_server_enabled}" != "true" ]; then
_CEE_RUNOPTS="XPLINK(ON),HEAPPOOLS(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/components/zss/bin/plugins-init.js"
_CEE_RUNOPTS="XPLINK(ON),HEAPPOOLS(OFF),HEAPPOOLS64(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/components/zss/bin/plugins-init.js"
fi

2 changes: 1 addition & 1 deletion build/build_dynamic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ do
done


ld -V -b ac=1 -b rent -b case=mixed -b map -b xref -b reus -e getPluginDescriptor \
ld -V -b rent -b case=mixed -b map -b xref -b reus -e getPluginDescriptor \
-o "//'${USER}.DEV.LOADLIB(ZWESISDL)'" \
zisdynamic.o \
server-api.o \
Expand Down
1 change: 0 additions & 1 deletion build/build_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ c89 \
-DHTTPSERVER_BPX_IMPERSONATION=1 \
-DAPF_AUTHORIZED=0 \
-Wc,dll,expo,langlvl\(extc99\),gonum,goff,hgpr,roconst,ASM,asmlib\('CEE.SCEEMAC','SYS1.MACLIB','SYS1.MODGEN'\) \
-Wl,ac=1 \
-I ${COMMON}/h \
-I ${ZSS}/h \
-o ${ZSS}/bin/envService \
Expand Down
1 change: 0 additions & 1 deletion build/build_zss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ xlc \
-DNEW_CAA_LOCATIONS=1 \
-Wc,dll,expo,langlvl\(extc99\),gonum,goff,hgpr,roconst,ASM,asmlib\('CEE.SCEEMAC','SYS1.MACLIB','SYS1.MODGEN'\) \
-Wc,xplink,agg,exp,list,so\(\),off,xref \
-Wl,ac=1 \
-I ${COMMON}/h \
-I ${COMMON}/platform/posix \
-I ${COMMON}/jwt/jwt \
Expand Down
2 changes: 1 addition & 1 deletion build/build_zss64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ if ! c89 \
-DNEW_CAA_LOCATIONS=1 \
-Wc,lp64,dll,expo,langlvl\(extc99\),gonum,goff,hgpr,roconst,ASM,asmlib\('CEE.SCEEMAC','SYS1.MACLIB','SYS1.MODGEN'\) \
-Wc,agg,exp,list,so\(\),off,xref \
-Wl,lp64,ac=1 \
-Wl,lp64 \
-I ${COMMON}/h \
-I ${COMMON}/platform/posix \
-I ${COMMON}/jwt/jwt \
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=3.0.0
DYNLINK_PLUGIN_VERSION=5
DYNLINK_PLUGIN_VERSION=11
DEPS=""
2 changes: 1 addition & 1 deletion c/storageApiml.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ c89 \
-DAPF_AUTHORIZED=0 \
-Wc,dll,langlvl\(extc99\),gonum,goff,hgpr,roconst,ASM,asmlib\('CEE.SCEEMAC','SYS1.MACLIB','SYS1.MODGEN'\) \
-Wc,agg,exp,list\(\),so\(\),off,xref \
-Wl,ac=1,dll \
-Wl,dll \
-I../h \
-I../deps/zowe-common-c/h \
-I/usr/lpp/gskssl/include \
Expand Down
134 changes: 0 additions & 134 deletions c/zis/build.sh

This file was deleted.

57 changes: 40 additions & 17 deletions c/zss.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,27 @@ static void setPrivilegedServerName(HttpServer *server, JsonObject *mvdSettings,
}
#endif /* __ZOWE_OS_ZOS */

static void setHttpRequestHeapMaxBlocks(HttpServer *server, ConfigManager *configmgr){

int maxBlocks = 0;
int getStatus = cfgGetIntC(configmgr,ZSS_CFGNAME,&maxBlocks,3,"components","zss","httpHeapMaxBlocks");

if (getStatus == ZCFG_SUCCESS){
if (maxBlocks > HTTP_REQUEST_HEAP_MAX_BLOCKS){
zowelog(NULL, LOG_COMP_ID_MVD_SERVER, ZOWE_LOG_INFO, "httpHeapMaxBlocks out of range, max value is %d\n",HTTP_REQUEST_HEAP_MAX_BLOCKS);
maxBlocks = HTTP_REQUEST_HEAP_MAX_BLOCKS;
} else if (maxBlocks < HTTP_REQUEST_HEAP_MIN_BLOCKS){
zowelog(NULL, LOG_COMP_ID_MVD_SERVER, ZOWE_LOG_INFO, "httpHeapMaxBlocks out of range, min value is %d\n",HTTP_REQUEST_HEAP_MIN_BLOCKS);
maxBlocks = HTTP_REQUEST_HEAP_MIN_BLOCKS;
}
zowelog(NULL, LOG_COMP_ID_MVD_SERVER, ZOWE_LOG_INFO, "httpHeapMaxBlocks should be between %d and %d\n",HTTP_REQUEST_HEAP_MIN_BLOCKS,HTTP_REQUEST_HEAP_MAX_BLOCKS);
} else{
zowelog(NULL, LOG_COMP_ID_MVD_SERVER, ZOWE_LOG_DEBUG, "fallback to default server settings\n");
maxBlocks = HTTP_REQUEST_HEAP_DEFAULT_BLOCKS;
}
server->config->httpRequestHeapMaxBlocks = (unsigned int)maxBlocks;
}

static void loadWebServerConfigV2(HttpServer *server,
ConfigManager *configmgr,
hashtable *htUsers,
Expand All @@ -370,6 +391,7 @@ static void loadWebServerConfigV2(HttpServer *server,
server->config->userTimeouts = htUsers;
server->config->groupTimeouts = htGroups;
server->config->defaultTimeout = defaultSessionTimeout;
setHttpRequestHeapMaxBlocks(server, configmgr);
registerHttpServiceOfLastResort(server,NULL);
#ifdef __ZOWE_OS_ZOS
setPrivilegedServerNameV2(server, configmgr);
Expand Down Expand Up @@ -1108,26 +1130,27 @@ static void readAgentAddressAndPortV2(ConfigManager *configmgr, char **addressHa
static char* generateCookieNameV2(ConfigManager *configmgr, int port) {
int cookieLength=256;
char *cookieName = safeMalloc(cookieLength+1, "CookieName");
char *zoweInstanceId = getenv("ZOWE_INSTANCE");
char *haInstanceCountStr = getenv("ZWE_HA_INSTANCES_COUNT");

int haInstanceCount=0;
if (haInstanceCountStr != NULL) {
haInstanceCount = atoi(haInstanceCountStr);
}
if (haInstanceCount > 1 && zoweInstanceId != NULL) {
snprintf(cookieName, cookieLength, "%s.%s", SESSION_TOKEN_COOKIE_NAME, zoweInstanceId);
} else {
snprintf(cookieName, cookieLength, "%s.%d", SESSION_TOKEN_COOKIE_NAME, port);
Json *result = NULL;
int rc = cfgGetAnyC(configmgr, ZSS_CFGNAME, &result, 1, "haInstances");
if (jsonIsObject(result)){
JsonObject *resultObj = jsonAsObject(result);
JsonProperty *prop = resultObj->firstProperty;
while (prop!=NULL){
haInstanceCount++;
prop = prop->next;
}
}
zowelog(NULL, LOG_COMP_ID_MVD_SERVER, ZOWE_LOG_DEBUG, "Cookie name set as %s\n",cookieName);
return cookieName;
}

static char* generateCookieName(JsonObject *envConfig, int port) {
int cookieLength=256;
char *cookieName = safeMalloc(cookieLength+1, "CookieName");
char *zoweInstanceId = getenv("ZWE_zowe_cookieIdentifier");
if (zoweInstanceId != NULL) {
zowelog(NULL, LOG_COMP_ID_MVD_SERVER, ZOWE_LOG_DEBUG, "instance count = %d\n", haInstanceCount);

char *zoweInstanceId = NULL;
cfgGetStringC(configmgr, ZSS_CFGNAME, &zoweInstanceId, 2, "zowe", "cookieIdentifier");

zowelog(NULL, LOG_COMP_ID_MVD_SERVER, ZOWE_LOG_DEBUG, "cookieId = %s\n", zoweInstanceId);

if (haInstanceCount > 1 && zoweInstanceId != NULL) {
snprintf(cookieName, cookieLength, "%s.%s", SESSION_TOKEN_COOKIE_NAME, zoweInstanceId);
} else {
snprintf(cookieName, cookieLength, "%s.%d", SESSION_TOKEN_COOKIE_NAME, port);
Expand Down
2 changes: 1 addition & 1 deletion defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ components:
zss:
port: 7557
crossMemoryServerName: ${{ ()=> { if (zowe.environments?.ZWED_privilegedServerName) { return zowe.environments.ZWED_privilegedServerName } else { if (zowe.environments?.ZWES_XMEM_SERVER_NAME) { return zowe.environments.ZWES_XMEM_SERVER_NAME } else { return "ZWESIS_STD" } } }() }}
tls: true
tls: "${{ ()=> { if (components.zss.zowe?.network?.server?.tls?.attls) { return false } else if (zowe.network?.server?.tls?.attls) { return false } else { return true } }() }}"
productDir: ${{ zowe.runtimeDirectory }}/components/zss/defaults
pluginsDir: ${{ zowe.workspaceDirectory }}/app-server/plugins
instanceDir: ${{ zowe.workspaceDirectory }}/zss
Expand Down
2 changes: 1 addition & 1 deletion plugins/zis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Refer to that source for the full plugin sample.
A ZIS plugin is a load module with the following characteristics:
* AMODE 64
* Reentrant
* The result of call a ZIS plugin lod module is a plugin descriptor data
* The result of a call to a ZIS plugin load module is a plugin descriptor data
structure mapped by the C struct [`ZISPlugin`](https://github.com/zowe/zss/blob/82c6f2d30951d64fb1bb6487c2dde92700b91552/h/zis/plugin.h#L81-L112)

### Services
Expand Down
2 changes: 1 addition & 1 deletion plugins/zis/echo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CFLAGS=(-S -M -qmetal -q64 -DSUBPOOL=132 -DMETTLE=1 -DMSGPREFIX='"IDX"'
ASFLAGS=(-mgoff -mobject -mflag=nocont --TERM --RENT)
LDFLAGS=(-V -b ac=1 -b rent -b case=mixed -b map -b xref -b reus)
LDFLAGS=(-V -b rent -b case=mixed -b map -b xref -b reus)
xlc "${CFLAGS[@]}" -DCMS_CLIENT \
$COMMON/c/alloc.c \
Expand Down
2 changes: 1 addition & 1 deletion plugins/zis/magic-number/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CFLAGS=(-S -M -qmetal -q64 -DSUBPOOL=132 -DMETTLE=1 -DMSGPREFIX='"IDX"'
ASFLAGS=(-mgoff -mobject -mflag=nocont --TERM --RENT)
LDFLAGS=(-V -b ac=1 -b rent -b case=mixed -b map -b xref -b reus)
LDFLAGS=(-V -b rent -b case=mixed -b map -b xref -b reus)
xlc "${CFLAGS[@]}" -DCMS_CLIENT \
$COMMON/c/alloc.c \
Expand Down
2 changes: 1 addition & 1 deletion tests/build_zisdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ do
done


ld -V -b ac=1 -b rent -b case=mixed -b map -b xref -b reus -e main \
ld -V -b rent -b case=mixed -b map -b xref -b reus -e main \
-o "//'$USER.DEV.LOADLIB(ZISDLTST)'" \
zisdl.o \
stubs.o \
Expand Down
10 changes: 9 additions & 1 deletion zis-aux/src/aux-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,19 +199,27 @@ static void getSTCK(uint64 *stckValue) {
__asm(" STCK 0(%0)" : : "r"(stckValue));
}

static int64 getLocalTimeOffset() {
static int64 getLocalTimeOffset(void) {
CVT * __ptr32 cvt = *(void * __ptr32 * __ptr32)0x10;
void * __ptr32 cvtext2 = cvt->cvtext2;
int64 *cvtldto = (int64 * __ptr32)(cvtext2 + 0x38);
return *cvtldto;
}

static int64 getLeapSecondsOffset(void) {
CVT * __ptr32 cvt = *(void * __ptr32 * __ptr32)0x10;
void * __ptr32 cvtext2 = cvt->cvtext2;
int64 *cvtlso = (int64 * __ptr32)(cvtext2 + 0x50);
return *cvtlso;
}

static void getCurrentLogTimestamp(LogTimestamp *timestamp) {

uint64 stck = 0;
getSTCK(&stck);

stck += getLocalTimeOffset();
stck -= getLeapSecondsOffset();

stckToLogTimestamp(stck, timestamp);

Expand Down
2 changes: 1 addition & 1 deletion zis-aux/test/aux-guest/build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CFLAGS=(-S -M -qmetal -q64 -DSUBPOOL=132 -DMETTLE=1 -DMSGPREFIX='"IDX"'
ASFLAGS=(-mgoff -mobject -mflag=nocont --TERM --RENT)
LDFLAGS=(-V -b ac=1 -b rent -b case=mixed -b map -b xref -b reus)
LDFLAGS=(-V -b rent -b case=mixed -b map -b xref -b reus)
xlc "${CFLAGS[@]}" \
$COMMON/c/alloc.c \
Expand Down
2 changes: 1 addition & 1 deletion zis-aux/test/utils/build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $COMMON/c/zos.c ; extattr +a ../bin/shrmem64-target-test

xlc "-Wa,goff" -DAS_TEST \
"-Wc,LANGLVL(EXTC99),FLOAT(HEX),agg,exp,list(),so(),goff,xref,gonum,roconst,gonum,ASM,ASMLIB('SYS1.MACLIB'),LP64,XPLINK" \
"-Wl,ac=1" -I $COMMON/h -I $ZSSAUX/src -I $ZSSAUX/include \
-I $COMMON/h -I $ZSSAUX/src -I $ZSSAUX/include \
-o ../bin/pe-test \
$ZSSAUX/test/utils/src/pe-test.c \
$COMMON/c/alloc.c \
Expand Down

0 comments on commit a972451

Please sign in to comment.