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

Zowe verify fingerprints may misbehave when logs exist in component dirs #3495

Open
MarkAckert opened this issue Jul 7, 2023 · 2 comments
Open

Comments

@MarkAckert
Copy link
Member

MarkAckert commented Jul 7, 2023

Describe the bug
If logs are written to directories within the Zowe installation home, as seen in one case under the components subdirectory, then verify fingerprints may either fail or pass depending on where the log is placed. In practice, the behavior should be consistent and opinionated - either log files under the install directory are tolerated and verify fingerprint should always pass, or they are not tolerated and fingerprint verification should always fail.

To Reproduce
Steps to reproduce the behavior:

  1. Run a build where the log directory is unset. This triggers app framework components to log under the components directory.
  2. Run verify fingerprints.
  3. Verify fingerprint fails

Note: we had a case where ZSS logged under components and app framework did not, and fingerprints passed. When both components logged under components, fingerprints failed. Exact reason unknown.

Expected behavior
See description

Additional context
This can be worked around by deleting or moving any application logs under the runtime directory. Pattern ~ */log/*.log.
Setting the log directory in zowe.yaml to a location outside the install directory should avoid this bug altogether, however, there is a separate bug <2.10.0 where log directory may not be sent to app framework components resulting in them logging to a subdirectory under the components dir.

@Martin-Zeithaml
Copy link
Contributor

2.17.0: It should say 2 extra files, but...

- Find different files
  * Number of different files: 1
  * All different files:
        ./components/app-server/share/zlux-app-server/log/appServer-2024-08-08-14-37.log -2064295117616972499
        ./components/zss/log/zssServer-2024-08-08-14-37.log 3299772109190652281
- Find extra files
  * Number of extra files: 1
  * All extra files:
./components/app-server/share/zlux-app-server/log/appServer-2024-08-08-14-37.log -2064295117616972499
./components/zss/log/zssServer-2024-08-08-14-37.log 3299772109190652281
- Find missing files
  * Number of missing files: 0
- Clean up temporary files...

Another situation is, when user sets for example:

zowe:
  runtimeDirectory: /zowe/
  logDirectory: ${{ zowe.runtimeDirectory }}/mylogs

zwe support requires zowe.yaml, it is able (with some code changes) to exclude the log directory or use the suggested pattern if no log directory is set.
But you can also call zwe support verify-fingerprints directly and this command does not require zowe.yaml and has no idea, where the logs are.

@JoeNemo
Copy link
Contributor

JoeNemo commented Aug 14, 2024

ZSS should not log under the components directory. This is a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants