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

Drop filesystem suffix and DB settings from VM block volumes #11755

Merged

Conversation

monstermunchkin
Copy link
Contributor

@monstermunchkin monstermunchkin commented May 30, 2023

Fixes #11721

@monstermunchkin monstermunchkin force-pushed the issues/11721-vm-filesystem-suffix branch from 05a7d75 to 2ff3301 Compare May 30, 2023 15:05
Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

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

Will this stop any existing instances from working if they were created using earlier versions?

@monstermunchkin
Copy link
Contributor Author

Will this stop any existing instances from working if they were created using earlier versions?

Let me check this before merging.

@monstermunchkin
Copy link
Contributor Author

@tomponline

# on master branch
$ lxc init images:ubuntu/lunar v1 --vm -s zfs
Creating v1

# switch to new branch
$ lxc init images:ubuntu/lunar v2 --vm -s zfs
Creating v2
Error: Failed instance creation: Failed creating instance from image: Error inserting volume "a5f0adb5bad0499be652d8bd34722673b8970703c421daaf692c021b05dff10a" for project "default" in pool "zfs" of type "images" into database "UNIQUE constraint failed: index 'storage_volumes_unique_storage_pool_id_node_id_project_id_name_type'"

That's because LXD thinks there is no zfs volume yet and tries to create it. A patch which removes the _<fs> from <pool>/images/<id>_<fs>.block fixes this.

@monstermunchkin
Copy link
Contributor Author

jenkins: test this please

@monstermunchkin monstermunchkin force-pushed the issues/11721-vm-filesystem-suffix branch from cecd469 to 1c1aac7 Compare June 23, 2023 17:42
@tomponline
Copy link
Member

@monstermunchkin please can you rebase this so the latest tests run on it, and let me know if you would like a review?

@monstermunchkin monstermunchkin force-pushed the issues/11721-vm-filesystem-suffix branch from 1c1aac7 to 4bc4c19 Compare June 27, 2023 08:21
lxd/patches.go Outdated Show resolved Hide resolved
@monstermunchkin monstermunchkin force-pushed the issues/11721-vm-filesystem-suffix branch from 4bc4c19 to 2a0777f Compare June 27, 2023 13:13
@tomponline tomponline merged commit 816ae30 into canonical:master Jun 28, 2023
@monstermunchkin monstermunchkin deleted the issues/11721-vm-filesystem-suffix branch June 28, 2023 18:16
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.

VM image (block) volumes get created with a filesystem suffix when zfs.block_mode is enabled
2 participants