Merge "Disable ceph-mon resize operation for AIO-DX"

This commit is contained in:
Zuul 2021-07-29 23:35:59 +00:00 committed by Gerrit Code Review
commit 63798939c1
2 changed files with 12 additions and 1 deletions

View File

@ -308,7 +308,13 @@ class CephMonController(rest.RestController):
if rpc_cephmon.ceph_mon_gib != p['value']:
is_ceph_mon_gib_changed = True
if not is_ceph_mon_gib_changed:
# TODO This should be removed after resize operation is supported in AIO-DX systems
if is_ceph_mon_gib_changed and cutils.is_aio_duplex_system(pecan.request.dbapi):
raise exception.CephCommandUnsupported(
_("Resize of ceph monitor is not allowed in duplex system.")
)
elif not is_ceph_mon_gib_changed:
LOG.info("ceph_mon parameters are not changed")
raise wsme.exc.ClientSideError(
_("Warning: ceph_mon parameters are not changed."))

View File

@ -235,6 +235,11 @@ class CephPoolSetParamFailure(CephFailure):
"Reason: %(reason)s")
class CephCommandUnsupported(CephFailure):
# 503 means service unavailable which seems appropriate for commands that are unsupported
code = 503
class InvalidCPUInfo(Invalid):
message = _("Unacceptable CPU info") + ": %(reason)s"