diff --git a/docker/services/containers-common.yaml b/docker/services/containers-common.yaml index 57de51684f..caf3ba296a 100644 --- a/docker/services/containers-common.yaml +++ b/docker/services/containers-common.yaml @@ -83,6 +83,9 @@ outputs: exit 0 fi exit $rc + pyshim.sh: + mode: "0700" + content: { get_file: ../../docker_config_scripts/pyshim.sh } volumes_base: description: Base volume list diff --git a/docker/services/nova-compute.yaml b/docker/services/nova-compute.yaml index 71281c6456..0c69810af6 100644 --- a/docker/services/nova-compute.yaml +++ b/docker/services/nova-compute.yaml @@ -184,7 +184,10 @@ outputs: USER: {get_param: CephClientUserName} owner: nova:nova perm: '0600' - docker_config_scripts: {get_attr: [NovaComputeCommon, docker_config_scripts]} + docker_config_scripts: + map_merge: + - {get_attr: [ContainersCommon, docker_config_scripts]} + - {get_attr: [NovaComputeCommon, docker_config_scripts]} docker_config: step_3: nova_statedir_owner: @@ -195,7 +198,7 @@ outputs: volumes: - /var/lib/nova:/var/lib/nova:shared,z - /var/lib/docker-config-scripts/:/docker-config-scripts/ - command: "/docker-config-scripts/nova_statedir_ownership.py" + command: "/docker-config-scripts/pyshim.sh /docker-config-scripts/nova_statedir_ownership.py" step_4: nova_compute: image: *nova_compute_image diff --git a/docker/services/nova-ironic.yaml b/docker/services/nova-ironic.yaml index f4e85aad85..faff6486f9 100644 --- a/docker/services/nova-ironic.yaml +++ b/docker/services/nova-ironic.yaml @@ -101,7 +101,10 @@ outputs: - path: /var/log/nova owner: nova:nova recurse: true - docker_config_scripts: {get_attr: [NovaComputeCommon, docker_config_scripts]} + docker_config_scripts: + map_merge: + - {get_attr: [ContainersCommon, docker_config_scripts]} + - {get_attr: [NovaComputeCommon, docker_config_scripts]} docker_config: step_3: nova_statedir_owner: @@ -112,7 +115,7 @@ outputs: volumes: - /var/lib/nova:/var/lib/nova:shared,z - /var/lib/docker-config-scripts/:/docker-config-scripts/ - command: "/docker-config-scripts/nova_statedir_ownership.py" + command: "/docker-config-scripts/pyshim.sh /docker-config-scripts/nova_statedir_ownership.py" step_5: nova_compute: image: *nova_ironic_image diff --git a/docker_config_scripts/pyshim.sh b/docker_config_scripts/pyshim.sh new file mode 100644 index 0000000000..398218c94d --- /dev/null +++ b/docker_config_scripts/pyshim.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2018 Red Hat Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# Usage: pyshim.sh