Use ipc: host with containers that use pcs
We currently bind-mount /dev/shm inside the containers that need to run pcs commands (like in the temporary containers that need to create pcmk resources via puppet). The reason for this is the way CLI commands interact with the cluster: they need access to /dev/shm for them to work. With docker we used to simply bind mount /dev/shm from the host, but this does not work with podman because bind mounts under /dev seem to have no effect. The correct way to do this is to use '--ipc=host' which will do the right thing for both podman and docker. Tested on a docker backend by doing a fresh 3Ctrl + 2Cmp deploy and then a redeploy to verify that restart bundles are working. Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com> Change-Id: Id0e737af4cb82d56b0c2db3303a767bb671917ea
This commit is contained in:
@@ -173,6 +173,7 @@ outputs:
|
||||
config_volume: cinder
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
@@ -188,12 +189,12 @@ outputs:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /var/lib/config-data/puppet-generated/cinder/:/var/lib/kolla/config_files/src:ro
|
||||
cinder_backup_init_bundle:
|
||||
start_order: 1
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command: # '/docker_puppet_apply.sh "STEP" "TAGS" "CONFIG" "DEBUG"'
|
||||
list_concat:
|
||||
@@ -210,7 +211,6 @@ outputs:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, docker_puppet_apply_volumes]}
|
||||
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
environment:
|
||||
# NOTE: this should force this container to re-run on each
|
||||
# update (scale-out, etc.)
|
||||
|
||||
@@ -158,6 +158,7 @@ outputs:
|
||||
config_volume: cinder
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
@@ -173,12 +174,12 @@ outputs:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /var/lib/config-data/puppet-generated/cinder/:/var/lib/kolla/config_files/src:ro
|
||||
cinder_volume_init_bundle:
|
||||
start_order: 1
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command: # '/docker_puppet_apply.sh "STEP" "TAGS" "CONFIG" "DEBUG"'
|
||||
list_concat:
|
||||
@@ -195,7 +196,6 @@ outputs:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, docker_puppet_apply_volumes]}
|
||||
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
environment:
|
||||
# NOTE: this should force this container to re-run on each
|
||||
# update (scale-out, etc.)
|
||||
|
||||
@@ -233,6 +233,7 @@ outputs:
|
||||
config_volume: mysql
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
@@ -248,12 +249,12 @@ outputs:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /var/lib/config-data/puppet-generated/mysql/:/var/lib/kolla/config_files/src:ro
|
||||
mysql_init_bundle:
|
||||
start_order: 1
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command: # '/docker_puppet_apply.sh "STEP" "TAGS" "CONFIG" "DEBUG"'
|
||||
list_concat:
|
||||
@@ -270,7 +271,6 @@ outputs:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, docker_puppet_apply_volumes]}
|
||||
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /var/lib/mysql:/var/lib/mysql:rw,z
|
||||
environment:
|
||||
# NOTE: this should force this container to re-run on each
|
||||
|
||||
@@ -193,6 +193,7 @@ outputs:
|
||||
config_volume: redis
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
@@ -208,12 +209,12 @@ outputs:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /var/lib/config-data/puppet-generated/redis/:/var/lib/kolla/config_files/src:ro
|
||||
- redis_init_bundle:
|
||||
start_order: 2
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
config_volume: 'redis_init_bundle'
|
||||
command: # '/docker_puppet_apply.sh "STEP" "TAGS" "CONFIG" "DEBUG"'
|
||||
@@ -231,7 +232,6 @@ outputs:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, docker_puppet_apply_volumes]}
|
||||
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
environment:
|
||||
# NOTE: this should force this container to re-run on each
|
||||
# update (scale-out, etc.)
|
||||
|
||||
@@ -215,6 +215,7 @@ outputs:
|
||||
start_order: 2
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
config_volume: haproxy
|
||||
command:
|
||||
@@ -231,12 +232,12 @@ outputs:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /var/lib/config-data/puppet-generated/haproxy/:/var/lib/kolla/config_files/src:ro
|
||||
haproxy_init_bundle:
|
||||
start_order: 3
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
privileged: true
|
||||
command: # '/docker_puppet_apply.sh "STEP" "TAGS" "CONFIG" "DEBUG"'
|
||||
@@ -262,7 +263,6 @@ outputs:
|
||||
- /usr/libexec/iptables:/usr/libexec/iptables:ro
|
||||
- /usr/libexec/initscripts/legacy-actions:/usr/libexec/initscripts/legacy-actions:ro
|
||||
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
environment:
|
||||
# NOTE: this should force this container to re-run on each
|
||||
# update (scale-out, etc.)
|
||||
|
||||
@@ -140,6 +140,7 @@ outputs:
|
||||
config_volume: manila
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
@@ -155,12 +156,12 @@ outputs:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /var/lib/config-data/puppet-generated/manila/:/var/lib/kolla/config_files/src:ro
|
||||
manila_share_init_bundle:
|
||||
start_order: 1
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command: # '/docker_puppet_apply.sh "STEP" "TAGS" "CONFIG" "DEBUG"'
|
||||
list_concat:
|
||||
@@ -177,7 +178,6 @@ outputs:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, docker_puppet_apply_volumes]}
|
||||
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
environment:
|
||||
# NOTE: this should force this container to re-run on each
|
||||
# update (scale-out, etc.)
|
||||
|
||||
@@ -178,6 +178,7 @@ outputs:
|
||||
config_volume: rabbitmq
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
@@ -193,12 +194,12 @@ outputs:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /var/lib/config-data/puppet-generated/rabbitmq/:/var/lib/kolla/config_files/src:ro
|
||||
rabbitmq_init_bundle:
|
||||
start_order: 1
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command: # '/docker_puppet_apply.sh "STEP" "TAGS" "CONFIG" "DEBUG"'
|
||||
list_concat:
|
||||
@@ -215,7 +216,6 @@ outputs:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, docker_puppet_apply_volumes]}
|
||||
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /bin/true:/bin/epmd
|
||||
environment:
|
||||
# NOTE: this should force this container to re-run on each
|
||||
|
||||
@@ -125,6 +125,7 @@ outputs:
|
||||
config_volume: ovn_dbs
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
@@ -140,12 +141,12 @@ outputs:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /var/lib/config-data/puppet-generated/ovn_dbs/:/var/lib/kolla/config_files/src:ro
|
||||
ovn_dbs_init_bundle:
|
||||
start_order: 1
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
config_volume: 'ovn_dbs_init_bundle'
|
||||
command: # '/docker_puppet_apply.sh "STEP" "TAGS" "CONFIG" "DEBUG"'
|
||||
@@ -163,7 +164,6 @@ outputs:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, docker_puppet_apply_volumes]}
|
||||
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
environment:
|
||||
# NOTE: this should force this container to re-run on each
|
||||
# update (scale-out, etc.)
|
||||
|
||||
@@ -177,6 +177,7 @@ outputs:
|
||||
config_volume: rabbitmq
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
@@ -192,12 +193,12 @@ outputs:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /var/lib/config-data/puppet-generated/rabbitmq/:/var/lib/kolla/config_files/src:ro
|
||||
rabbitmq_init_bundle:
|
||||
start_order: 1
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command: # '/docker_puppet_apply.sh "STEP" "TAGS" "CONFIG" "DEBUG"'
|
||||
list_concat:
|
||||
@@ -214,7 +215,6 @@ outputs:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, docker_puppet_apply_volumes]}
|
||||
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /bin/true:/bin/epmd
|
||||
environment:
|
||||
# NOTE: this should force this container to re-run on each
|
||||
|
||||
@@ -178,6 +178,7 @@ outputs:
|
||||
config_volume: rabbitmq
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
@@ -193,12 +194,12 @@ outputs:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /var/lib/config-data/puppet-generated/rabbitmq/:/var/lib/kolla/config_files/src:ro
|
||||
rabbitmq_init_bundle:
|
||||
start_order: 1
|
||||
detach: false
|
||||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
command: # '/docker_puppet_apply.sh "STEP" "TAGS" "CONFIG" "DEBUG"'
|
||||
list_concat:
|
||||
@@ -215,7 +216,6 @@ outputs:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, docker_puppet_apply_volumes]}
|
||||
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /dev/shm:/dev/shm:rw
|
||||
- /bin/true:/bin/epmd
|
||||
environment:
|
||||
# NOTE: this should force this container to re-run on each
|
||||
|
||||
Reference in New Issue
Block a user