Project

General

Profile

Actions

Cleanup #43700

open

cephadm: make it a proper python package

Added by Sebastian Wagner about 4 years ago. Updated over 1 year ago.

Status:
In Progress
Priority:
Normal
Category:
cephadm (binary)
Target version:
-
% Done:

100%

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.


Files

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

Subtasks 1 (0 open1 closed)

Cleanup #50168: cephadm: move bin/cephadm from the git tree to download.ceph.comResolvedMichael Fritch

Actions

Related issues 1 (1 open0 closed)

Blocks Orchestrator - Feature #44925: Please give cephadm a --version optionIn ProgressJohn Mulligan

Actions
Actions #1

Updated by Sebastian Wagner about 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
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?
Actions #2

Updated by Sebastian Wagner about 4 years ago

  • Assignee set to Daniel Pivonka
Actions #3

Updated by Juan Miguel Olmo Martínez about 4 years 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?

Actions #4

Updated by Sebastian Wagner about 4 years ago

  • Status changed from In Progress to New
  • Priority changed from Normal to High
Actions #5

Updated by Sebastian Wagner about 4 years ago

Actions #6

Updated by Sebastian Wagner about 4 years ago

  • Tracker changed from Bug to Support
Actions #7

Updated by Sebastian Wagner almost 4 years ago

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

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`

Actions #9

Updated by Sebastian Wagner over 3 years ago

I've attached a possible roadmap for doing this

Actions #10

Updated by Sebastian Wagner almost 3 years ago

  • Status changed from New to In Progress
Actions #11

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
Actions #12

Updated by Redouane Kachach Elhichou almost 2 years ago

  • Pull request ID changed from 32662 to 41855
Actions #13

Updated by Redouane Kachach Elhichou almost 2 years ago

A new effort is ongoing at this moment to address this issue: https://github.com/ceph/ceph/pull/41855

Actions #14

Updated by Redouane Kachach Elhichou almost 2 years ago

  • Status changed from Fix Under Review to In Progress
Actions

Also available in: Atom PDF