Last active
August 29, 2015 14:26
-
-
Save jistr/08d3d6ae82f1e99773d1 to your computer and use it in GitHub Desktop.
OSP-d CLI deployment parameter fixes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To undo the patches, run: | |
# yum reinstall python-rdomanager-oscplugin openstack-tripleo-heat-templates | |
set -euxo pipefail | |
if [ $(id -un) != 'root' ]; then | |
echo "This needs to be run as root." | |
exit 1 | |
fi | |
mkdir params-patch || true | |
cd params-patch | |
DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd ) | |
if [ ! -e oscplugin1.patch ]; then | |
curl -o oscplugin1.patch.base64 https://review.gerrithub.io/changes/241723/revisions/c33bc5d8b7f6765932a8555cd0ff862a52bcb526/patch?download | |
base64 -d oscplugin1.patch.base64 > oscplugin1.patch | |
rm oscplugin1.patch.base64 | |
fi | |
if [ ! -e oscplugin2.patch ]; then | |
curl -o oscplugin2.patch.base64 https://review.gerrithub.io/changes/241817/revisions/821d36a75bc5c976def9b20d850605ec7af443b9/patch?download | |
base64 -d oscplugin2.patch.base64 > oscplugin2.patch | |
rm oscplugin2.patch.base64 | |
fi | |
if [ ! -e tht1.patch ]; then | |
# OpenStack gerrit won't allow direct patch download it seems | |
git clone https://github.com/openstack/tripleo-heat-templates | |
pushd tripleo-heat-templates | |
git fetch https://review.openstack.org/openstack/tripleo-heat-templates refs/changes/34/207434/2 && git format-patch -1 --stdout FETCH_HEAD > ../tht1.patch | |
popd | |
fi | |
echo "Patches downloaded, inspect them if you wish, then press enter to continue" | |
read | |
pushd /usr/lib/python2.7/site-packages/rdomanager_oscplugin | |
patch -p2 < "$DIR/oscplugin1.patch" | |
patch -p2 < "$DIR/oscplugin2.patch" | |
popd | |
pushd /usr/share/openstack-tripleo-heat-templates | |
patch -p1 < "$DIR/tht1.patch" | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment