]> git.proxmox.com Git - pve-storage.git/commitdiff
fix #3030: always activate volumes in storage_migrate
authorFabian Ebner <f.ebner@proxmox.com>
Fri, 6 Nov 2020 14:30:55 +0000 (15:30 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Nov 2020 18:04:58 +0000 (19:04 +0100)
AFAICT the snapshot activation is not necessary for our plugins at the moment,
but it doesn't really hurt and might be relevant in the future or for external
plugins.

Deactivating volumes is up to the caller, because for example, for replication
on a running guest, we obviously don't want to deactivate volumes.

Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/Storage.pm

index 18eef46fb217da231eb806cb4e3c43128ab236e1..932f0f186e5d9e1e39fadae4708e47056e75c7d9 100755 (executable)
@@ -709,6 +709,13 @@ sub storage_migrate {
     };
 
     volume_snapshot($cfg, $volid, $snapshot) if $migration_snapshot;
+
+    if (defined($snapshot)) {
+       activate_volumes($cfg, [$volid], $snapshot);
+    } else {
+       activate_volumes($cfg, [$volid]);
+    }
+
     eval {
        if ($insecure) {
            my $input = IO::File->new();