Skip to content

Conversation

nmezhenskyi
Copy link
Contributor

@nmezhenskyi nmezhenskyi commented Jun 13, 2025

Fixes #15358.

Includes cherry-pick from lxc/incus#1669.

Previously MigrateReceive() function would incorrectly try calling CreateVolumeFromMigration() for attached local volumes during instance migration and fail with "not supported" error. This change fixes the issue. Now, CreateVolumeFromMigration() is called only for shared storage volumes in order to notify the shared storage driver to setup the volume on the receiving cluster member.

@nmezhenskyi nmezhenskyi marked this pull request as draft June 13, 2025 19:59
@nmezhenskyi
Copy link
Contributor Author

It seems that containers can be copied correctly even with custom volumes attached if the destination server already has volumes with the same name.

@tomponline
Copy link
Member

@nmezhenskyi hey, please can u book a meeting for us to work through the problem together as the scope of this bug fix remains unclear. Ta

@nmezhenskyi nmezhenskyi changed the title lxd: Destination clean up after failed instance copy lxd: Destination clean up after failed instance copy/move Jun 14, 2025
@nmezhenskyi nmezhenskyi force-pushed the fix-instance-copy-cleanup branch from 774fd3a to 550d563 Compare June 17, 2025 20:49
@nmezhenskyi nmezhenskyi changed the title lxd: Destination clean up after failed instance copy/move lxd: Fix shared storage setup during instance copy/move for QEMU driver Jun 17, 2025
presztak and others added 2 commits June 18, 2025 11:27
…ing with an extra disk

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
(cherry picked from commit dbe53f1a152c02adfffd5ee5da71da04a9c6b66d)
Signed-off-by: Nikita Mezhenskyi <nikita.mezhenskyi@canonical.com>
License: Apache-2.0
…cluster members

Fix condition in `MigrateReceive()` and `migrateSendLive()` functions
to notify shared storage driver to setup volume on cluster member
during instance migration.

Signed-off-by: Nikita Mezhenskyi <nikita.mezhenskyi@canonical.com>
@nmezhenskyi nmezhenskyi force-pushed the fix-instance-copy-cleanup branch from 550d563 to 37aba12 Compare June 18, 2025 16:11
@nmezhenskyi nmezhenskyi changed the title lxd: Fix shared storage setup during instance copy/move for QEMU driver lxd/instance/qemu: Fix shared storage volume setup during instance migration (from Incus) Jun 18, 2025
@nmezhenskyi nmezhenskyi marked this pull request as ready for review June 18, 2025 22:58
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.

LGTM thanks!

@tomponline tomponline merged commit ee3a23a into canonical:main Jun 19, 2025
30 checks passed
tomponline added a commit that referenced this pull request Jun 25, 2025
…5869)

Follow-up to #15798.

Adds a test for container migration (`lxc copy` and `lxc move`) with
attached local volume.
tomponline added a commit that referenced this pull request Jun 27, 2025
Follow-up to #15869 and
#15798.

Adds a test for VM migration (`lxc copy` and `lxc move`) with attached
local volume.
@nmezhenskyi nmezhenskyi deleted the fix-instance-copy-cleanup branch July 10, 2025 20:24
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.

Failure in copying an instance with custom volume attached
3 participants