[pve-devel] [PATCH v2 container 2/5] adapt to new storage_migrate activation behavior
Fabian Ebner
f.ebner at proxmox.com
Fri Nov 6 15:30:56 CET 2020
Every local volume is migrated via storage_migrate and activated there,
so there is no need to do it in prepare() anymore.
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
dependency bump needed
I only found run_replication as a potential place that might need
active local volumes, but that also uses storage_migrate in the end.
src/PVE/LXC/Migrate.pm | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm
index 90d74b4..94a78c5 100644
--- a/src/PVE/LXC/Migrate.pm
+++ b/src/PVE/LXC/Migrate.pm
@@ -45,7 +45,6 @@ sub prepare {
$self->{was_running} = $running;
my $force = $self->{opts}->{force} // 0;
- my $need_activate = [];
PVE::LXC::Config->foreach_volume($conf, sub {
my ($ms, $mountpoint) = @_;
@@ -80,9 +79,6 @@ sub prepare {
warn "Used shared storage '$storage' is not online on source node!\n"
if !$plugin->check_connection($storage, $scfg);
} else {
- # only activate if not shared
- push @$need_activate, $volid;
-
# unless in restart mode because we shut the container down
die "unable to migrate local mount point '$volid' while CT is running"
if $running && !$restart;
@@ -90,8 +86,6 @@ sub prepare {
});
- PVE::Storage::activate_volumes($self->{storecfg}, $need_activate);
-
# todo: test if VM uses local resources
# test ssh connection
--
2.20.1
More information about the pve-devel
mailing list