Commit Graph

83859 Commits

Author SHA1 Message Date
Sage Weil
5ee5bbace1 qa/standalone: drop CEPH_LIB hacks
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
d9a302932b test: drop hackery for CEPH_LIB
Generic config code parses this now as part of global_init.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
d22246499c common/config: interpret CEPH_LIB in parse_env()
Apply to the three plugin directory options.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
47073dc19d doc/man/8/ceph-conf: make not about ceph-conf's lack of mon config support
Steer people toward the mon explicitly or the --show-config-value option.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
59474cb4e6 common/config: comment config levels
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
7f23142f5c drop unnecessary env_to_vec calls
global[_pre]_init does this for us now.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
4eb0e7e9dc librados,libcephfs,...: use parse_env()
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
afae97d3c4 common/global_init: parse environment
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
21e663adc7 common/config: take level to parse_argv
A few callers are explicitly parsing args from the environment.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
6f052edd8d common/config: distinguish between cmdline and override (injectargs)
This makes for a more informative 'ceph config show ...'.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
846f1041db global/global_init: make --show-config and --show-config-val reflect mon configs
Pull down all configs, including both argv and mon, before we do the
--show-config[-val] step.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
a012d99e06 mon/ConfigMonitor: "ceph config assimilate-conf"
Inject as much of a ceph.conf file as we can; spit we can't take back out
to stdout.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
8d1d7ec87d common/options: mark many options NO_MON_UPDATE
- things that identify monitors during startup
- things that identify auth key(s)
- things that only happy during mon mkfs
- things that are very specific to daemon forking/chdir/daemonize behavior

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
a95cf66dac mgr/DaemonServer: make 'config show' indicate duplicate overrides
If we override an option with the same value, show the OVERRIDES item
in parenthesis.  (I tried "=$src" and "(=$src)" but neither looked any
better.)

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
a9a619748a mgr/DaemonServer: 'ceph config show-with-defaults'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
86cf85e0a2 mgr: get config defaults on session open
Leave them encoded until they are used, since usually we won't use them.
This is about 50k currently.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
ed77b096ec mgr/DaemonServer: fix daemon registration
We want to take in the initial config for non-service daemons, too!
Restructure this so it makes more sense.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
ebe8fdfa96 common/config: get_defaults_bl()
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
5b603ec8e6 osd,mds: 'config unset' tell command
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
0db8fd2418 common/ceph_context: implement 'config unset <var>'
Clear an override value (if any).  This works for 'ceph daemon ...'
asok commands.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
948e308c6d mon/ConfigMonitor: show fabricated options as level 'unknown'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
d9dfece0dc mon/ConfigMonitor: include LEVEL column in config dump|get
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
2a55463461 mon/ConfigMap: const * to Option, so we don't have to copy it
These are biggish structs (lots of strings), so it's expensive to make
copies of Option when it is an immutable struct.  However, we need to
handle arbitrary strings that we don't recognize, too.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
cf68ce511f mgr: have MgrStandby send mgr reports to active mgr (even self!)
This allows the mgr daemons to register state with the active mgr just
like the rest of the cluster, including perfcounters and current config.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
a1ca906a63 mon/ConfigMonitor: 'config help'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
49a5e775aa common/options: fix dump()
By convention dump() does not include the containing object section.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
86a6cf778c common/options: operator<< for value_t
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
ef447b39ec vstart.sh: move debug values over to mon config
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
0b3cfbe644 ceph-osd: do not set/override osd_objectstore config option
We use the one on disk, and nobody consumes the option except ceph-volume/
ceph-disk during mkfs.  Do not pollute the config space with a value that
isn't consumed.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
6621b2b49d common/config: "conffile" -> "file"
Easier on the eyes

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
06bf4334f5 common/config: exclude host, fsid from config reproted to mgr
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
d75459351f mon/ConfigMonitor: load_config() a bit less often
We could get very clever and avoid reparsing the full config every time
too, but that is a bit more work.  Leave that as a TODO.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
db62d92427 mon/ConfigMonitor: implement 'config {rm,get,dump}'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
1ae4f0db95 mgr: remove old 'config set' command
This is a cli command to set a config option on the mgr.  It doesn't
really belong because it only sets it on the mgr that happens to be
active.  It was probably mixed up with the asok or tell command.

Added in 057b73d641

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
fdde016301 mon/MonClient: one-shot mon connection on started to fetch config
This is not particularly efficient, but it works:

 - connect to the monitor to get the monmap and config
 - tear it all down
 - proceed with normal startup (which presumably involves reconnecting
   to the mon all over again).

This allows us to set config options that may affect the mon communication
itself, like ms_type.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
f999e8aa54 mon/ConfigMonitor: always send initial config, even if empty
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
c9f1fb841c common/ceph_context: count crypto/shutdown cycles
We need to allow crypto to be set up and torn down before a fork.  Count
the init/shutdown cycles to make that safe.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
4c7e382a47 common/ceph_context: whitespace
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
a524868161 mon: handle MGetConfig
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
e76a189732 vstart.sh: use mon config for many things
We also trim out some obsolete options while we're at it.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
936de8b3db mon: 'config set <who> <name> <value>'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
2f9617d801 mon/ConfigMonitor: refresh mon configs too
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
3b0fc9537e mon/ConfigMap: some improvements
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
7ccd515f82 mon/ConfigMap: move option mask parsing into helper
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
d3dac3d280 mgr/DaemonServer: 'config show <who>'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
d8450574cf mgr/MgrClient: report running config to mgr
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
e82f925eb3 mon/ConfigKeyService: add 'prefix' arg to 'config-key dump ...'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
8bd1f8d338 vstart.sh: less config noise
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
bb4151ea0d common/options: remove obsolete 'crushtool' option
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00
Sage Weil
7940f66b64 mon/MonClient: subscribe to config, handle updates
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:48 -06:00