Merge "Avoid package upgrade collisions"

This commit is contained in:
Zuul 2018-07-23 17:30:51 +00:00 committed by Gerrit Code Review
commit 720b9d8138
3 changed files with 9 additions and 3 deletions

View File

@ -468,7 +468,9 @@ def cluster_with():
log('Host already clustered with %s.' % node)
cluster_rid = relation_id('cluster', local_unit())
is_clustered = relation_get(attribute='clustered', rid=cluster_rid)
is_clustered = relation_get(attribute='clustered',
rid=cluster_rid,
unit=local_unit())
log('am I clustered?: %s' % bool(is_clustered), level=DEBUG)
if not is_clustered:

View File

@ -752,6 +752,10 @@ def config_changed():
# result in an upgrade if applicable only if we change the 'source'
# config option
if rabbit.archive_upgrade_available():
# Avoid packge upgrade collissions
# Stopping and attempting to start rabbitmqs at the same time leads to
# failed restarts
rabbit.cluster_wait()
rabbit.install_or_upgrade_packages()
if config('ssl') == 'off':

View File

@ -577,8 +577,8 @@ class RmqBasicDeployment(OpenStackAmuletDeployment):
if ret:
amulet.raise_status(amulet.FAIL, msg=ret)
u.log.debug('Sleeping 70s for 1m cron job to run...')
time.sleep(70)
u.log.debug('Sleeping 2ms for 1m cron job to run...')
time.sleep(120)
# check_rabbitmq_queue monitor
u.log.debug('Checking nrpe check_rabbitmq_queue on units...')