From c698f66bda356d4f16809c205962d4df03b09413 Mon Sep 17 00:00:00 2001 From: davidplunkett Date: Thu, 7 Mar 2019 19:49:09 +0000 Subject: [PATCH] replace bond0 references and wipe Ceph OSD fs Change-Id: I61f27b02dbad782a137d5c79a37feef4be388ea2 Signed-off-by: davidplunkett --- firstboot-genesis.sh.template | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/firstboot-genesis.sh.template b/firstboot-genesis.sh.template index 6592ed6..7676ad2 100644 --- a/firstboot-genesis.sh.template +++ b/firstboot-genesis.sh.template @@ -39,9 +39,13 @@ apparmor_parser -R /etc/apparmor.d/usr.sbin.tcpdump echo "Adding IP Tables Rules" echo 1 > /proc/sys/net/ipv4/ip_forward -iptables -t nat -A POSTROUTING -o bond0.41 -j MASQUERADE -iptables -A FORWARD -i bond0.41 -o @@SRV_PXE_INF@@ -m state --state RELATED,ESTABLISHED -j ACCEPT -iptables -A FORWARD -i @@SRV_PXE_INF@@ -o bond0.41 -j ACCEPT +iptables -t nat -A POSTROUTING -o @@SRV_BOND@@.@@SRV_VLAN@@ -j MASQUERADE +iptables -A FORWARD -i @@SRV_BOND@@.@@SRV_VLAN@@ -o @@SRV_PXE_INF@@ -m state --state RELATED,ESTABLISHED -j ACCEPT +iptables -A FORWARD -i @@SRV_PXE_INF@@ -o @@SRV_BOND@@.@@SRV_VLAN@@ -j ACCEPT + +echo "Wiping the following existing Ceph OSD partitions:" +fdisk -l /dev/sd? | grep "Ceph OSD" +fdisk -l /dev/sd? | grep "Ceph OSD" | grep -oP "/dev/sd." | xargs -n 1 wipefs -a -f echo "Creating Ceph journal partition and filesystem" # create ceph journal partition and filesystem -- 2.16.6