[pve-devel] [RFC pve-container 4/6] do not remove DHCP mapping on stop
Stefan Lendl
s.lendl at proxmox.com
Fri Oct 27 13:29:58 CEST 2023
Signed-off-by: Stefan Lendl <s.lendl at proxmox.com>
---
src/PVE/LXC.pm | 8 --------
src/lxc-pve-poststop-hook | 1 -
2 files changed, 9 deletions(-)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index bd8eb63..a7de9b8 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -916,14 +916,6 @@ sub vm_stop_cleanup {
eval {
my $vollist = PVE::LXC::Config->get_vm_volumes($conf);
PVE::Storage::deactivate_volumes($storage_cfg, $vollist);
-
- for my $k (keys %$conf) {
- next if $k !~ /^net(\d+)/;
- my $net = PVE::LXC::Config->parse_lxc_network($conf->{$k});
- next if $net->{type} ne 'veth';
-
- PVE::Network::SDN::Dhcp::remove_mapping($net->{bridge}, $net->{hwaddr});
- }
};
warn $@ if $@; # avoid errors - just warn
}
diff --git a/src/lxc-pve-poststop-hook b/src/lxc-pve-poststop-hook
index e7d46c7..2fe97ec 100755
--- a/src/lxc-pve-poststop-hook
+++ b/src/lxc-pve-poststop-hook
@@ -12,7 +12,6 @@ use PVE::LXC::Config;
use PVE::LXC::Tools;
use PVE::LXC;
use PVE::Network;
-use PVE::Network::SDN::Dhcp;
use PVE::RESTEnvironment;
use PVE::Storage;
use PVE::Tools;
--
2.41.0
More information about the pve-devel
mailing list