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

Add patch to remove block.* settings from LVM and Ceph RBD block volumes #12813

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

roosterfish
Copy link
Contributor

This adds a patch to remove the block.* settings from VMs and custom volumes of type block in the LVM and Ceph driver.

That is required after #12805 and follows the same procedure as in #12390.

@roosterfish
Copy link
Contributor Author

I have removed https://github.com/canonical/lxd/pull/12390/files#diff-967760ebb0c0b53b1eb0f2c1f141563885405f50c26d77dab588b90d26528b0aR1087 in order to be able to patch Ceph RBD backed volumes.
I guess the patch is running locally on each node so this would try to apply the patch on matching Ceph volumes x times (if clustered). Will this cause any race?

@tomponline
Copy link
Member

I have removed https://github.com/canonical/lxd/pull/12390/files#diff-967760ebb0c0b53b1eb0f2c1f141563885405f50c26d77dab588b90d26528b0aR1087 in order to be able to patch Ceph RBD backed volumes. I guess the patch is running locally on each node so this would try to apply the patch on matching Ceph volumes x times (if clustered). Will this cause any race?

Yes it will. For Ceph I suggest we need to detect if the member is leader and only run it on the leader.

@roosterfish roosterfish force-pushed the patch_block_settings branch 3 times, most recently from f6f2ee5 to e25aabb Compare February 2, 2024 12:15
@roosterfish
Copy link
Contributor Author

@tomponline looks to be ok now, the code for checking the leader was just a few lines above :)

lxd/patches.go Outdated Show resolved Hide resolved
lxd/patches.go Outdated Show resolved Hide resolved
lxd/patches.go Outdated Show resolved Hide resolved
@roosterfish roosterfish force-pushed the patch_block_settings branch 3 times, most recently from 5dd8296 to 758588a Compare February 2, 2024 15:49
lxd/patches.go Outdated Show resolved Hide resolved
lxd/patches.go Outdated Show resolved Hide resolved
…umes

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
@tomponline tomponline merged commit dca5323 into canonical:main Feb 8, 2024
26 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