Wait for rabbitmq_ready tag

We need to wait for rabbitmq_ready exec so that rabbit is fully
up. This can only happen if we add the tag for it.
Also we need to make sure that launching the epmd process cannot
happen. The reason for this is the following:
When the puppet-rabbitmq module gets invoked (a simple facter run
will be sufficient) inside the rabbitmq_init_bundle container it spawns
an epmd process.
Now if we wait for the Exec[rabbitmq-ready], it means that this epmd
process is staying around until rabbit is up, but then will disappear
suddenly when the rabbitmq_init_bundle container exits, which will
subsequently confuse the rabbitmq cluster and make it fail.

Partial-Bug: #1739026

Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>
Co-Authored-By: John Eckersberg <jeckersb@redhat.com>

Change-Id: Ie74a13a6c8181948900ea0de8ee9717f76f3ce79
This commit is contained in:
Michele Baldessari 2017-12-12 14:56:33 +01:00
parent efc96a7b05
commit bab6ec2532
1 changed files with 2 additions and 1 deletions

View File

@ -189,7 +189,7 @@ outputs:
- - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 2}' > /etc/puppet/hieradata/docker.json"
- "FACTER_uuid=docker puppet apply --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
params:
TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation,rabbitmq_policy,rabbitmq_user'
TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation,rabbitmq_policy,rabbitmq_user,rabbitmq_ready'
CONFIG: 'include ::tripleo::profile::base::pacemaker;include ::tripleo::profile::pacemaker::rabbitmq_bundle'
image: {get_param: DockerRabbitmqImage}
volumes:
@ -199,6 +199,7 @@ outputs:
- /usr/share/openstack-puppet/modules:/usr/share/openstack-puppet/modules:ro
- /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- /dev/shm:/dev/shm:rw
- /bin/true:/bin/epmd
host_prep_tasks:
- name: create /var/lib/rabbitmq
file: