]> git.proxmox.com Git - pve-network.git/commitdiff
zone status: mark vnets with unknown zone as failed
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 28 Apr 2021 14:37:35 +0000 (16:37 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 28 Apr 2021 14:42:20 +0000 (16:42 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Network/SDN/Zones.pm

index 68be3a7de5cec5f9521207877f6e832436f61207..a4d81e3349f0cf9e112c73c2855eb52af59e6649 100644 (file)
@@ -244,6 +244,13 @@ sub status {
        next if !defined($zone);
 
        my $plugin_config = $zone_cfg->{ids}->{$zone};
+
+       if (!defined($plugin_config)) {
+           $vnet_status->{$id}->{status} = 'error';
+           $vnet_status->{$id}->{statusmsg} = "unknown zone '$zone' configured";
+           next;
+       }
+
        next if defined($plugin_config->{nodes}) && !$plugin_config->{nodes}->{$nodename};
 
        $vnet_status->{$id}->{zone} = $zone;