[RFC] ceph-volume: Make c-v invocable without installing it#25237
[RFC] ceph-volume: Make c-v invocable without installing it#25237sebastian-philipp wants to merge 1 commit intoceph:masterfrom
Conversation
With this change, you can execute c-v like so: ``` $ cd /src/ceph-volume $ python3 -m ceph_volume inventory --format json ``` Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
|
I typically start a virtualenv (optional) and run |
|
retest this please |
|
The recommended way is to use virtualenv, I wouldn't trust anything else (other than actual system packaging) to try and run ceph-volume - or any other Python project. In both the unit and functional tests, virtual environments (virtualenv) is used throughout, and I don't see why the orchestrator tests couldn't do something similar. Running |
Also, running Please, also have a look at https://chriswarrick.com/blog/2014/09/15/python-apps-the-right-way-entry_points-and-scripts/ or https://github.com/jgehrcke/python-cmdline-bootstrap regarding the use of
See above.
If 'make` is not creating a virtualenv, I don't know, how I could create an environment reliably. |
|
It is tremendously unfortunate that we need to start supporting new ways of invoking ceph-volume because vstart.sh doesn't support virtualenv. The linked site describes using entry_points (we are doing this recently in ceph-volume) as well as being able to do
There is no need for other tools like I am -1 on allowing this changeset, would prefer to see tests isolate ceph-volume in a virtualenv, either manually or via |
edit, i was just repeating Alfredo's comment... |
Yes, exactly what I think should happen |
I dislike the idea of creating and installing the venv from within the mgr module, as it would mix runtime and compiletime. Thus, this will end up as being a cmake script in |
|
I'm still preferring this solution, but for now, this is replaced by #25236 |
With this change, you can execute c-v like so:
My use case is #25236: It would be nice to run
c-v inventoryin a pure vstart environment. Sorry for my ignorance: Is there a better way to do this?See also: #24775
Signed-off-by: Sebastian Wagner sebastian.wagner@suse.com