public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH storage 1/4] Revert "vdisk list: only collect images from storages with an appropriate content type"
@ 2021-03-22 14:32 Fabian Ebner
  2021-03-22 14:32 ` [pve-devel] [PATCH storage 2/4] vdisk list: allow specifying content type Fabian Ebner
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Fabian Ebner @ 2021-03-22 14:32 UTC (permalink / raw)
  To: pve-devel

This reverts commit a44c18925d223a971296801a0985db34707ada4d and adds a reminder
comment.

The mentioned commit is actually a backwards-incompatible change that leads to
slightly different behavior when migrating a VM with volumes on a misconfigured
storage. For example, unreferenced volumes on a misconfigured storage won't be
picked up, even though they were before. And for referenced volumes on a
misconfigured storage, the disk size would not be updated on migration anymore.

We should wait until the next major release for this change and then also
re-evaluate the migration behavior with misconfigured disks.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
 PVE/Storage.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index 18c03ec..19f675d 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -938,7 +938,7 @@ sub vdisk_list {
 
     storage_check_enabled($cfg, $storeid) if ($storeid);
 
-    my $res = { map { $_ => [] } keys %{$ids} };
+    my $res = {};
 
     # prepare/activate/refresh all storages
 
@@ -964,8 +964,10 @@ sub vdisk_list {
 
     activate_storage_list($cfg, $storage_list, $cache);
 
-    foreach my $sid (@{$storage_list}) {
+    # FIXME PVE 7.0: only scan storages with the correct content types
+    foreach my $sid (keys %$ids) {
 	next if $storeid && $storeid ne $sid;
+	next if !storage_check_enabled($cfg, $sid, undef, 1);
 
 	my $scfg = $ids->{$sid};
 	my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
-- 
2.20.1





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

end of thread, other threads:[~2021-04-18 16:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22 14:32 [pve-devel] [PATCH storage 1/4] Revert "vdisk list: only collect images from storages with an appropriate content type" Fabian Ebner
2021-03-22 14:32 ` [pve-devel] [PATCH storage 2/4] vdisk list: allow specifying content type Fabian Ebner
2021-03-31  8:26   ` [pve-devel] applied: " Thomas Lamprecht
2021-03-22 14:32 ` [pve-devel] [PATCH container 3/4] filter by content type when using vdisk_list Fabian Ebner
2021-04-18 16:05   ` [pve-devel] applied: " Thomas Lamprecht
2021-03-22 14:32 ` [pve-devel] [PATCH qemu-server 4/4] " Fabian Ebner
2021-04-18 16:05   ` [pve-devel] applied: " Thomas Lamprecht
2021-03-31  8:26 ` [pve-devel] applied: [PATCH storage 1/4] Revert "vdisk list: only collect images from storages with an appropriate content type" 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