-
Notifications
You must be signed in to change notification settings - Fork 880
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
tests(lxd): avoid failure on multiple calls to --show-log #5811
tests(lxd): avoid failure on multiple calls to --show-log #5811
Conversation
9524a63
to
31a1c81
Compare
ba9b772
to
5fd63d2
Compare
…5811) Cope with repeated calls to lxc console --show-log which exits 1 with the error "no such file or directory" when the log entries have already been processed and no new log entries exist. Preserve lxc_log on the client instance and return former log content on lxd platforms when "no such file or directory" runtime errors are raised
…al#5811) Adapt test_no_problems to use verify_clean_boot instead of verify_clean_log. Fix verify_clean_boot to retain platform-specific ignored tracebacks before passing it into _verify_clean_boot.
1e909fe
to
d6c6792
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minimal is OTW 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left questions/comments, but nothing blocking
@@ -168,7 +168,11 @@ def append_or_create_list( | |||
ignore_warnings, | |||
"Unable to disable SSH logins for opc given ssh_redirect_user", | |||
) | |||
|
|||
# Preserve platform-specific tracebacks expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So was traceback_texts just not being used before when it was supposed to? If None
or a list is passed as ignore_tracebacks, should we just use that use and append to that rather than keeping a separate list here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes traceback_texts was defined and left unused. If False is provided, we want to report any tracebacks. If None is provided, that's the default and in default case I think we want to ignore expected tracebacks per platform. If a list is passed then we should append to that list instead of keeping the separate list here.
assert f"[INFO]: {boundary_message}" in log | ||
verify_clean_boot( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing that needs to change here, but it does seem a little odd calling verify_clean_boot
multiple times in multiple tests in the class given that they're all operating on the same instance and the log won't be any different between tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I had wondered about just consolidating the deprecation test and the no_problems test. I have though consolidated the rsyslog verify_clean_boot call with testy_no_problems case as they are both testing and asserting the same log warning condition based on presence of rsyslogd.
…al#5811) Adapt test_no_problems to use verify_clean_boot instead of verify_clean_log. Fix verify_clean_boot to retain platform-specific ignored tracebacks before passing it into _verify_clean_boot.
d6c6792
to
fbcfaf2
Compare
…al#5811) Adapt test_no_problems to use verify_clean_boot instead of verify_clean_log. Fix verify_clean_boot to retain platform-specific ignored tracebacks before passing it into _verify_clean_boot.
fbcfaf2
to
ae328ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Cope with repeated calls to lxc console --show-log which exits 1 with the error "no such file or directory" when the log entries have already been processed and no new log entries exist. Preserve lxc_log on the client instance and return former log content on lxd platforms when "no such file or directory" runtime errors are raised
Rebase as separate commits
Proposed Commit Message
Additional Context
Resolves test_keys_to_console errors seen in https://jenkins.canonical.com/server-team/view/cloud-init/job/cloud-init-integration-noble-lxd_container-minimal/lastSuccessfulBuild/#showFailuresLink
Test Steps
Merge type