Comment 2 for bug 2062405

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceph-radosgw (master)

Reviewed: https://review.opendev.org/c/openstack/charm-ceph-radosgw/+/916331
Committed: https://opendev.org/openstack/charm-ceph-radosgw/commit/1cac43fadcc6623c7805c715f665346f48fbd521
Submitter: "Zuul (22348)"
Branch: master

commit 1cac43fadcc6623c7805c715f665346f48fbd521
Author: Ionut Balutoiu <email address hidden>
Date: Thu Oct 19 13:40:26 2023 +0300

    Fix scale-out in the multi-site replication scenario

    If the multi-site relation is established, the `ceph-radosgw` application
    cannot be scaled out.

    This is happening because the multi-site functions are part of
    `check_optional_config_and_relations`, which is called by `assess_status`
    after every successful hook in the main hook entrypoint:
    ```
    if __name__ == '__main__':
        try:
            hooks.execute(sys.argv)
        except UnregisteredHookError as e:
            log('Unknown hook {} - skipping.'.format(e))
        except ValueError as e:
            # Handle any invalid configuration values
            status_set(WORKLOAD_STATES.BLOCKED, str(e))
        else:
            assess_status(CONFIGS)
    ```

    The multi-site functions (for example: `is_multisite_configured` or
    `check_cluster_has_buckets`) will fail since the unit is not be ready
    for service.

    This change ensures that the unit is ready for service before calling
    any multi-site functions.

    Closes-Bug: #2062405
    Change-Id: I63c21a0b545bb456df9b09d8c16cc43cd7eec2f3
    Signed-off-by: Ionut Balutoiu <email address hidden>