Hey All,

I am trying to get a bonded_bridge_slave setup working and it looks like
the Debian snippet isn't working correctly for me. It looks like it is
ignoring bonded port options when in a interface->bond->bridge
configuration.

Here is my cobbler system report for my test VM;
[root@cobbler ~]# cobbler system report
Name                           : cobbler-test
TFTP Boot Files                : {}
Comment                        :
Enable gPXE?                   : False
Fetchable Files                : {}
Gateway                        :
Hostname                       : cobbler-test
Image                          :
IPv6 Autoconfiguration         : False
IPv6 Default Device            :
Kernel Options                 : {}
Kernel Options (Post Install)  : {}
Kickstart                      : <<inherit>>
Kickstart Metadata             : {}
LDAP Enabled                   : False
LDAP Management Type           : authconfig
Management Classes             : []
Management Parameters          : <<inherit>>
Monit Enabled                  : False
Name Servers                   : ['8.8.8.8', '8.8.4.4']
Name Servers Search Path       : []
Netboot Enabled                : False
Owners                         : <<inherit>>
Power Management Address       :
Power Management ID            :
Power Management Password      :
Power Management Type          : ipmitool
Power Management Username      :
Profile                        : Ubuntu-16.04-x86_64
Internal proxy                 : <<inherit>>
Red Hat Management Key         : <<inherit>>
Red Hat Management Server      : <<inherit>>
Repos Enabled                  : False
Server Override                : <<inherit>>
Status                         : production
Template Files                 : {}
Virt Auto Boot                 : 0
Virt CPUs                      : <<inherit>>
Virt Disk Driver Type          : <<inherit>>
Virt File Size(GB)             : <<inherit>>
Virt Path                      : <<inherit>>
Virt PXE Boot                  : 0
Virt RAM (MB)                  : <<inherit>>
Virt Type                      : xenpv
Interface =====                : cloudbr0
Bonding Opts                   :
Bridge Opts                    : fd=5 stp=off maxwait=1
CNAMES                         : []
InfiniBand Connected Mode      : False
DHCP Tag                       :
DNS Name                       :
Per-Interface Gateway          :
Master Interface               :
Interface Type                 : bridge
IP Address                     : 192.168.100.50
IPv6 Address                   :
IPv6 Default Gateway           :
IPv6 MTU                       :
IPv6 Prefix                    :
IPv6 Secondaries               : []
IPv6 Static Routes             : []
MAC Address                    :
Management Interface           : False
MTU                            :
Subnet Mask                    : 255.255.255.0
Static                         : True
Static Routes                  : []
Virt Bridge                    : xenbr0
Interface =====                : bond0
Bonding Opts                   : miimon=100 mode=1
Bridge Opts                    :
CNAMES                         : []
InfiniBand Connected Mode      : False
DHCP Tag                       :
DNS Name                       :
Per-Interface Gateway          :
Master Interface               : cloudbr0
Interface Type                 : bonded_bridge_slave
IP Address                     :
IPv6 Address                   :
IPv6 Default Gateway           :
IPv6 MTU                       :
IPv6 Prefix                    :
IPv6 Secondaries               : []
IPv6 Static Routes             : []
MAC Address                    :
Management Interface           : False
MTU                            :
Subnet Mask                    :
Static                         : True
Static Routes                  : []
Virt Bridge                    : xenbr0
Interface =====                : enp0s3
Bonding Opts                   :
Bridge Opts                    :
CNAMES                         : []
InfiniBand Connected Mode      : False
DHCP Tag                       :
DNS Name                       :
Per-Interface Gateway          :
Master Interface               : bond0
Interface Type                 : bond_slave
IP Address                     :
IPv6 Address                   :
IPv6 Default Gateway           :
IPv6 MTU                       :
IPv6 Prefix                    :
IPv6 Secondaries               : []
IPv6 Static Routes             : []
MAC Address                    : 08:00:27:0d:f7:b4
Management Interface           : True
MTU                            :
Subnet Mask                    :
Static                         : True
Static Routes                  : []
Virt Bridge                    : xenbr0
Interface =====                : enp0s8
Bonding Opts                   :
Bridge Opts                    :
CNAMES                         : []
InfiniBand Connected Mode      : False
DHCP Tag                       :
DNS Name                       :
Per-Interface Gateway          :
Master Interface               : bond0
Interface Type                 : bond_slave
IP Address                     :
IPv6 Address                   :
IPv6 Default Gateway           :
IPv6 MTU                       :
IPv6 Prefix                    :
IPv6 Secondaries               : []
IPv6 Static Routes             : []
MAC Address                    : 08:00:27:bf:8b:5d
Management Interface           : False
MTU                            :
Subnet Mask                    :
Static                         : True
Static Routes                  : []
Virt Bridge                    : xenbr0

