/e/n/i.d/br0.config: auto bond0 iface bond0 inet manual hwaddress ether d8:9d:67:15:9f:c0 bond-miimon 100 bond-mode 4 bond-slaves none bond-xmit-hash-policy layer3+4 auto br0 iface br0 inet dhcp bridge_ports bond0 dns-nameservers 162.213.32.1 dns-search search internal canonical.com post-up ip link set bond0 mtu 1500 auto em1 iface em1 inet manual bond-master bond0 bond-primary em1 em2 auto em2 iface em2 inet manual bond-master bond0 bond-primary em1 em2 /e/n/i: cat interfaces # Added by bondsetup.sh via MaaS preseed auto lo iface lo inet loopback source /etc/network/interfaces.d/*.config preseed: {{inherit "preseed_master"}} {{def proxy}} d-i mirror/country string manual {{if node.architecture in {'i386/generic', 'amd64/generic'} }} d-i mirror/http/hostname string {{main_archive_hostname}} d-i mirror/http/directory string {{main_archive_directory}} {{else}} d-i mirror/http/hostname string {{ports_archive_hostname}} d-i mirror/http/directory string {{ports_archive_directory}} {{endif}} {{if http_proxy }} d-i mirror/http/proxy string {{http_proxy}} {{else}} d-i mirror/http/proxy string http://{{server_host}}:8000/ {{endif}} {{enddef}} {{def client_packages}} d-i pkgsel/include string cloud-init openssh-server python-software-properties vim avahi-daemon ifenslave-2.6 lxc-templates server^ {{enddef}} {{def preseed}} d-i passwd/user-password-crypted password ********************* {{preseed_data}} {{enddef}} {{py: def tagnames(n): tn = [] for tag in n.tags.all(): tn.append(tag.name) return tn }} {{def post_scripts}} # Executes late command and disables PXE. d-i preseed/late_command string true && \ {{if "compute" in tagnames(node) }} echo ';' | sfdisk /dev/sdb && mkfs.ext4 /dev/sdb1 && \ mkdir -p /target/srv && mount /dev/sdb1 /target/srv && \ mkdir -p /target/srv/nova/instances && umount /target/srv && \ echo '/dev/sdb1 /srv ext4 defaults 0 2' >> /target/etc/fstab && \ {{endif}} in-target sh -c 'f=$1; shift; echo $0 > $f && chmod 0440 $f $*' 'ubuntu ALL=(ALL) NOPASSWD: ALL' /etc/sudoers.d/maas && \ in-target wget --no-proxy "{{node_disable_pxe_url|escape.shell}}" --post-data "{{node_disable_pxe_data|escape.shell}}" -O /dev/null && \ in-target wget --no-proxy -O /usr/local/bin/bondsetup.sh http://10.34.0.2/bondsetup-upstart.sh && \ in-target chmod +x /usr/local/bin/bondsetup.sh && \ in-target wget --no-proxy -O /etc/init/maas-bondsetup.conf http://10.34.0.2/maas-bondsetup.conf.trusty.{{node.fqdn}} && \ true {{enddef}} bondsetup config: description "Bonding setup" start on starting udevtrigger task script if [ -x /usr/local/bin/bondsetup.sh ]; then rm -f /etc/network/interfaces.d/*.config || true echo -n >/etc/network/interfaces /usr/local/bin/bondsetup.sh -nbond0 -cem1 -odhcp -lem1,em2 -d162.213.32.1 -t1500 -bbr0 chmod -x /usr/local/bin/bondsetup.sh fi end script