diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2019-02-21 18:06:42 +0100 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2019-05-10 16:33:21 +0000 |
commit | 4e64c8495d8cddab653e7b6f8db1d4335755d4c9 (patch) | |
tree | 369480cdb59583eb8709337d403dee6da384e94e /mcp/scripts/lib_jump_deploy.sh | |
parent | 6d37926e32dcd89ef999cedf9adcb13cbf717964 (diff) |
[maas] Fix permissions on (partial) redeployopnfv-8.0.0
When redeploying a cluster only (keeping the infrastructure containers
from a previous deploy), some things need to be adjusted:
- /entrypoint.sh exec permission;
- /etc/maas uid/gid re-align on new (fresh) deploy;
- account for different location of /usr/sbin/tcpdump apparmor profile
for CentOS jumpservers;
Change-Id: If51db0bc95eff1a497e1df5d457e26a7b902aa5a
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
(cherry picked from commit 60bf21d6aedda367c3e017cd74ea8cf602f1fdef)
Diffstat (limited to 'mcp/scripts/lib_jump_deploy.sh')
-rw-r--r-- | mcp/scripts/lib_jump_deploy.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mcp/scripts/lib_jump_deploy.sh b/mcp/scripts/lib_jump_deploy.sh index aad6ce586..a96becadd 100644 --- a/mcp/scripts/lib_jump_deploy.sh +++ b/mcp/scripts/lib_jump_deploy.sh @@ -441,10 +441,9 @@ function prepare_containers { mkdir -p "${image_dir}/"{salt/master.d,salt/minion.d} if grep -q -e 'maas' 'docker-compose/docker-compose.yaml'; then - chmod +x docker-compose/files/entrypoint*.sh # Apparmor workaround for bind9 inside Docker containers using AUFS for profile in 'usr.sbin.ntpd' 'usr.sbin.named' \ - 'usr.sbin.dhcpd' 'usr.bin.tcpdump'; do + 'usr.sbin.dhcpd' 'usr.sbin.tcpdump' 'usr.bin.tcpdump'; do if [ -e "/etc/apparmor.d/${profile}" ] && \ [ ! -e "/etc/apparmor.d/disable/${profile}" ]; then sudo ln -sf "/etc/apparmor.d/${profile}" "/etc/apparmor.d/disable/" @@ -458,6 +457,9 @@ function start_containers { local image_dir=$1 [ -n "${image_dir}" ] || exit 1 [ ! -e "${image_dir}/docker-compose" ] || COMPOSE_PREFIX="${image_dir}/" + if grep -q -e 'maas' 'docker-compose/docker-compose.yaml'; then + chmod +x docker-compose/files/entrypoint*.sh + fi "${COMPOSE_PREFIX}docker-compose" -f docker-compose/docker-compose.yaml up -d } |