public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 storage 1/5] fix #3030: always activate volumes in storage_migrate
@ 2020-11-06 14:30 Fabian Ebner
  2020-11-06 14:30 ` [pve-devel] [PATCH v2 container 2/5] adapt to new storage_migrate activation behavior Fabian Ebner
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Fabian Ebner @ 2020-11-06 14:30 UTC (permalink / raw)
  To: pve-devel

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 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index cd7b5ff..69c373b 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -697,6 +697,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();
-- 
2.20.1





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-11-24 15:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 14:30 [pve-devel] [PATCH v2 storage 1/5] fix #3030: always activate volumes in storage_migrate Fabian Ebner
2020-11-06 14:30 ` [pve-devel] [PATCH v2 container 2/5] adapt to new storage_migrate activation behavior Fabian Ebner
2020-11-10 18:29   ` [pve-devel] applied: " Thomas Lamprecht
2020-11-06 14:30 ` [pve-devel] [RFC v2 container 3/5] deactivate volumes after storage_migrate Fabian Ebner
2020-11-24 15:26   ` [pve-devel] applied: " Fabian Grünbichler
2020-11-06 14:30 ` [pve-devel] [RFC v2 qemu-server 4/5] adapt to new storage_migrate activation behavior Fabian Ebner
2020-11-24 15:29   ` [pve-devel] applied: " Fabian Grünbichler
2020-11-06 14:30 ` [pve-devel] [RFC v2 qemu-server 5/5] deactivate volumes after storage_migrate Fabian Ebner
2020-11-24 15:29   ` [pve-devel] applied: " Fabian Grünbichler
2020-11-10 18:12 ` [pve-devel] applied: [PATCH v2 storage 1/5] fix #3030: always activate volumes in storage_migrate Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal