Commit Graph

84075 Commits

Author SHA1 Message Date
Patrick Donnelly
eb7732b735
Merge PR #20541 into master
* refs/pull/20541/head:
	ceph-mds: exit if invalid id

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2018-03-06 15:28:50 -08:00
Patrick Donnelly
ed71e0e570
Merge PR #20575 into master
* refs/pull/20575/head:
	mds: set journaler iohint correctly when mds daemon going to active

Reviewed-by: dongdong tao <tdd21151186@gmail.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2018-03-06 15:28:43 -08:00
Patrick Donnelly
757c2f4cdb
githubmap: update contributors
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2018-03-06 15:28:42 -08:00
Patrick Donnelly
44e286362f
Merge PR #20583 into master
* refs/pull/20583/head:
	cephfs-journal-tool: add event time output

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2018-03-06 15:24:11 -08:00
Patrick Donnelly
54e9ac6c7a
Merge PR #20615 into master
* refs/pull/20615/head:
	mds: modify help info of dump_historic_ops and dump_historic_ops_by_duration
	mds:fix typo in MDSRank

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2018-03-06 15:24:04 -08:00
Sage Weil
d7692a24c7
Merge pull request #20172 from liewegas/wip-config
mon: centralized config

Reviewed-by: John Spray <john.spray@redhat.com>
2018-03-06 15:24:23 -06:00
Sage Weil
a5597f0b2b common/config: normalize key name for get_val (external) variants
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
6eba775965 vstart.sh: -c to ceph cli
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
6d13ab2d9a mon/ConfigMonitor: process subs from update_from_paxos
This is what OSDMonitor and MDSMonitor do.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
148db39cf9 mon/MonClient: fix auth timeout vs error race
It's possible that we successfully set active_con *and* time out the
cond WaitUntil.  Only set the error if we don't have a connection; if we
set it *and* time out then let's call it success.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
b349fbe2e4 mon/ConfigMonitor: fix dump when by_type is missing an item
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
59ee2e8d3b common/common_init: use unique admin_socket path for unprivileged daemons
These qualify as 'daemon', but their path is usually not unique.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
91e8da1431 common/config: intercept "keyfile", translate into "key"
The keyfile arg might be - (stdin), which we can only read once.  Ensure
that we consume it once by intercepting the CLI value early and inserting
the value into the 'key' option.

This robs future code of the knowledge that the key came from --keyfile
and not --key, but avoids the issue of multiple users (notably, KeyRing.cc
and the OSD mkfs code).

Remove the - special case from OSD at the same time, since it can no
longer be reached (unless something other than the CLI specified '-', but
neither ceph.conf nor the mon config make sense here).

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
9aeced33ee librados: fix common_init_finish timing
Common_init_finish does start_service_thread and does
set_safe_to_start_threads() on the cct, which switches us to 'runtime'
mode where we can't accept many config options. Do that *after* we fetch
our config from the mon so that we can accept+set runtime options (and
not complain to stderr about it).

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
12062e7d87 common/config: check against raw value (no meta) to detect unchanged option
If we are looking at a new value from the mon and comparing it to what we
already have active, compare the non-meta-substituted form.  This way a
value from the mon that can't update at runtime but we have already set to
the same value will not be falsely flagged as ignored.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
3d0b38aff5 mon/ConfigMonitor: add missing #include, tweak types
Seems to resolve a build error on some compilers!  Meh.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
250be6db7c test/cli/ceph-conf: fix test
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
9c42d88743 qa/tasks/rebuild_mondb.py: --no-mon-config to ceph-objectstore-tool
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
2bc34bb882 common/config: add --mon-config option (opposite of --no-mon-config)
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
3c2b30e4c5 mon/MonClient: apply timeout while fetching config
The normal timeouts automatically apply during the authenticate() stage,
but not to the explicit wait for a config.  If we don't get that quickly
we shoudl retry another monitor because it is possible we will connect to
an out-of-quorum (or otherwise unresponsive) mon.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
bee6ced276 mon/MonClient: tolerate pre-mimic mons
Return success if the mons are pre-mimic (and thus have no config).

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
a095ec8b0f ceph-disk: --no-mon-config
Some of these cases make sense to fetch mon configs, but we are deprecating
ceph-disk anyway, and the tests currently make use of ceph-disk in places
that do not have a mon_host defined via a ceph.conf or other environment.
This avoids breaking those test cases without any real impact on users
(which will either use ceph-volume or presumably remain in a legacy config
environment).

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
11e287c137 qa/workunits/cephtool/test.sh: fix mon_caps
Pass --no-mon-config so we don't get

 failed to fetch mon config (--no-mon-config to skip)

instead.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
c9e974800f qa: --no-mon-config for ceph-objectstore-tool --op mkfs ..
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
4a1d198c4f ceph-objectstore-tool: infer osd id to authenticate
In order to get mon configs we need to authenticate as somebody.
Infer it from the data directory.

Note that this won't work for --op mkfs.  Those users need to pass
--no-mon-config or -n.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
148105046d global/global_init: send startup errors to cerr, not log
(Flush the log, too, as something that has useful error messages.)

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
e44e10d6e0 qa/tasks/ceph.py: --no-mon-config during ceph-osd mkfs
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
902f3987de vstart.sh: use assimilate-conf to ingest config options quickly
Separate 'config set' commands is slow.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:50 -06:00
Sage Weil
8e2a30068a mgr/MgrClient: only send config_bl if it has changed
The mgr already treats the config_bl as optional in the MMgrReport
messages.

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