From: davidplunkett Date: Thu, 7 Mar 2019 19:49:09 +0000 (+0000) Subject: replace bond0 references and wipe Ceph OSD fs X-Git-Tag: 1.0.0~26 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F55%2F455%2F1;p=redfish.git replace bond0 references and wipe Ceph OSD fs Change-Id: I61f27b02dbad782a137d5c79a37feef4be388ea2 Signed-off-by: davidplunkett --- 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