Skip to content

Commit

Permalink
Retry keystone_wait_for_propagation() on exception (#175)
Browse files Browse the repository at this point in the history
At the CI jobs keystone_wait_for_propagation() fails when the
api_version attribute hasn't been propagated yet in the identity-service
relations. This patch will retry automatically giving time to keystone
when the system where this is running is not fast enough.

Fixes LP: #1668954
  • Loading branch information
freyes authored and dosaboy committed May 10, 2018
1 parent 6fc3ebc commit edd813b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charmhelpers/contrib/openstack/amulet/utils.py
Expand Up @@ -40,6 +40,7 @@
import pika
import swiftclient

from charmhelpers.core.decorators import retry_on_exception
from charmhelpers.contrib.amulet.utils import (
AmuletUtils
)
Expand Down Expand Up @@ -423,6 +424,7 @@ def tenant_exists(self, keystone, tenant):
self.log.debug('Checking if tenant exists ({})...'.format(tenant))
return tenant in [t.name for t in keystone.tenants.list()]

@retry_on_exception(num_retries=5, base_delay=1)
def keystone_wait_for_propagation(self, sentry_relation_pairs,
api_version):
"""Iterate over list of sentry and relation tuples and verify that
Expand Down

0 comments on commit edd813b

Please sign in to comment.