Fix pcmk remote podman bundle restarts

We blindly bind mount /etc/corosync/corosync.conf from the host to the
container as that is required by pcs when running on pacemaker nodes
when using pcs 0.9/pcmk 1.x.

When running on a pacemaker remote node, this will actually barf on it
because that file does not exist on a remote node:

        "stderr: error checking path \"/etc/corosync/corosync.conf\": stat /etc/corosync/corosync.conf: no such file or directory",

This is not an issue with docker because docker simply creates non
existing host bind mount points.
So we should not bind mount this when we run podman because podman and
HA only works on RHEL/CentOS 8 and it is not required there.

Tested this on an Stein deployment with RHEL8 as OS and I correctly
get a composable HA environment using pacemaker remote:
overcloud-database-0    (ocf::pacemaker:remote):        Started overcloud-controller-0
overcloud-database-1    (ocf::pacemaker:remote):        Started overcloud-controller-1
overcloud-database-2    (ocf::pacemaker:remote):        Started overcloud-controller-2
overcloud-messaging-0   (ocf::pacemaker:remote):        Started overcloud-controller-0
overcloud-messaging-1   (ocf::pacemaker:remote):        Started overcloud-controller-1
overcloud-messaging-2   (ocf::pacemaker:remote):        Started overcloud-controller-2
 podman container set: galera-bundle [192.168.24.1:8787/rhosp15/openstack-mariadb:pcmklatest]
   galera-bundle-0      (ocf:💓galera):        Master overcloud-database-0
   galera-bundle-1      (ocf:💓galera):        Master overcloud-database-1
   galera-bundle-2      (ocf:💓galera):        Master overcloud-database-2
 podman container set: redis-bundle [192.168.24.1:8787/rhosp15/openstack-redis:pcmklatest]
   redis-bundle-0       (ocf:💓redis): Master overcloud-controller-0
   redis-bundle-1       (ocf:💓redis): Slave overcloud-controller-1
   redis-bundle-2       (ocf:💓redis): Slave overcloud-controller-2
 podman container set: rabbitmq-bundle [192.168.24.1:8787/rhosp15/openstack-rabbitmq:pcmklatest]
   rabbitmq-bundle-0    (ocf:💓rabbitmq-cluster):      Started overcloud-messaging-0
   rabbitmq-bundle-1    (ocf:💓rabbitmq-cluster):      Started overcloud-messaging-1
   rabbitmq-bundle-2    (ocf:💓rabbitmq-cluster):      Started overcloud-messaging-2
ip-192.168.24.12        (ocf:💓IPaddr2):       Started overcloud-controller-0
ip-10.0.0.106   (ocf:💓IPaddr2):       Started overcloud-controller-1
ip-172.17.1.68  (ocf:💓IPaddr2):       Started overcloud-controller-2
ip-172.17.1.89  (ocf:💓IPaddr2):       Started overcloud-controller-0
ip-172.17.3.23  (ocf:💓IPaddr2):       Started overcloud-controller-1
ip-172.17.4.41  (ocf:💓IPaddr2):       Started overcloud-controller-2
 podman container set: haproxy-bundle [192.168.24.1:8787/rhosp15/openstack-haproxy:pcmklatest]
   haproxy-bundle-podman-0      (ocf:💓podman):        Started overcloud-controller-0
   haproxy-bundle-podman-1      (ocf:💓podman):        Started overcloud-controller-1
   haproxy-bundle-podman-2      (ocf:💓podman):        Started overcloud-controller-2
 podman container set: ovn-dbs-bundle [192.168.24.1:8787/rhosp15/openstack-ovn-northd:pcmklatest]
   ovn-dbs-bundle-0     (ocf::ovn:ovndb-servers):       Master overcloud-controller-0
   ovn-dbs-bundle-1     (ocf::ovn:ovndb-servers):       Slave overcloud-controller-1
   ovn-dbs-bundle-2     (ocf::ovn:ovndb-servers):       Slave overcloud-controller-2
