Open BartS07 opened 1 year ago
In v2 and late versions of v1, we have a property within the JSON files in the plugins directory called "relativeTo" that is supposed to point to an environment variable so that you can relocate zowe without the plugin pointers breaking.
I see a potential bug in the case of extensions since they don't use "relativeTo", and we should enhance that code to make extensions "relativeTo" $ZWE_zowe_extensionsDirectory
But trivial-auth isn't an extension, its a core plugin, so what you describe isn't intended, I assigned @struga0258 to have a closer look at what the cause could be.
Here's the code (configmgr edition) that is involved in creating the files https://github.com/zowe/zlux-app-server/blob/v2.x/staging/bin/init/plugins-init.js#L38-L60 This runs during the configure phase of app-server.
And here's the non-configmgr code https://github.com/zowe/zlux-app-server/blob/v2.x/staging/bin/init/plugins-init.sh#L33-L47
I tried to reproduce your bug but i was unable. When you switched runtime directory, were the runtimes the same version or were they different versions? Also when you changed the new runtime directory in the yaml i am assuming you also updated the zowe server command 'zwe' to use the new runtime directory as well?
I took a look at the code you point Sean and it seems to make sense, when I tried to reproduce this the Zowe started user did update the workspace directory.
I've just encountered a similar, but slightly different, issue on v2.6. I originally mounted this version at /etc/zowe_new and then moved it to /etc/zowe after successful testing of an upgrade from v1.27. I stopped Zowe, unmounted/remounted the ZFS at the new mount point, updated the YAML file to the new mount point but on starting Zowe I saw the below ZWES1006E error nestled in the middle of other successful plugin launches:
Plugin=org.zowe.terminal.proxy, found 0 data service(s)
Plugin=org.zowe.terminal.tn3270, found 1 data service(s)
Installing dataservice org.zowe.terminal.tn3270/statediscovery to URI /ZLUX/plugins/org.zowe.terminal.tn3270/services/statediscovery/**
00000000 E9E6C5E2 C9E26DE2 E3C44040 40404040 |ZWESIS_STD |
Plugin=org.zowe.terminal.vt, found 0 data service(s)
Plugin=org.zowe.zlux.agent, found 0 data service(s)
ZWES1006E Error while parsing plugin definition file '/etc/zowe_new/components/app-server/share/zlux-server-framework/plugins/trivial-auth/pluginDefinition.json': 'Couldn't open '/etc/zowe_new/components/app-server/share/zlux-server-framework/plugins/trivial-auth/pluginDefinition.json''
Plugin=org.zowe.zlux.bootstrap, found 0 data service(s)
Plugin=org.zowe.zlux, found 0 data service(s)
Plugin=org.zowe.zlux.ng2desktop, found 0 data service(s)
ZWES1011E Error while parsing: '1:1: unexpected character #(0x7b)
After some further investigation I can see that the file at /var/zowe/workspace/app-server/plugins/org.zowe.zlux.auth.trivial.json
contains the old mount point and does not contain the relativeTo that I see in the other JSON files....
"pluginLocation": "/etc/zowe_new/components/app-server/share/zlux-server-framework/plugins/trivial-auth"
I wanted to change the mountpoint for the Zowe Runtime so I updated the zowe.yaml runtimeDirectory accordingly, but after a restart of the ZWESLSTC the zlux environment didn't start because "pluginLocation" value in /workspace/app-server/plugins/org.zowe.zlux.auth.trivial.json still referred to the old runtime directory, causing errors:
ZWES1006E Error while parsing plugin definition file -old runtime directory- ZWED0027W - Plugin (org.zowe.zlux.auth.trivial) loading failed. Version: undefined. Message: "ZWED0015E - No plugin directory found at -old runtime directory- ZWEL0038E failed to restart component app-server, max retries reached