Commit Graph

83877 Commits

Author SHA1 Message Date
Sage Weil
0f27f433ba common/options: some osd startup-only options
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
62e570a864 common/options: a few more [CLUSTER_]CREATE options
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
284d31e508 common/options: replace 'mkfs' tag with FLAG_[CLUSTER_]CREATE
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
2acda841af common/options,ceph_test_msgr: unmark misc ms options as RUNTIME
These were marked RUNTIME for the benefit of the test.  Replace with a
no-op observer.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
4583e43120 common/config_obs: NoopConfigObserver
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
7d15a5a9e2 common/options: replace FLAG_SAFE with FLAG_{RUNTIME,STARTUP,CLUSTER_CREATE,DAEMON_CREATE}
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
ac88f05825 common/options: is_safe() -> can_update_at_runtime()
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
285ec18baf mon/ConfigMonitor: show changeable for 'config get|show'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
a05395a1c9 common/options: 'can update at runtime' in 'config help'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
5d818acf18 mgr/DaemonServer: add IGNORES column to 'config show'
If the daemon is ignoring a mon config, show that.  Note that this
column only ever says 'mon', which might be confusing to users.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
926ec5b4c5 common/config: report failed mon config values to mgr
If we can't set a mon config value, report that back to the mgr.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
b0c25cc59b common/config: move unsafe runtime change into _set_val
We want this to apply to other callers, set_mon_vals() in particular.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
b3658c8196 common/options: drop 'safe' flag on plugin dir options
These were only marked safe to accomodate the unit test CEPH_LIB hackery,
which is now removed.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
4af9c9677b mgr: 'config show <who> <key>'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
ee423a4f44 mon: 'ceph config get <who> <key>'
Simple command to get a config value for a given entity (either the set value or the
default), similar to ceph-conf or --show-config-value.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
6eb8f30a23 test: CINIT_FLAG_NO_MON_CONFIG or NO_DEFAULT_CONFIG_FILE
Usually we use NO_DEFAULT_CONFIG_FILE, but for those tests that need the
plugin directory overrides in order to work properly when run manually
(e.g., "bin/unittest_compression"), read the config and only skip the
mon config.

The NO_DFEAULT_CONFIG_FILE (which also skips the mon) would work for
everything when run via ctest, but as a dev one often runs the unittest
manually and having to pass CEPH_LIB=lib is annoying.  Note that
do_cmake.sh already writes out a trivial ceph.conf with these options
set for us.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
b32158bea2 unittest_daemon_config: add needed rm_val()
Otherwise we polluate later tests.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
f4683e4073 ceph-disk/tests: simplify CEPH_LIB hack
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
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