diff --git a/library/ceph_key.py b/library/ceph_key.py index 03785e316..1db473b0c 100644 --- a/library/ceph_key.py +++ b/library/ceph_key.py @@ -185,6 +185,18 @@ CEPH_INITIAL_KEYS = ['client.admin', 'client.bootstrap-mds', 'client.bootstrap-m 'client.bootstrap-osd', 'client.bootstrap-rbd', 'client.bootstrap-rbd-mirror', 'client.bootstrap-rgw'] # noqa E501 +def str_to_bool(val): + try: + val = val.lower() + except AttributeError: + val = str(val).lower() + if val == 'true': + return True + elif val == 'false': + return False + else: + raise ValueError("Invalid input value: %s" % val) + def fatal(message, module): ''' Report a fatal error and exit @@ -478,7 +490,7 @@ def lookup_ceph_initial_entities(module, out): else: fatal("'auth_dump' key not present in json output:", module) # noqa E501 - if len(entities) != len(CEPH_INITIAL_KEYS): + if len(entities) != len(CEPH_INITIAL_KEYS) and not str_to_bool(os.environ.get('CEPH_ROLLING_UPDATE', False)): # must be missing in auth_dump, as if it were in CEPH_INITIAL_KEYS # it'd be in entities from the above test. Report what's missing. missing = [] diff --git a/roles/ceph-mon/tasks/ceph_keys.yml b/roles/ceph-mon/tasks/ceph_keys.yml index ab2c699f1..141e4055b 100644 --- a/roles/ceph-mon/tasks/ceph_keys.yml +++ b/roles/ceph-mon/tasks/ceph_keys.yml @@ -26,6 +26,7 @@ environment: CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else None }}" CEPH_CONTAINER_BINARY: "{{ container_binary }}" + CEPH_ROLLING_UPDATE: "{{ rolling_update }}" when: - cephx