proxmox destroys working /etc/network/interfaces bond config

mouk

Renowned Member
May 3, 2016
49
0
71
53
Hi,

To our surprise we see that proxmox rewrites (parts of) the network/interfaces file from this working version:
Code:
auto MNGT_bond0
iface MNGT_bond0 inet manual
    bond-miimon 100
    bond-mode 802.3ad
    bond-xmit-hash-policy layer3+4
    bond-slaves nic3
    bond-lacp-rate fast

to this (note the underscores and "slaves" that doesn't work) NOT-working version:

Code:
auto MNGT_bond0
iface MNGT_bond0 inet manual
    bond_miimon 100
    bond_mode 802.3ad
    bond_xmit_hash_policy layer3+4
    slaves nic3
    bond-lacp-rate fast

Why would proxmox do that??
 
Seems this happens when such a stanza was added manually, but then another stanza is edited through the UI? At least for me our UI does not allow adding or editing such a stanza by itself. The underscore in MNGMT_bond0 trips it up, I'll take a look.
 
Yeah I added the bonds manually, not through the GUI. then later I edited something network through the GUI, and then all bond definitions were rewritten. (and broken, so after a reboot, the complete system was unreachable)
 
The problem is the name of the interface (MNGT_bond0). Our stack relies on the fact that bonds are named bondX (where X is a number) in order to detect bonds (see [1]). You will see in the UI with your initial configuration, that the bond is not recognized as such. If you rename it to conform to the expected bondX pattern, then this will not happen.

For a more in-depth explanation: Our parser translates / normalizes the directives contained in the interfaces file [2]. Since the type is unknown, it doesn't get translated back properly, but instead the internal directives are written directly into the interfaces file - leading to your observed behavior. Not optimal, I know, but this is how it works currently. (e: I guess we could at least translate the internal directives back when writing out the new configuration..)

[1] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_naming_conventions
[2] https://git.proxmox.com/?p=pve-comm...b4e3d1171f73fa39fac2849e51c6c862;hb=HEAD#l889
 
Last edited:
Thanks for checking and confirming back.
Ok, that's a pity, we would have liked to use meaningful names, including a VLAN identifier. We will have to use the comment field instead.
Does the same limitation apply to vmbr? I notice those DO get recognised as bridges in the pve GUI.
 
Does the same limitation apply to vmbr? I notice those DO get recognised as bridges in the pve GUI.
No, this restriction has been lifted for bridges and physical network interfaces not too long ago, but still persists for other types of network interfaces.
 
Great! I really hope the limitation will also be lifted for bridges! Thanks for the quick help! :-)
 
Yeah, we reverted now to doing that as well. But vmbr names are now nice and descriptive, and bonds are just numbered. It would be nice to eliminate that restriction.