Closed Martin-Zeithaml closed 3 months ago
You say "ommiting zowe.logDirectory
forces the zss to log into the zowe.runtimeDirectory
"
But that was by design.
It's intended for development: if you don't have a log directory, where should we log? We decided to log in the same location.
So yes you can change this behavior, but it sounds like the bug to me is actually: why does a user not have zowe.logDirectory ? Sounds like something the schema should prevent?
1) The zowe.logDirectory
is not mandatory and it is not in defaults.yaml
. If you simply delete/comment out logDirectory
line from config, it is valid from the schema point of view and app-server
and zss
are logging into zowe.runtimeDirectory
.
2) I have created this issue to warn users from using zowe.runtimeDirectory
.
a) If this check will be implemented, we might check (just for sure) all directories. It is possible, some new users locate certificates into zowe.runtimeDirectory
.
3) Making zowe.logDirectory
mandatory in schema validation is too aggressive - you must have logDirectory
for every zwe
command.
4) I don't know, if schema is capable of such complicated check, what we really need is to compare "os.realpath(*Directory) vs os.realpath(runtimeDirectory)"
- you can define there symbolic links, relative/absolute path and who knows what else.
5) At this point, you can define zowe.logDirectory
and later comment it out - this check is better to do during the startup
We make it the same as for zowe.workspaceDirectory
:
zowe.workspaceDirectory
is not mandatory, but you cannot run zowe without it:
ZWESVUSR INFO ZWEL0069I Configuration is valid
ZWESVUSR ERROR ZWEL0059E failed to get WORKSPACE_DIR dir
/dev/null
as default
/dev/null
and fails, this should be already checked, since setting zowe.logDirectory=/dev/null
is allowedrealpath
check and either issue warning or stop if the extensionDirectory | workspaceDirectory | logDirectory
is nested in runtimeDirectory
logDirectory: ${{ zowe.runtimeDirectory }}/logs
workspaceDirectory: ${{ zowe.runtimeDirectory }}/workspace
extensionDirectory: ${{ zowe.runtimeDirectory }}/extension
Proposed changes
This PR addresses Issue: https://github.com/zowe/zowe-install-packaging/issues/3495
This PR depends upon the following PRs:
Type of change
PR Checklist
Please delete options that are not relevant.
Testing
zowe.logDirectory
not used in config:zowe.logDirectory
set to/zowe/logs/