]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: don't block matching group for identical nvmeof services 61983/head
authorAdam King <adking@redhat.com>
Mon, 24 Feb 2025 18:07:04 +0000 (13:07 -0500)
committerAdam King <adking@redhat.com>
Mon, 24 Feb 2025 18:07:04 +0000 (13:07 -0500)
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 <adking@redhat.com>
src/pybind/mgr/cephadm/module.py

index 57574c02196e1ee0f4432fb0c2023a57f0617d40..a07fb0f93fe7c2cdabe31fb7baf7578688f9bf92 100644 (file)
@@ -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()}")