cleanup: drop log and smoketest pimp#112
Open
Bierchermuesli wants to merge 1 commit into
Open
Conversation
…test - Remove ./netdisco/logs:/home/netdisco/logs volume from netdisco-backend and netdisco-web in docker-compose.yml. With netdisco/netdisco#1500, foreground mode writes logs directly to stdout — the host-side bind mount served no purpose other than to dirty the host filesystem with an empty 'logs' directory. - README: drop 'logs' from the mkdir helper, and replace 'Logs are available in netdisco/logs/' with a pointer to 'docker compose logs'. - Smoke test: assert that no real *.log files exist in /home/netdisco/logs/ in either container after boot. Excludes the legacy netdisco-*.log -> /dev/stdout symlinks (which we keep as a safety net for non-foreground use), so any *real* file means the daemons have regressed to writing log files instead of stdout — i.e. it would catch a future revert of #1500. Hold this PR until netdisco cuts a release that includes #1500 (2.098002 was cut before #1500 merged); the legacy stdout symlinks in netdisco-base/Dockerfile are intentionally retained so this PR remains safe to merge whenever convenient.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that netdisco/netdisco#1500 (skip log file redirection in foreground mode) is in netdisco master:
docker-compose.yml: drop the./netdisco/logs:/home/netdisco/logsbind mount on bothnetdisco-backendandnetdisco-web. The mount served only to materialise thenetdisco-*.log -> /dev/stdoutsymlink target on the host.github/workflows/smoke-test.yaml: add an assertion that /home/netdisco/logs has no logs.The two
ln -s /dev/stdout /home/netdisco/logs/netdisco-*.logsymlinks innetdisco-base/Dockerfileare retained. They cost nothing in foreground mode (unused), and they preserve correct behaviour for anyone who overrides CMD to run the daemons in non-foreground /startmode. Their presence also lets this PR merge independently of the netdisco release schedule: published images that are still on netdisco 2.098002 (pre-#1500) will continue to work because the symlinks still route their log writes to container stdout.Suggest holding this open until at least one published netdisco-docker image build from a netdisco release #1500 has shipped, so users who pull
:latestafter the merge see the new behaviour end-to-end. The image keeps working in the meantime regardless.Test plan
workflow_dispatchagainstnetdisco_git_url=https://github.com/netdisco/netdisco.git,committish=2.098002(pre-#1500) and verify the new "no real log files" assertion correctly fails — proving the regression catcher worksno longer requiresmkdir netdisco/logsanddocker compose logs` still shows daemon output