From: Adam King Date: Mon, 24 Feb 2025 18:07:04 +0000 (-0500) Subject: mgr/cephadm: don't block matching group for identical nvmeof services X-Git-Tag: v20.0.0~2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e681d372b3c40a282ec146f0689570c612672919;p=ceph.git mgr/cephadm: don't block matching group for identical nvmeof services This was incorrectly handled as part of https://github.com/ceph/ceph/commit/85d2633310c3a66415358a9872732473ac34d345 which intended to block having multiple nvmeof services with the same group, but forgot to verify the spec being applied wasn't just an update on a prevoiously applied service Signed-off-by: Adam King --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 57574c02196e..a07fb0f93fe7 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -3416,7 +3416,7 @@ Then run the following: f"group name '{nvmeof_spec.group}' and service id '{nvmeof_spec.service_id}'") for sspec in [s.spec for s in self.spec_store.get_by_service_type('nvmeof')]: nspec = cast(NvmeofServiceSpec, sspec) - if nvmeof_spec.group == nspec.group: + if nvmeof_spec.group == nspec.group and nvmeof_spec.service_id != nspec.service_id: raise OrchestratorError(f"Cannot create nvmeof service with group {nvmeof_spec.group}. That group is already " f"being used by the service {nspec.service_name()}")