mgr/orchestrator: Add test orchestrator#25236
Conversation
|
retest this please |
a014376 to
67fc10d
Compare
|
@alfredodeza This PR now contains the changes needed to create the virtual environment as discussed in #25237 |
| devs = [] | ||
| for device in json.loads(out): | ||
| dev = orchestrator.InventoryDevice() | ||
| if 'partitions' not in device["sys_api"]: |
|
@alfredodeza ping? |
jtlayton
left a comment
There was a problem hiding this comment.
Looks reasonable to me. I like the idea of a test orchestrator for this and it may be nice for doing orchestrator/dashboard integration too.
tserong
left a comment
There was a problem hiding this comment.
Instead of setting up a virtualenv, is there some way ceph-volume could be installed to build/bin, along with the ceph cli tool and the other binaries? Because that'd be kinda neat :-)
| self.execute_cb = execute_cb | ||
| self.complete_cb = complete_cb | ||
|
|
||
| # Executed means I executed my k8s API call, it may or may |
|
|
||
| def deferred_read(f): | ||
| """ | ||
| Decorator to make RookOrchestrator methods return |
There was a problem hiding this comment.
s/RookOrchestrator/TestOrchestrator/
| devs = [] | ||
| for device in json.loads(out): | ||
| dev = orchestrator.InventoryDevice() | ||
| if 'partitions' not in device["sys_api"]: |
There was a problem hiding this comment.
#25390 is merged now, so I guess this can be removed?
src/pybind/mgr/orchestrator.py
Outdated
|
|
||
| :param node_filter: | ||
| :return: list of InventoryNode | ||
| :rtype: InventoryNode |
There was a problem hiding this comment.
Is this supposed to be part of this PR? Also the TestOrchestrator seems to return [InventoryNode]?
There was a problem hiding this comment.
removed form this PR. Thanks!
Actually, you don't need to install it at all. You can invoke c-v directly from the source folder. #25237 is the only thing missing here. |
I guess I meant: be able to invoke it from the build/bin directory, the same way you can invoke build/bin/ceph currently. Would ceph-mgr be able to find ceph-volume then, in that directory, without having to activate a virtualenv internally? |
67fc10d to
fe1f713
Compare
|
1. To be able to run the cli without an external orchestrator. 2. Run the CLI in Teuthology. Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Adds new add_custom_target `ceph-volume-venv-setup` that creates a virtual environment, and calls `python setup.py develop` Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
fe1f713 to
3164551
Compare
|
@liewegas . I just added the missing |
* refs/pull/25236/head: ceph-volume: Add venv to vstart cmake target mgr/orchestrator: Add test orchestrator Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Sebastian Wagner sebastian.wagner@suse.com
TODO