summaryrefslogtreecommitdiffstats
path: root/build/overcloud-opendaylight-sfc.sh
diff options
context:
space:
mode:
authorMichael Chapman <michapma@redhat.com>2016-03-24 01:09:02 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-03-24 01:09:03 +0000
commit81e8d7b55fbc27d8f25031817baf92d9b100f322 (patch)
tree819a8a94a6ef9db8d7cc2d8480d768d9daca274f /build/overcloud-opendaylight-sfc.sh
parenta896444c04552b866a9460bbe70ae3488e4877d9 (diff)
parent4b5e79294eecf7e10bfb1459c55f9186312c32bf (diff)
Merge topics 'compute_count_fix', 'build_rewrite'
* changes: Allow 2+ compute node for none HA installs APEX-117 updating vm creation for virt deployment
Diffstat (limited to 'build/overcloud-opendaylight-sfc.sh')
-rwxr-xr-xbuild/overcloud-opendaylight-sfc.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/build/overcloud-opendaylight-sfc.sh b/build/overcloud-opendaylight-sfc.sh
new file mode 100755
index 00000000..9b38ca29
--- /dev/null
+++ b/build/overcloud-opendaylight-sfc.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+##############################################################################
+# Copyright (c) 2015 Tim Rozet (Red Hat), Dan Radez (Red Hat) and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+set -e
+
+################################################
+##### Adding SFC+OpenDaylight overcloud #####
+################################################
+
+#copy opendaylight overcloud full to isolate odl-sfc
+cp -f images/overcloud-full-opendaylight.qcow2 images/overcloud-full-opendaylight-sfc_build.qcow2
+
+# work around for XFS grow bug
+# http://xfs.org/index.php/XFS_FAQ#Q:_Why_do_I_receive_No_space_left_on_device_after_xfs_growfs.3F
+cat > /tmp/xfs-grow-remount-fix.service << EOF
+[Unit]
+Description=XFS Grow Bug Remount
+After=network.target
+Before=getty@tty1.service
+
+[Service]
+Type=oneshot
+ExecStart=/bin/bash -c "echo 'XFS Grow Bug Remount Sleeping 180s' && sleep 180 && echo 'XFS Grow Bug Remounting Now' && mount -o remount,inode64 /"
+RemainAfterExit=no
+
+[Install]
+WantedBy=multi-user.target
+EOF
+
+
+# kernel is patched with patch from this post
+# http://xfs.org/index.php/XFS_FAQ#Q:_Why_do_I_receive_No_space_left_on_device_after_xfs_growfs.3F
+LIBGUESTFS_BACKEND=direct virt-customize \
+ --upload "/tmp/xfs-grow-remount-fix.service:/etc/systemd/system/xfs-grow-remount-fix.service" \
+ --run-command "chmod 664 /etc/systemd/system/xfs-grow-remount-fix.service" \
+ --run-command "systemctl enable xfs-grow-remount-fix.service" \
+ --install 'https://radez.fedorapeople.org/kernel-ml-3.13.7-1.el7.centos.x86_64.rpm' \
+ --run-command 'grub2-set-default "\$(grep -P \"submenu|^menuentry\" /boot/grub2/grub.cfg | cut -d \"\\x27\" | head -n 1)"' \
+ --install 'https://radez.fedorapeople.org/openvswitch-kmod-2.3.90-1.el7.centos.x86_64.rpm' \
+ --run-command 'yum downgrade -y https://radez.fedorapeople.org/openvswitch-2.3.90-1.x86_64.rpm' \
+ --run-command 'rm -f /lib/modules/3.13.7-1.el7.centos.x86_64/kernel/net/openvswitch/openvswitch.ko' \
+ --run-command 'ln -s /lib/modules/3.13.7-1.el7.centos.x86_64/kernel/extra/openvswitch/openvswitch.ko /lib/modules/3.13.7-1.el7.centos.x86_64/kernel/net/openvswitch/openvswitch.ko' \
+ -a images/overcloud-full-opendaylight-sfc_build.qcow2
+mv images/overcloud-full-opendaylight-sfc_build.qcow2 images/overcloud-full-opendaylight-sfc.qcow2