From 4751d328b171a71c4cde8e49bc53b8804b113349 Mon Sep 17 00:00:00 2001 From: Feilong Wang Date: Fri, 20 Jul 2018 15:54:31 +1200 Subject: [PATCH] Fix the heat-container-agent docker image There are 2 fixes included in this patch: 1. A regression issue introduced by the multi region patch, see https://review.openstack.org/#/c/579043 for more details. There is a missing bracket. 2. Issues in the Dockerfile of heat-container-agent. Some depedencies are renamed or we don't really need them. And because of the multi region bug, we need a new version for os-collect-config. So switching to pip from dnf is much eaiser than building a new RPM package for those python libs we care about. To be more clear, for the multi region issue, we need os-collect-config 9.1.0, and with dnf you can only find 5.0.0. Task: 23099 Story: 2002768 Change-Id: I015af15dccd5fe622137c1f5fe042d3d29cc9a47 --- .../image/heat-container-agent/Dockerfile | 26 +++++++++++++------ .../scripts/heat-config-notify | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/magnum/drivers/common/image/heat-container-agent/Dockerfile b/magnum/drivers/common/image/heat-container-agent/Dockerfile index 6b80f3e517..1981d9e1af 100644 --- a/magnum/drivers/common/image/heat-container-agent/Dockerfile +++ b/magnum/drivers/common/image/heat-container-agent/Dockerfile @@ -12,14 +12,24 @@ LABEL name="heat-container-agent" \ distribution-scope="public" RUN dnf -y --setopt=tsflags=nodocs install \ - findutils os-collect-config os-apply-config \ - os-refresh-config dib-utils python-pip python-docker-py \ - python-yaml python-zaqarclient python2-oslo-log \ - python-psutil kubernetes-client && dnf clean all - -# pip installing dpath as python-dpath is an older version of dpath -# install docker-compose -RUN pip install --no-cache dpath docker-compose + bash \ + findutils \ + gcc \ + kubernetes-client \ + python-devel \ + python-pip \ + python-psutil \ + redhat-rpm-config && \ + pip install --no-cache --no-cache-dir \ + dib-utils \ + dpath \ + os-apply-config \ + os-collect-config \ + os-refresh-config \ + python-heatclient \ + python-keystoneclient && \ + dnf remove -y gcc redhat-rpm-config -y && \ + dnf clean all ADD ./scripts/55-heat-config \ /opt/heat-container-agent/scripts/ diff --git a/magnum/drivers/common/image/heat-container-agent/scripts/heat-config-notify b/magnum/drivers/common/image/heat-container-agent/scripts/heat-config-notify index f479519bc4..f26a6ced22 100755 --- a/magnum/drivers/common/image/heat-container-agent/scripts/heat-config-notify +++ b/magnum/drivers/common/image/heat-container-agent/scripts/heat-config-notify @@ -124,7 +124,7 @@ def main(argv=sys.argv, stdin=sys.stdin): project_id=iv['deploy_project_id']) endpoint = ks.service_catalog.url_for( service_type='messaging', endpoint_type='publicURL', - region_name=iv.get('deploy_region_name') + region_name=iv.get('deploy_region_name')) conf = { 'auth_opts': {