stonith-fence_ipmilan-5254008aa119      (stonith:fence_ipmilan):        Started overcloud-controller-0
stonith-fence_ipmilan-5254003d74a4      (stonith:fence_ipmilan):        Started overcloud-controller-0
stonith-fence_ipmilan-525400092968      (stonith:fence_ipmilan):        Started overcloud-controller-1
stonith-fence_ipmilan-525400439c7e      (stonith:fence_ipmilan):        Started overcloud-controller-0
stonith-fence_ipmilan-5254002beafa      (stonith:fence_ipmilan):        Started overcloud-controller-2
stonith-fence_ipmilan-525400bbb6cb      (stonith:fence_ipmilan):        Started overcloud-controller-1
stonith-fence_ipmilan-5254001b9a8f      (stonith:fence_ipmilan):        Started overcloud-controller-2
stonith-fence_ipmilan-525400367613      (stonith:fence_ipmilan):        Started overcloud-controller-1
stonith-fence_ipmilan-525400150f28      (stonith:fence_ipmilan):        Started overcloud-controller-2
 podman container: openstack-cinder-volume [192.168.24.1:8787/rhosp15/openstack-cinder-volume:pcmklatest]
   openstack-cinder-volume-podman-0     (ocf:💓podman):        Started overcloud-controller-0

Closes-Bug: #1838279

Change-Id: I399098bf734aa3b2862e1713d4b1f429d180afbc
This commit is contained in:
Michele Baldessari 2019-07-29 17:02:03 +02:00
parent 577640a9c9
commit bdf742d05f
10 changed files with 94 additions and 26 deletions

View File

@ -77,6 +77,7 @@ parameters:
conditions:
puppet_debug_enabled: {get_param: ConfigDebug}
docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']}
resources:
@ -199,8 +200,11 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /var/lib/config-data/puppet-generated/cinder/:/var/lib/kolla/config_files/src:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
cinder_backup_init_bundle:
start_order: 1
detach: false
@ -221,7 +225,10 @@ outputs:
volumes:
list_concat:
- {get_attr: [ContainersCommon, container_puppet_apply_volumes]}
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
environment:
# NOTE: this should force this container to re-run on each
# update (scale-out, etc.)

View File

@ -65,6 +65,7 @@ parameters:
conditions:
puppet_debug_enabled: {get_param: ConfigDebug}
docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']}
resources:
@ -184,8 +185,11 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /var/lib/config-data/puppet-generated/cinder/:/var/lib/kolla/config_files/src:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
cinder_volume_init_bundle:
start_order: 1
detach: false
@ -206,7 +210,10 @@ outputs:
volumes:
list_concat:
- {get_attr: [ContainersCommon, container_puppet_apply_volumes]}
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
environment:
# NOTE: this should force this container to re-run on each
# update (scale-out, etc.)

View File

@ -97,6 +97,7 @@ resources:
conditions:
puppet_debug_enabled: {get_param: ConfigDebug}
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']}
outputs:
role_data:
@ -283,8 +284,11 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /var/lib/config-data/puppet-generated/mysql/:/var/lib/kolla/config_files/src:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
mysql_init_bundle:
start_order: 1
detach: false
@ -305,9 +309,12 @@ outputs:
volumes:
list_concat:
- {get_attr: [ContainersCommon, container_puppet_apply_volumes]}
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /var/lib/mysql:/var/lib/mysql:rw,z
- - /var/lib/mysql:/var/lib/mysql:rw,z
- /var/lib/config-data/puppet-generated/mysql/root:/root:rw
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
environment:
# NOTE: this should force this container to re-run on each
# update (scale-out, etc.)

View File

@ -69,6 +69,7 @@ conditions:
puppet_debug_enabled: {get_param: ConfigDebug}
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
redis_ipv6: {get_param: RedisIPv6}
docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']}
resources:
@ -231,8 +232,11 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /var/lib/config-data/puppet-generated/redis/:/var/lib/kolla/config_files/src:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
- redis_init_bundle:
start_order: 2
detach: false
@ -254,7 +258,10 @@ outputs:
volumes:
list_concat:
- {get_attr: [ContainersCommon, container_puppet_apply_volumes]}
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
environment:
# NOTE: this should force this container to re-run on each
# update (scale-out, etc.)

