Project

General

Profile

Actions

Bug #23970

closed

Cannot configure dashboard host/port before ceph is started

Added by Niklas Hambuechen almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
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

Related to #23968 and #23969:

It seems that the host of the ceph dashboard is configured via ceph's built-in key-value store `ceph config-key`, like:

ceph config-key set mgr/dashboard/server_addr '127.0.0.1'

I do not wish my ceph dashboard to be open on the internet, so I set the host as above.

But it seems I cannot declaratively set this config opion; as opposed to most other ceph configuration options which I can set declaratively in `ceph.conf`, for some reason unknown to me, the above option can only be configure using the key-value store (and changing that value requires me to run that command and then restart ceph-mgr.

I would like to set that option even before ceph starts for the first time, so that at no point in time my dashboard is exposed to the Internet.

How can set ceph config-key values already ahead of ceph starting?
Is there a configuration file into which I can write values with which the key-value store will be initialised?

Also, it would be nice if somebody could explain the design concepts for the choice of whether a given configuration option is to be set in a file like ceph.conf, or in in ceph's key-value store; to me as a user it seems quite arbitrary and surprising to find this option inconfigurable in ceph.conf.

Thanks!

Actions #1

Updated by Nathan Cutler almost 6 years ago

  • Project changed from Ceph to mgr
Actions #2

Updated by John Spray almost 6 years ago

Firstly: I'm a bit worried that you're running ceph-mgr on a host that is open to the internet -- while we do have cephx security on most functionality, that is not designed to provide a level of security to face the public internet.

How can set ceph config-key values already ahead of ceph starting?

You can't set them ahead of starting Ceph, but you can set them ahead of enabling the module. That's the way to do this: set your config before you enable the module.

Also, it would be nice if somebody could explain the design concepts for the choice of whether a given configuration option is to be set in a file like ceph.conf, or in in ceph's key-value store; to me as a user it seems quite arbitrary and surprising to find this option inconfigurable in ceph.conf.

This part is easy to explain -- historically the "ceph.conf" config was all in a compile-time-defined C struct, and ceph-mgr modules are dynamically loaded python code, so they used a separate config store. More recently, the way config works has changed -- in Mimic, the module configuration is stored in the same place as the rest of the Ceph config (although I'm not sure we wired up the ability to load these from a file yet).

Not everything in Ceph is going to be settable via config files -- you will need to get accustomed to using commands sometimes. If declarative configuration is very important to you, then tools like ceph-ansible will probably be appealing.

Actions #3

Updated by Niklas Hambuechen almost 6 years ago

Hey John, thanks for your detailed reply.

John Spray wrote:

Firstly: I'm a bit worried that you're running ceph-mgr on a host that is open to the internet -- while we do have cephx security on most functionality, that is not designed to provide a level of security to face the public internet.

The cluster I'm using for this is a throwaway test cluster, and the real cluster is behind a VPN. But it's very good to get clarity on this point!

Not everything in Ceph is going to be settable via config files -- you will need to get accustomed to using commands sometimes. If declarative configuration is very important to you, then tools like ceph-ansible will probably be appealing.

Understood. It would be great if in upcoming releases as much as possible would be settable via config files.

In systems that are more declarative than Ansible (which is essentially an imperative task runner where running arbitrary actions is a common idiom), such as NixOS or raw machine images, the easiest way to configure things is to provide information in static files and have it all boot into operation by systemd starting services once.

The workflow of "boot into started service, run command, stop service, start service" is more cumbersome in such static setups (especially because it's quite difficult to tell systemd "only regard a service as truly up once it has started the second time").

It would thus be awesome if ceph could accommodate static configuration where it is easily possible (such as allowing to set key-value store default values via config files). But your mention of

the module configuration is stored in the same place as the rest of the Ceph config (although I'm not sure we wired up the ability to load these from a file yet)

sounds like that is almost possible already.

Actions #4

Updated by John Spray almost 6 years ago

  • Status changed from New to Closed

I'm going to go ahead and close this because it's probably not relevant from Mimic onwards.

Actions

Also available in: Atom PDF