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

Check for zfs volume leftovers before migration #558

Open
YanChii opened this issue Sep 8, 2021 · 0 comments
Open

Check for zfs volume leftovers before migration #558

YanChii opened this issue Sep 8, 2021 · 0 comments

Comments

@YanChii
Copy link
Contributor

YanChii commented Sep 8, 2021

If the previous migration has failed in a way that has prevented proper cleanup (e.g. network failure), there might be undeleted zfs filesytems/volumes of a migrated VM on a destination node that were not deleted.

When this happens, the next migration fails

Got bad return code (1). Error: cannot receive new filesystem stream: destination 'zones/mgmt03-1.local' exists
must specify -F to overwrite it
warning: cannot send 'zones/mgmt03-1.local/disk0@esmigrate-1-1631083400162894655': signal received
cannot send 'zones/mgmt03-1.local': I/O error
ERROR: Send/receive failed
NAME
zones/cores/mgmt03-1.local 

The solution is to check the destination for target zfs volumes and existing VMs. If the VM is not present and the zfs filesystems for it do exist, we can safely delete them. However if the VM is already present, we prevent accidental unwanted deletion of target VM by failing the migration.

The changes should go most probably to this function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant