[pve-devel] [PATCH pve-common] etc_network_interfaces : add uplink-id option
Alexandre DERUMIER
aderumier at odiso.com
Thu Sep 5 12:49:52 CEST 2019
>>hmm, this ringed some bells, this was sent to the list with a bit
>>more extensive commit message[0], it's still the same or? Can I take+
>>the commit message from [0] if I'd apply this - to have some more info?
yes, sorry, this is the same than previous patch series. I thinked it was lost.
The patch series have another patch to handle vnet in /etc/network/interfaces, but this is not needed finally.
(as the code is generated in /etc/pve/network/interfaces.d/sdn)
----- Mail original -----
De: "Thomas Lamprecht" <t.lamprecht at proxmox.com>
À: "pve-devel" <pve-devel at pve.proxmox.com>, "aderumier" <aderumier at odiso.com>
Envoyé: Jeudi 5 Septembre 2019 11:28:02
Objet: Re: [pve-devel] [PATCH pve-common] etc_network_interfaces : add uplink-id option
On 04.09.19 09:47, Alexandre Derumier wrote:
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
hmm, this ringed some bells, this was sent to the list with a bit
more extensive commit message[0], it's still the same or? Can I take+
the commit message from [0] if I'd apply this - to have some more info?
[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-March/036217.html
> ---
> src/PVE/INotify.pm | 18 +++++++++++++++++-
> 1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
> index 8b49f5a..fd54313 100644
> --- a/src/PVE/INotify.pm
> +++ b/src/PVE/INotify.pm
> @@ -955,6 +955,7 @@ sub __read_etc_network_interfaces {
> 'bridge-multicast-flood' => 1,
> 'bond_miimon' => 1,
> 'bond_xmit_hash_policy' => 1,
> + 'uplink-id' => 1,
> 'vlan-protocol' => 1,
> 'vxlan-id' => 1,
> 'vxlan-svcnodeip' => 1,
> @@ -1183,7 +1184,7 @@ sub __interface_to_string {
> comments => 1, autostart => 1, options => 1,
> address => 1, netmask => 1, gateway => 1, broadcast => 1,
> method6 => 1, families => 1, options6 => 1,
> - address6 => 1, netmask6 => 1, gateway6 => 1, broadcast6 => 1 };
> + address6 => 1, netmask6 => 1, gateway6 => 1, broadcast6 => 1, 'uplink-id' => 1 };
>
> if (!$first_block) {
> # not printing out options
> @@ -1487,6 +1488,21 @@ sub __write_etc_network_interfaces {
> }
> }
>
> + # check uplink
> + my $uplinks = {};
> + foreach my $iface (keys %$ifaces) {
> + my $d = $ifaces->{$iface};
> + if (my $uplinkid = $d->{'uplink-id'}) {
> + die "iface '$iface' - uplink-id $uplinkid is only allowed on physical and linux bond interfaces\n"
> + if $d->{type} ne 'eth' && $d->{type} ne 'bond';
> +
> + die "iface '$iface' - uplink-id $uplinkid is already assigned on '$uplinks->{$uplinkid}'\n"
> + if $uplinks->{$uplinkid};
> +
> + $uplinks->{$uplinkid} = $iface;
> + }
> + }
> +
> # check bridgeport option
> my $bridgeports = {};
> my $bridges = {};
>
More information about the pve-devel
mailing list