diff --git a/multi-node-aio-xenial-ansible/setup-host.sh b/multi-node-aio-xenial-ansible/setup-host.sh index 13577e56..9d9ce485 100755 --- a/multi-node-aio-xenial-ansible/setup-host.sh +++ b/multi-node-aio-xenial-ansible/setup-host.sh @@ -42,7 +42,8 @@ fi # Install basic packages known to be needed apt-get update && apt-get install -y bridge-utils ifenslave libvirt-bin lvm2 openssh-server python2.7 qemu-kvm ansible virtinst virt-manager \ - vlan software-properties-common python-software-properties python-netaddr ntp qemu-utils lxc1 virtualenv + vlan software-properties-common python-software-properties python-netaddr ntp qemu-utils lxc1 virtualenv \ + iptables-persistent if ! grep "^source.*cfg$" /etc/network/interfaces; then echo 'source /etc/network/interfaces.d/*.cfg' | tee -a /etc/network/interfaces @@ -88,6 +89,11 @@ iptables_filter_rule_add mangle 'POSTROUTING -s 10.0.0.0/24 -o br-dhcp -p udp -m # To ensure ssh checksum are always correct iptables_filter_rule_add mangle 'POSTROUTING -p tcp -j CHECKSUM --checksum-fill' +# save the iptables rules +systemctl enable netfilter-persistent +systemctl start netfilter-persistent +invoke-rc.d netfilter-persistent save + # Enable partitioning of the "${DATA_DISK_DEVICE}" PARTITION_HOST=${PARTITION_HOST:-false} if [[ "${PARTITION_HOST}" = true ]]; then diff --git a/multi-node-aio-xenial-ansible/setup-pxeboot.sh b/multi-node-aio-xenial-ansible/setup-pxeboot.sh index b4f62e9c..926d5594 100644 --- a/multi-node-aio-xenial-ansible/setup-pxeboot.sh +++ b/multi-node-aio-xenial-ansible/setup-pxeboot.sh @@ -30,8 +30,10 @@ ansible-playbook -v -i inventory create_pxeboot_server.yml --extra-vars \ sed -i 's/^INTERFACES.*/INTERFACES="br-dhcp"/g' /etc/default/isc-dhcp-server # Ensure the services are (re)started -service isc-dhcp-server restart -service atftpd restart +systemctl enable isc-dhcp-server +systemctl enable atftpd +systemctl start isc-dhcp-server +systemctl start atftpd # Create a xenial sources file for the VMs to download cp -v templates/xenial-sources.list /var/www/html/xenial-sources.list diff --git a/multi-node-aio/functions.rc b/multi-node-aio/functions.rc index 3e67dba8..c10ba2e2 100755 --- a/multi-node-aio/functions.rc +++ b/multi-node-aio/functions.rc @@ -251,4 +251,5 @@ with open('haproxy_config.yml') as f: if isinstance(y, int): print y EOL -} \ No newline at end of file +} +