Commit Graph

84098 Commits

Author SHA1 Message Date
Sage Weil
dc120501f4 vstart.sh: fix osd bootstrap
Install the key before trying to use it for mkfs.  Among other things
this means the osd can fetch it's config from the mon before doing the
mkfs step.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
6286150289 mon: require authentication but no caps for monmap and config
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
3b67d1846d mon: clean up dealth_with bool weirdness
Just return!

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
9936f89167 mon: require authentication for MGetConfig and mon metadata
More importantly, the set of non-authentication operations that are allowed
is more restricted: auth messages, getting monmap, ping.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
66a3946fec mon: add authenticated flag in Session
Authentication is orthogonal to the caps; the client might have no
capabilities but still be authenticated such that we know *who* it is.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
4a3243dfe3 test/mgr/mgr-dashboard-smoke: don't clobber CEPH_ARGS for other daemons
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
6877b3bd26 global/global_init: apply_changes() for config fetch session
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
4c9f7b32d1 common/config: exclude unchanged defaults from diff
If we have a CONF_DEFAULT in the values map we do not need to include it
in the diff!

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
e28acbe56b test/run-cli-tests: CEPH_ARGS="--no-mon-config"
These are all offline tool tests.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
d7849c0be8 common/config: parse --no-mon-config into md_config_t, not CephInitParameters
We want to accept this in $CEPH_ARGS, which makes md_config_t a better
place to keep it.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
27c844d77c common/config: tweak order of env parsing
CEPH_ARGS is half-way between env and cmdline; parse it at the end of
env.

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