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>
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()}")