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.
Reviewed: https:/ /review. opendev. org/c/openstack /charm- ceph-radosgw/ +/916331 /opendev. org/openstack/ charm-ceph- radosgw/ commit/ 1cac43fadcc6623 c7805c715f66534 6f48fbd521
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 1cac43fadcc6623 c7805c715f66534 6f48fbd521
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 optional_ config_ and_relations` , which is called by `assess_status`
hooks. execute( sys.argv) kError as e:
log( 'Unknown hook {} - skipping. '.format( e))
status_ set(WORKLOAD_ STATES. BLOCKED, str(e))
assess_ status( CONFIGS)
`check_
after every successful hook in the main hook entrypoint:
```
if __name__ == '__main__':
try:
except UnregisteredHoo
except ValueError as e:
# Handle any invalid configuration values
else:
```
The multi-site functions (for example: `is_multisite_ configured` or cluster_ has_buckets` ) will fail since the unit is not be ready
`check_
for service.
This change ensures that the unit is ready for service before calling
any multi-site functions.
Closes-Bug: #2062405 56df9b09d8c16cc 43cd7eec2f3
Change-Id: I63c21a0b545bb4
Signed-off-by: Ionut Balutoiu <email address hidden>