View File

@ -114,6 +114,7 @@ conditions:
- {get_param: PublicSSLCertificateAutogenerated}
- true
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']}
resources:
@ -250,8 +251,11 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /var/lib/config-data/puppet-generated/haproxy/:/var/lib/kolla/config_files/src:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
haproxy_init_bundle:
start_order: 3
detach: false
@ -274,8 +278,10 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, container_puppet_apply_volumes]}
- *deployed_cert_mount
-
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
environment:
# NOTE: this should force this container to re-run on each
# update (scale-out, etc.)

View File

@ -60,6 +60,7 @@ parameters:
conditions:
puppet_debug_enabled: {get_param: ConfigDebug}
docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']}
resources:
@ -165,8 +166,11 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /var/lib/config-data/puppet-generated/manila/:/var/lib/kolla/config_files/src:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
manila_share_init_bundle:
start_order: 1
detach: false
@ -187,7 +191,10 @@ outputs:
volumes:
list_concat:
- {get_attr: [ContainersCommon, container_puppet_apply_volumes]}
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
environment:
# NOTE: this should force this container to re-run on each
# update (scale-out, etc.)

View File

@ -68,6 +68,7 @@ parameters:
conditions:
puppet_debug_enabled: {get_param: ConfigDebug}
docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']}
resources:
@ -157,8 +158,10 @@ outputs:
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
ovn_dbs_init_bundle:
start_order: 1
detach: false
@ -180,7 +183,10 @@ outputs:
volumes:
list_concat:
- {get_attr: [ContainersCommon, container_puppet_apply_volumes]}
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
environment:
# NOTE: this should force this container to re-run on each
# update (scale-out, etc.)

View File

@ -64,6 +64,7 @@ parameters:
conditions:
puppet_debug_enabled: {get_param: ConfigDebug}
docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']}
resources:
@ -206,8 +207,11 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /var/lib/config-data/puppet-generated/rabbitmq/:/var/lib/kolla/config_files/src:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
rabbitmq_init_bundle:
start_order: 1
detach: false
@ -228,8 +232,11 @@ outputs:
volumes:
list_concat:
- {get_attr: [ContainersCommon, container_puppet_apply_volumes]}
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /bin/true:/bin/epmd
- - /bin/true:/bin/epmd
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
environment:
# https://launchpad.net/bugs/1822673 (lang/lc_all to utf-8 are an elixir requirement)
- 'LANG=en_US.UTF-8'

View File

@ -64,6 +64,7 @@ parameters:
conditions:
puppet_debug_enabled: {get_param: ConfigDebug}
docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']}
resources:
@ -206,8 +207,11 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /var/lib/config-data/puppet-generated/rabbitmq/:/var/lib/kolla/config_files/src:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
rabbitmq_init_bundle:
start_order: 1
detach: false
@ -228,8 +232,11 @@ outputs:
volumes:
list_concat:
- {get_attr: [ContainersCommon, container_puppet_apply_volumes]}
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /bin/true:/bin/epmd
- - /bin/true:/bin/epmd
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
environment:
# https://launchpad.net/bugs/1822673 (lang/lc_all to utf-8 are an elixir requirement)
- 'LANG=en_US.UTF-8'

View File

@ -64,6 +64,7 @@ parameters:
conditions:
puppet_debug_enabled: {get_param: ConfigDebug}
docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']}
resources:
@ -206,8 +207,11 @@ outputs:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /var/lib/config-data/puppet-generated/rabbitmq/:/var/lib/kolla/config_files/src:ro
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
rabbitmq_init_bundle:
start_order: 1
detach: false
@ -228,8 +232,11 @@ outputs:
volumes:
list_concat:
- {get_attr: [ContainersCommon, container_puppet_apply_volumes]}
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /bin/true:/bin/epmd
- - /bin/true:/bin/epmd
- if:
- docker_enabled
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- null
environment:
# https://launchpad.net/bugs/1822673 (lang/lc_all to utf-8 are an elixir requirement)
- 'LANG=en_US.UTF-8'