Skip to content

Ludus Installation Breaks Network Bonding After Phase 1 of Installation (and hosts file)

I have 4 ethernet ports bonded before installing Ludus. The configuration looks as follows:

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

/etc/network/interfaces.d/bond

# Bonded interface with static IP
auto bond0
iface bond0 inet static
    address 192.168.1.2
    netmask 255.255.255.0
    gateway 192.168.1.1
    bond-slaves eno1 eno2 eno3 eno4
    bond-mode 802.3ad
    bond-miimon 100
    bond-xmit-hash-policy layer3+4

# Individual interfaces
auto eno1
iface eno1 inet manual
    bond-master bond0

auto eno2
iface eno2 inet manual
    bond-master bond0

auto eno3
iface eno3 inet manual
    bond-master bond0

auto eno4
iface eno4 inet manual
    bond-master bond0

Additionally, /etc/hosts

127.0.0.1       localhost
127.0.1.1       debian

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouter
Server Settings
proxmox_node: ludus
proxmox_interface: bond0
proxmox_local_ip: 192.168.1.2
proxmox_public_ip: 192.168.1.2
proxmox_gateway: 192.168.1.1
proxmox_netmask: 255.255.255.0
proxmox_vm_storage_pool: local
proxmox_vm_storage_format: raw
proxmox_iso_storage_pool: local
ludus_nat_interface: vmbr1000
prevent_user_ansible_add: true

After starting the installation /etc/network/interfaces is updated to look like the interfaces.j2 template but breaks network connectivity requiring console access for intervention.. You can see below how the interfaces filte ended up looking after the interfaces.j2 template was applied.

# Ansible managed
auto lo
iface lo inet loopback

auto bond0
iface bond0 inet static
    address 192.168.1.2
    gateway 192.168.1.1
    netmask 255.255.255.0

# This is the default Ludus NAT'd network used for VM setup before VMs are moved onto their user interface/VLANs
auto vmbr1000
iface vmbr1000 inet static
    address 192.0.2.254/24
    bridge-ports none
    bridge-stp off
    bridge-fd 0
    bridge-vlan-aware yes
    bridge-vids 2-4094
    post-up   echo 1 > /proc/sys/net/ipv4/ip_forward
    post-up   iptables -t nat -A POSTROUTING -s '192.0.2.254/24' -o bond0 -j MASQUERADE
    post-down iptables -t nat -D POSTROUTING -s '192.0.2.254/24' -o bond0 -j MASQUERADE

and /etc/hosts which is mangled now:

127.0.0.1 localhost
 ludus ludus

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

It looks like it's using proxmox_local_ip from here so I'm not sure how it ended up being ludus (with a space) which is ~ the value of proxmox_node sans a space but that is definitely not used in the template.

Edited by goproslowyo