public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] applied: [PATCH storage] vdisk_list: skip scanning storages which cannot have images/rootdisks
@ 2020-07-09 14:16 Thomas Lamprecht
  0 siblings, 0 replies; only message in thread
From: Thomas Lamprecht @ 2020-07-09 14:16 UTC (permalink / raw)
  To: pve-devel

Do not try to scan (and thus activate) storages which aren't
configured to support (or cannot support) "vdisks" anyway.

Avoids seemingly strange failures of VM migrations due to a backup storage
not being currently online - even if that storage isn't referenced in
the VM config anywhere..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
 PVE/Storage.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index edf9a2e..8375a91 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -882,6 +882,8 @@ sub vdisk_list {
 	foreach my $sid (keys %$ids) {
 	    next if $storeid && $storeid ne $sid;
 	    next if !storage_check_enabled($cfg, $sid, undef, 1);
+	    my $content = $ids->{$sid}->{content};
+	    next if !($content->{rootdir} || $content->{images});
 	    push @$storage_list, $sid;
 	}
     }
-- 
2.20.1





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-09 14:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 14:16 [pve-devel] applied: [PATCH storage] vdisk_list: skip scanning storages which cannot have images/rootdisks 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