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

test: add get_syslog_or_console for minimal images without syslog #5793

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

blackboxsw
Copy link
Collaborator

@blackboxsw blackboxsw commented Oct 7, 2024

Proposed Commit Message

test: add get_syslog_or_console for minimal images without syslog #5793

Minimal images do not have rsyslog installed. As a result, no
/var/log/syslog exists. Add helper function get_syslog_or_console
to allow minimal images to use pycloudlib.Instance.get_console
instead of reading /var/log/syslog.

Additional Context

Sample jenkins test failures for minimal.
https://jenkins.canonical.com/server-team/job/zzz-chad-jammy-lxd-minimal/lastSuccessfulBuild

Test Steps

CLOUD_INIT_OS_IMAGE_TYPE=minimal CLOUD_INIT_CLOUD_INIT_SOURCE=ppa:cloud-init-dev/daily CLOUD_INIT_PLATFORM=lxd_container tox -e integration-tests -- 
tests/integration_tests/modules/test_keys_to_console.py tests/integration_tests/modules/test_ssh_auth_key_fingerprints.py tests/integration_tests/modules/test_write_files.py

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One inline comment, but otherwise LGTM

f"Image {CURRENT_RELEASE.os} doesn't contain 'file' util"
)

class_client.execute("apt-get update")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth updating this test to use something other than file? That particular command doesn't seem to be integral to the test.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, we don't need to use file for this verification/validation. Simplifying this to just check md5sums of the output file.

Minimal images do not have rsyslog installed. As a result, no
/var/log/syslog exists. Add helper function get_syslog_or_console
to allow minimal images to use pycloudlib.Instance.get_console
instead of reading /var/log/syslog.
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@blackboxsw blackboxsw merged commit e10b09b into canonical:main Oct 7, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants