Project

General

Profile

Bug #38279

ceph-volume should be able to work without ceph.conf

Added by Sébastien Han about 5 years ago. Updated over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

As we move toward removing the ceph.conf on several orchestrators, ceph-volume needs to able to read various information either from CLI or env vars.
ceph-volume currently supports --cluster-fsid but additionally, we need:

  • --mon-host
  • --mon-initial-members
  • --bootstrap-keyring (path to bootstrap keyring)

AFAIK ceph-volume needs to access the monitor so it can create the OSD ID and OSD keyring.

History

#1 Updated by Sébastien Han about 5 years ago

[19:03:16] alfredodeza: leseb: where would ceph-volume use the value for --mon-host? 
[19:03:33] leseb: alfredodeza for the 'lvm prepare' call
[19:03:50] alfredodeza: but, where in the prepare call
[19:04:06] leseb: alfredodeza when creating the osd id?
[19:04:12] leseb: and the osd key?
[19:04:44] leseb: basically any call that communicates with the monitors
[19:05:24] alfredodeza: so you are looking forward for a pass-through CLI onto ceph
[19:05:48] leseb: alfredodeza correct

#2 Updated by Jan Fajerski about 5 years ago

I had a quick look at things. Seems like adding cli flags shouldn't be too hard.

Adding support for passing the three flags via ENV is not a problem either, though afaiu with the cepg binary all config options can be passed via ENV? Might be good if c-v could do that too.

One thing I'm uncertain about: c-v lvm activate seems to reload the ceph.conf based on an lvm tag (if present) but only on the filestore case (not for bluestore).
I'm not sure if that is currently used or what the use case is. Passing a cli flag down to this is less straight forward.

#3 Updated by Sébastien Han about 5 years ago

Yes, ceph-* binaries support all the options as CLI arguments.
What do you mean by 'reload' the ceph.conf? IMHO c-v should do anything to the ceph.conf

Thanks for looking into this Jan.

#4 Updated by Jan Fajerski about 5 years ago

Sébastien Han wrote:

Yes, ceph-* binaries support all the options as CLI arguments.
What do you mean by 'reload' the ceph.conf? IMHO c-v should do anything to the ceph.conf

Look at https://github.com/ceph/ceph/blob/master/src/ceph-volume/ceph_volume/devices/lvm/activate.py#L27

Again, not sure yet what purpose this serves and if we can ignore this for now.

Thanks for looking into this Jan.

No worries, I have some code already to deal with the configuration. Need to find all place where the ceph binary is called and do the right thing next.

#5 Updated by Rishabh Dave over 4 years ago

  • Assignee set to Rishabh Dave

#6 Updated by Jan Fajerski over 4 years ago

@Rishabh Most of the work is already done here https://github.com/ceph/ceph/pull/26676. There was a request for a --name attribute though I'm actually not sure the ceph daemons support that. We could go ahead and merge #26676 and you take it from there. THough I understand if you'd rather pick something else to work on.

#7 Updated by Rishabh Dave over 4 years ago

  • Pull request ID set to 26676

Oops, I've been working on this for few hours.

I'll look for something else. @Jan Setting "Assignee" to you.

#8 Updated by Rishabh Dave over 4 years ago

  • Assignee changed from Rishabh Dave to Jan Fajerski

Also available in: Atom PDF