However when I check the preseed_late_default output script I don't see the
bonding options;

# Start preseed_late_default
# This script runs in the chroot /target by default
# Start post_install_network_config generated code
rm -f /etc/network/interfaces
touch /etc/network/interfaces
echo "auto lo" >> /etc/network/interfaces
echo "iface lo inet loopback" >> /etc/network/interfaces
echo "" >> /etc/network/interfaces
echo "auto cloudbr0" >> /etc/network/interfaces
echo "  fd=5" >> /etc/network/interfaces
echo "  stp=off" >> /etc/network/interfaces
echo "  maxwait=1" >> /etc/network/interfaces
echo "iface cloudbr0 inet static" >> /etc/network/interfaces
echo "   address 192.168.100.50" >> /etc/network/interfaces
echo "   netmask 255.255.255.0" >> /etc/network/interfaces
echo "auto bond0" >> /etc/network/interfaces
echo "iface bond0 inet manual" >> /etc/network/interfaces
echo "auto enp0s3" >> /etc/network/interfaces
echo "iface enp0s3 inet manual" >> /etc/network/interfaces
echo "bond-master bond0" >> /etc/network/interfaces
echo "auto enp0s8" >> /etc/network/interfaces
echo "iface enp0s8 inet manual" >> /etc/network/interfaces
echo "bond-master bond0" >> /etc/network/interfaces
echo "cobbler-test" > /etc/hostname
/bin/hostname cobbler-test
sed -i -e "/^nameserver /d" /etc/resolv.conf
echo "nameserver 8.8.8.8" >>/etc/resolv.conf
echo "nameserver 8.8.4.4" >>/etc/resolv.conf
# End post_install_network_config generated code

# start late_apt_repo_config
cat<<EOF>/etc/apt/sources.list
deb http://192.168.100.1/cblr/links/Ubuntu-16.04-x86_64 xenial main
EOF
# end late_apt_repo_config

# A general purpose snippet to add late-command actions for preseeds

# Start download cobbler managed config files (if applicable)
# End download cobbler managed config files (if applicable)


wget "http://192.168.100.1/cblr/svc/op/ks/system/cobbler-test"; -O
/var/log/cobbler.seed
wget "http://192.168.100.1/cblr/svc/op/trig/mode/post/system/cobbler-test";
-O /dev/null
wget "http://192.168.100.1/cblr/svc/op/nopxe/system/cobbler-test"; -O /dev/null
# End preseed_late_default

If I change $SNIPPET('post_install_network_config_deb') to
$SNIPPET('post_install_network_config') in
/var/lib/cobbler/scripts/preseed_late_default and check the output I
get the correct bonding options;

# Start configuration for bond0
echo "DEVICE=bond0" > /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0
echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0
echo "alias bond0 bonding" >> /etc/modprobe.conf.cobbler
cat >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0 << EOF
BONDING_OPTS="miimon=100 mode=1"
EOF
echo "BRIDGE=cloudbr0" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0
echo "HOTPLUG=no" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0
echo "BOOTPROTO=none" >> /etc/sysconfig/network-scripts/cobbler/ifcfg-bond0
# End configuration for bond0

Any help is appreciated, thanks!
_______________________________________________
cobbler mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to