Project

General

Profile

Cleanup #43700

cephadm: make it a proper python package

Added by Sebastian Wagner 8 months ago. Updated 24 days ago.

Status:
New
Priority:
High
Category:
cephadm (binary)
Target version:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

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.

Screenshot_20200901_110000.png View (106 KB) Sebastian Wagner, 09/01/2020 09:01 AM


Related issues

Blocks Orchestrator - Feature #44925: Please give cephadm a --version option New

History

#1 Updated by Sebastian Wagner 8 months 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
This issue creates an issue with cephadm's "root" mode:
  • pip install only to be used on the bootstrap host
  • need to find a solution for transferring cephadm. zipped egg only? zip on demand?

#2 Updated by Sebastian Wagner 8 months ago

  • Assignee set to Daniel Pivonka

#3 Updated by Juan Miguel Olmo Martínez 8 months ago

Sebastian Wagner wrote:

Conclusions from https://pad.ceph.com/p/orchestration-weekly

  • pip install cephadm
  • only in addition to RPMs
  • as replacmeent for curl
This issue creates an issue with cephadm's "root" mode:
  • 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?

#4 Updated by Sebastian Wagner 8 months ago

  • Status changed from In Progress to New
  • Priority changed from Normal to High

#5 Updated by Sebastian Wagner 6 months ago

#6 Updated by Sebastian Wagner 6 months ago

  • Tracker changed from Bug to Support

#7 Updated by Sebastian Wagner 3 months ago

  • Tracker changed from Support to Cleanup
  • Assignee deleted (Daniel Pivonka)
  • Target version deleted (v15.0.0)

#8 Updated by Sebastian Wagner about 2 months 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`

#9 Updated by Sebastian Wagner 24 days ago

I've attached a possible roadmap for doing this

Also available in: Atom PDF