summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-12-10 14:20:44 -0500
committerTim Rozet <trozet@redhat.com>2018-12-10 14:53:35 -0500
commit21ac6e686defbb97c73ec03aa8fd3d65c8f63767 (patch)
tree5ea819d126ec2ef588a1844d66628ba9834148d4
parent387dab2bf2eb60ec6861ea398b5c8bfb4dad52d7 (diff)
Fix broken Gambia repos
The undercloud disk image repos look to be stale. This patch updates the repos at deploy time to ensure the latest repos are always used. Similar to what was done in: https://gerrit.opnfv.org/gerrit/#/c/64493/ JIRA: APEX-656 Change-Id: I4eb2d0a8486b47a583434a9b83e1cc9d7274d9ad Signed-off-by: Tim Rozet <trozet@redhat.com>
-rw-r--r--apex/builders/undercloud_builder.py14
-rw-r--r--apex/common/constants.py1
-rw-r--r--apex/deploy.py3
3 files changed, 18 insertions, 0 deletions
diff --git a/apex/builders/undercloud_builder.py b/apex/builders/undercloud_builder.py
index 4efd00d5..9c61b87c 100644
--- a/apex/builders/undercloud_builder.py
+++ b/apex/builders/undercloud_builder.py
@@ -59,3 +59,17 @@ def inject_calipso_installer(tmp_dir, image):
# TODO(trozet): add unit testing for calipso injector
# TODO(trozet): add rest of build for undercloud here as well
+
+
+def update_repos(image, branch):
+ virt_ops = [
+ {con.VIRT_RUN_CMD: "rm -f /etc/yum.repos.d/delorean*"},
+ {con.VIRT_RUN_CMD: "yum-config-manager --add-repo "
+ "https://trunk.rdoproject.org/centos7/{}"
+ "/delorean.repo".format(con.RDO_TAG)},
+ {con.VIRT_RUN_CMD: "yum clean all"},
+ {con.VIRT_INSTALL: "python2-tripleo-repos"},
+ {con.VIRT_RUN_CMD: "tripleo-repos -b {} {} ceph".format(branch,
+ con.RDO_TAG)}
+ ]
+ virt_utils.virt_customize(virt_ops, image)
diff --git a/apex/common/constants.py b/apex/common/constants.py
index 02fafbd0..1a94f16b 100644
--- a/apex/common/constants.py
+++ b/apex/common/constants.py
@@ -53,6 +53,7 @@ PUPPET_ODL_URL = 'https://git.opendaylight.org/gerrit/integration/packaging' \
DEBUG_OVERCLOUD_PW = 'opnfvapex'
NET_ENV_FILE = 'network-environment.yaml'
DEPLOY_TIMEOUT = 120
+RDO_TAG = 'current-tripleo'
UPSTREAM_RDO = 'https://images.rdoproject.org/{}/delorean/current' \
'-tripleo-rdo/'.format(DEFAULT_OS_VERSION)
OPENSTACK_GERRIT = 'https://review.openstack.org'
diff --git a/apex/deploy.py b/apex/deploy.py
index 64374a9a..fa468457 100644
--- a/apex/deploy.py
+++ b/apex/deploy.py
@@ -392,6 +392,9 @@ def main():
uc_fetch_img = os.path.join(args.image_dir, 'undercloud.qcow2')
shutil.copyfile(uc_fetch_img, uc_image)
# prep undercloud with required packages
+ if platform.machine() != 'aarch64':
+ uc_builder.update_repos(image=uc_image,
+ branch=branch.replace('stable/', ''))
uc_builder.add_upstream_packages(uc_image)
uc_builder.inject_calipso_installer(APEX_TEMP_DIR, uc_image)
# upgrade OVS in undercloud