[pve-devel] [PATCH] add pve-bridge-hotplug script

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Nov 10 08:40:16 CET 2015


On Fri, Nov 06, 2015 at 04:41:55PM +0100, Dietmar Maurer wrote:
> applied, thanks (good catch!)

Since the diff between pve-bridge and pve-bridge-hotplug is only a few
lines, I wonder if we should just make it a parameter for the script
(or a second env var, whichever seems better)?
Should I prepare a patch?

See the diff between the two files:
--- pve-bridge  2015-05-04 10:23:42.264921630 +0200
+++ pve-bridge-hotplug  2015-11-10 08:34:46.454064863 +0100
@@ -16,13 +16,11 @@ die "got strange interface name '$iface'
 my $vmid = $1;
 my $netid = "net$2";

-my $migratedfrom = $ENV{PVE_MIGRATED_FROM};
-
-my $conf = PVE::QemuServer::load_config($vmid, $migratedfrom);
+my $conf = PVE::QemuServer::load_config($vmid);

 my $netconf = $conf->{$netid};

-$netconf = $conf->{pending}->{$netid} if !$migratedfrom && defined($conf->{pending}->{$netid});
+$netconf = $conf->{pending}->{$netid} if defined($conf->{pending}->{$netid});

 die "unable to get network config '$netid'\n"
     if !defined($netconf);



More information about the pve-devel mailing list