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

fix: lxd do not check for thinpool kernel module #5709

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

holmanb
Copy link
Member

@holmanb holmanb commented Sep 16, 2024

Proposed Commit Message

fix: lxd do not check for thinpool kernel module

Rather than checking for kernel module file before running lxd, just
fall back to disabling thinpool and retrying with thinpool disabled
when subp() fails and it is using lvm as backing storage.

On some Ubuntu releases, the kernel module is compressed which causes
this check to fail and this warning to erroneously be logged. Making
this logic only run in the failure path and avoiding file matches on
kernel driver files should be less error prone.

BREAKING_CHANGE: On some Ubuntu series this changes behavior causing
lxd to now use lxd thinpool, which is the current lxd default.

Additional Context

Some images ship compressed kernel modules. On Jammy, GCE, we ship: /lib/modules/6.8.0-1014-gcp/kernel/drivers/md/dm-thin-pool.ko.zst

https://jenkins.canonical.com/server-team/view/cloud-init/job/cloud-init-integration-noble-gce/lastCompletedBuild/testReport/

Test Steps

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>)

Rather than checking for kernel module file before running lxd, just
fall back to disabling thinpool and retrying with thinpool disabled
when cloud-init fails and it is using lvm as backing storage.

On some Ubuntu releases, the kernel module is compressed which causes
this check to fail and this warning to erroneously be logged.
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

Copy link
Collaborator

@a-dubs a-dubs left a comment

Choose a reason for hiding this comment

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

looks good!

@holmanb holmanb merged commit 32f8554 into canonical:main Sep 17, 2024
21 checks passed
holmanb added a commit to holmanb/cloud-init that referenced this pull request Sep 17, 2024
Rather than checking for kernel module file before running lxd, just
fall back to disabling thinpool and retrying with thinpool disabled
when subp() fails and it is using lvm as backing storage.

On some Ubuntu releases, the kernel module is compressed which causes
this check to fail and this warning to erroneously be logged. Making
this logic only run in the failure path and avoiding file matches on
kernel driver files should be less error prone.

BREAKING_CHANGE: On some Ubuntu series this changes behavior causing
lxd to now use lxd thinpool, which is the current lxd default.

LP: #1982780
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.

3 participants