Merge "Add CR patchs for octane"

This commit is contained in:
Jenkins 2016-07-04 12:55:45 +00:00 committed by Gerrit Code Review
commit c46385801f
3 changed files with 31 additions and 0 deletions

View File

@ -422,6 +422,7 @@ FUEL_SETTINGS_YAML = os.environ.get('FUEL_SETTINGS_YAML',
UPGRADE_FUEL_FROM = os.environ.get('UPGRADE_FUEL_FROM', '8.0')
UPGRADE_FUEL_TO = os.environ.get('UPGRADE_FUEL_TO', '9.0')
OCTANE_PATCHES = os.environ.get('OCTANE_PATCHES', None)
SNAPSHOT = os.environ.get('SNAPSHOT', '')
# For 5.1.1 we have 2 releases in tarball and should specify what we need

View File

@ -0,0 +1,4 @@
#!/bin/sh
set -e
cd /usr/lib/python*/site-packages/octane
echo -n $* | xargs -d" " -tI% sh -c 'curl -s "https://review.openstack.org/changes/%/detail?O=2002" | grep current_revision | cut -d: -f2 | sed "s/[, ]//g" | xargs -tI{} sh -c "curl -s https://review.openstack.org/changes/%/revisions/{}/patch?download | base64 -d | patch -p2"'

View File

@ -113,8 +113,34 @@ class DataDrivenUpgradeBase(TestBasic):
run_on_remote(self.admin_remote, cmd)
logger.info("Removing previously installed fuel-octane")
run_on_remote(self.admin_remote, "yum remove -y fuel-octane",
raise_on_assert=False)
logger.info("Installing fuel-octane")
run_on_remote(self.admin_remote, "yum install -y fuel-octane")
octane_log = ''.join(run_on_remote(
self.admin_remote,
"rpm -q --changelog fuel-octane"))
logger.info("Octane changes:")
logger.info(octane_log)
if settings.OCTANE_PATCHES:
logger.info("Patching octane with CR: {!r}".format(
settings.OCTANE_PATCHES))
# pylint: disable=no-member
self.admin_remote.upload(
os.path.join(
os.path.abspath(os.path.dirname(__file__)),
"octane_patcher.sh"),
"/tmp/octane_patcher.sh")
# pylint: enable=no-member
run_on_remote(
self.admin_remote,
"bash /tmp/octane_patcher.sh {}".format(
settings.OCTANE_PATCHES))
if settings.FUEL_PROPOSED_REPO_URL:
# pylint: disable=no-member
self.admin_remote.rm_rf(conf_file)