[pve-devel] [PATCH] add pve-bridge-hotplug script
Alexandre DERUMIER
aderumier at odiso.com
Tue Nov 10 08:56:15 CET 2015
>>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?
I don't known how to pass param to script, I think we have tried in past,
and that why we use the env var.
And the env var is defined at qemu process start, I don't known if we can inject a
new env var on the fly ?
----- Mail original -----
De: "Wolfgang Bumiller" <w.bumiller at proxmox.com>
À: "dietmar" <dietmar at proxmox.com>, "pve-devel" <pve-devel at pve.proxmox.com>
Cc: "aderumier" <aderumier at odiso.com>
Envoyé: Mardi 10 Novembre 2015 08:40:16
Objet: Re: [pve-devel] [PATCH] add pve-bridge-hotplug script
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