From: Adam King Date: Wed, 28 Aug 2024 17:46:59 +0000 (-0400) Subject: mgr/orchestrator: allow passing group to apply/add nvmeof commands X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6bee4e10f7f9fcd00bd677a25b4dbf2db2005ff2;p=ceph.git mgr/orchestrator: allow passing group to apply/add nvmeof commands We no longer require the group when applying an nvmeof spec but we still want to allow the commands to take a group parameter (and this will at least make a group name required when creating a new service on the command line) Signed-off-by: Adam King (cherry picked from commit b377085c3020484c74a7a71357c35761b5e5de25) --- diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 6558ae2eb38f..07a7e9b775aa 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -1543,6 +1543,7 @@ Usage: @_cli_write_command('orch daemon add nvmeof') def _nvmeof_add(self, pool: str, + group: str, placement: Optional[str] = None, inbuf: Optional[str] = None) -> HandleCommandResult: """Start nvmeof daemon(s)""" @@ -1552,6 +1553,7 @@ Usage: spec = NvmeofServiceSpec( service_id='nvmeof', pool=pool, + group=group, placement=PlacementSpec.from_string(placement), ) return self._daemon_add_misc(spec) @@ -1815,6 +1817,7 @@ Usage: @_cli_write_command('orch apply nvmeof') def _apply_nvmeof(self, pool: str, + group: str, placement: Optional[str] = None, unmanaged: bool = False, dry_run: bool = False, @@ -1826,8 +1829,9 @@ Usage: raise OrchestratorValidationError('unrecognized command -i; -h or --help for usage') spec = NvmeofServiceSpec( - service_id=pool, + service_id=f'{pool}.{group}', pool=pool, + group=group, placement=PlacementSpec.from_string(placement), unmanaged=unmanaged, preview_only=dry_run