Cleanup #43700
opencephadm: make it a proper python package
100%
Description
Having everything in a single file in the source tree has some disadvantages:
- we cannot reference things from the rest of the Ceph tree
python tool support is more awkward - We don't have the possibility to structure the code properly (whatever that means)
- no one in the community can install c-d via pip
- nothing can have c-d as a python dependency
- we're breaking IDE support
That would be resolvable by making c-d a proper python package and then create a zip that can then be curled from somewhere else and then directly executed.
Files
Updated by Sebastian Wagner over 4 years ago
- Target version set to v15.0.0
Conclusions from https://pad.ceph.com/p/orchestration-weekly
pip install cephadm
- only in addition to RPMs
- as replacmeent for curl
- pip install only to be used on the bootstrap host
- need to find a solution for transferring cephadm. zipped egg only? zip on demand?
Updated by Juan Miguel Olmo Martínez over 4 years ago
Sebastian Wagner wrote:
Conclusions from https://pad.ceph.com/p/orchestration-weekly
This issue creates an issue with cephadm's "root" mode:
pip install cephadm
- only in addition to RPMs
- as replacmeent for curl
- pip install only to be used on the bootstrap host
- need to find a solution for transferring cephadm. zipped egg only? zip on demand?
What about to use scp?
Updated by Sebastian Wagner about 4 years ago
- Status changed from In Progress to New
- Priority changed from Normal to High
Updated by Sebastian Wagner about 4 years ago
- Blocks Feature #44925: Please give cephadm a --version option added
Updated by Sebastian Wagner about 4 years ago
- Tracker changed from Bug to Support
Updated by Sebastian Wagner almost 4 years ago
- Tracker changed from Support to Cleanup
- Assignee deleted (
Daniel Pivonka) - Target version deleted (
v15.0.0)
Updated by Sebastian Wagner over 3 years ago
- Assignee set to Juan Miguel Olmo Martínez
Some background infos:
I've tried to improve things in https://github.com/ceph/ceph/pull/32526 half a year ago, but it turned out to be bigger than anticipated.
As it turned out back then, we need to improve two issues first, before we can take bigger steps.
1. `injected_argv` is a big pain point when it comes to refactoring cephadm. Right now, this prevents us from doing anything else
except physically distributing cephadm with some odd hardcoded prefix. In order to have cephadm a proper software, we have to fix this first.
2. People are downloading cephadm directly from github: https://docs.ceph.com/docs/master/cephadm/install/#install-cephadm . This prevents
us from having the source code being something different than the binary. Also, this means have to solve this, till we can add a `--version`
flag to cephadm. Which means, we have to first put cephadm to download.ceph.io or something similar.
Daniel was at that point as well already: https://github.com/ceph/ceph/pull/32662#issuecomment-575047407
In order to make this a success this time, I would advise (This is just an advice!) to split this endeavor into multiple parts (aka PRs):
1. Remove `injected_argv` and instead copy cephadm like so:
hash = sha256('/usr/bin/cephadm') (or any other unique property ssh remote_host "mkdir -p /tmp/cephadm-$hash" scp ... /usr/bin/cephadm ... /tmp/cephadm-$hash/cephadm
2. Release cephadm on download.ceph.com or something. Keep in mind, folks will install cephadm on air-gapped systems!
3. Make cephadm a proper python package (setup.py etc)
4. add a `cephadm --version`
Updated by Sebastian Wagner over 3 years ago
I've attached a possible roadmap for doing this
Updated by Sebastian Wagner almost 3 years ago
- Status changed from New to In Progress
Updated by Sebastian Wagner almost 3 years ago
- Status changed from In Progress to Fix Under Review
- Assignee changed from Juan Miguel Olmo Martínez to Patrick Seidensal
Updated by Redouane Kachach Elhichou about 2 years ago
- Pull request ID changed from 32662 to 41855
Updated by Redouane Kachach Elhichou about 2 years ago
A new effort is ongoing at this moment to address this issue: https://github.com/ceph/ceph/pull/41855
Updated by Redouane Kachach Elhichou about 2 years ago
- Status changed from Fix Under Review to In Progress