Commit Graph

84137 Commits

Author SHA1 Message Date
Sage Weil
77faa7b3d1 test/clie/ceph-conf: fix loop detection output test
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
c2cd2e7351 common/config: use cerr for --show-config-value
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
4683b9bba9 common/config: normalize the default value
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
ae142824ea qa/tasks/rebuild_mondb: --no-mon-config for ceph-monstore-tool
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
960e201c79 qa/workunits/objectstore/test_fuse.sh: no mon config for ceph-objectstore-tool
There isn't a running cluster for this test.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
e89d22fe67 qa/workunits/cephtool/test.sh: streamline test_mon_injectargs
Be less sensitive to formatting of output string on set commands.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
904604eba4 osd: implement tell/daemon 'config get'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
5876a2ba2d rados: only suggest changing mon_allow_pool_delete on EPERM
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
9446f769b8 common/ceph_context: only common_init_finish() once per cct
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
1717d4c578 common/options: 'developer' -> 'dev'
I like shorter.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
5ddc551516 doc/rados/configuration: big update
- remove a bunch of outdated info
- update to reflect new monitor-based configuration
- move a bunch of common settings to another document/page

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
c77e19c9f2 qa: test config CLI interface
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
de4bead01c common/options: fix stringification
There is a generic operator<< for boost::variant--we can't overload it
for Option::value_t.  Make a to_str() method instead.

Add a parse_option() output arg for the normalized value for convenience.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
38a3f50c58 mon/ConfigMonitor: indent 'config dump'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
448b346c46 doc/dev/config-key: document how we structure things in config-key
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
e8b3235973 common/config,mgr: fix config for new encode/decode syntax
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
a4938894e2 messages/MMgrOpen: fix decode
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
bb019ccd36 mon/ConfigMonitor: validate and normalize option on 'config set'
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
90faa119d1 common/options: flag a bunch of pool settings for RUNTIME
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
d1d0759628 mon/ConfigMonitor: 'config (get|show)' RW -> RO
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
e6acf2d1d5 osdmaptool: eliminiate global osd_pg[p]_bits option
osdmaptool is the only user.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
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