]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
7 years agomgr/dashboard_v2: add mocked service provider for TcmuIscsiService 20775/head
Tiago Melo [Fri, 2 Mar 2018 12:14:57 +0000 (12:14 +0000)]
mgr/dashboard_v2: add mocked service provider for TcmuIscsiService

This removes the warnings shown when running the tests with PhantomJS.

Signed-off-by: Tiago Melo <tmelo@suse.com>
7 years agoMerge pull request #20768 from tchaikov/wip-cmake-dashboard
Kefu Chai [Wed, 7 Mar 2018 10:39:22 +0000 (18:39 +0800)]
Merge pull request #20768 from tchaikov/wip-cmake-dashboard

cmake,test/mgr: restructure dashboard tests and cmake related fixes

Reviewed-by: Ricardo Dias <rdias@suse.com>
7 years agotest/mgr: restructure dashboard tests 20768/head
Kefu Chai [Wed, 7 Mar 2018 09:17:24 +0000 (17:17 +0800)]
test/mgr: restructure dashboard tests

* restructure dashboard tests so they follow the model of other tests
  based on ceph-helpers.sh. i.e. extract the TEST_* out of run()
  function.
* expose mon-host using CEPH_ARGS env variable.
* mgr-dashboard_v2-smoke.sh: do not export CEPH_ARGS in a subshell, so
  the run_mgr() and ceph cli can also have access to the updated
  CEPH_ARGS, and hence they will be able to locate the mon. and because
  auth-supported=none is populated using CEPH_ARGS, this test won't fail
  because of missing keyring.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agotest: run 'npm' command in a directory specified by absolute path
Kefu Chai [Wed, 7 Mar 2018 09:16:25 +0000 (17:16 +0800)]
test: run 'npm' command in a directory specified by absolute path

in case developer wants to run the test in "./build" or some random
directory.

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agocmake: check for "npm" before using it
Kefu Chai [Wed, 7 Mar 2018 07:04:33 +0000 (15:04 +0800)]
cmake: check for "npm" before using it

and allows use to specify the path in which npm is installed. in my
case, if $HOME/.npmrc points "prefix" to ${HOME}/.npm-packages, i will
be able to run

NPM_ROOT=${HOME}/.npm-packages cmake ..

Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #20742 from votdev/perf_counter_units
Volker Theile [Wed, 7 Mar 2018 07:41:27 +0000 (08:41 +0100)]
Merge pull request #20742 from votdev/perf_counter_units

mgr/dashboard v2: Add units to performance counters

7 years agoMerge pull request #20744 from votdev/fix_loading_indicator
Volker Theile [Wed, 7 Mar 2018 07:40:29 +0000 (08:40 +0100)]
Merge pull request #20744 from votdev/fix_loading_indicator

mgr/dashboard v2: Display loading indicator in datatables during first load

7 years agoMerge pull request #20746 from votdev/datatable_selection
Volker Theile [Wed, 7 Mar 2018 07:39:55 +0000 (08:39 +0100)]
Merge pull request #20746 from votdev/datatable_selection

mgr/dashboard v2: Introduce CdTableSelection model

7 years agoMerge PR #20472 into master
Patrick Donnelly [Tue, 6 Mar 2018 23:29:09 +0000 (15:29 -0800)]
Merge PR #20472 into master

* refs/pull/20472/head:
mds: add DUMP_DIRFRAGS to CInode and DUMP_ITEMS to CDir
mds: Enhance dump_tree performance by traversing the tree directly

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoMerge PR #20502 into master
Patrick Donnelly [Tue, 6 Mar 2018 23:28:59 +0000 (15:28 -0800)]
Merge PR #20502 into master

* refs/pull/20502/head:
test: cap waits in delegation tests at 60s
tests: add a test for doing a getattr while caps are recalled but before returned
client: allow getattr, lookup, fstatx, and readdir to use implemented caps

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zheng Yan <zyan@redhat.com>
7 years agoMerge PR #20541 into master
Patrick Donnelly [Tue, 6 Mar 2018 23:28:50 +0000 (15:28 -0800)]
Merge PR #20541 into master

* refs/pull/20541/head:
ceph-mds: exit if invalid id

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoMerge PR #20575 into master
Patrick Donnelly [Tue, 6 Mar 2018 23:28:43 +0000 (15:28 -0800)]
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>
7 years agogithubmap: update contributors
Patrick Donnelly [Tue, 6 Mar 2018 23:28:42 +0000 (15:28 -0800)]
githubmap: update contributors

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoMerge PR #20583 into master
Patrick Donnelly [Tue, 6 Mar 2018 23:24:11 +0000 (15:24 -0800)]
Merge PR #20583 into master

* refs/pull/20583/head:
cephfs-journal-tool: add event time output

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoMerge PR #20615 into master
Patrick Donnelly [Tue, 6 Mar 2018 23:24:04 +0000 (15:24 -0800)]
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>
7 years agoMerge pull request #20172 from liewegas/wip-config
Sage Weil [Tue, 6 Mar 2018 21:24:23 +0000 (15:24 -0600)]
Merge pull request #20172 from liewegas/wip-config

mon: centralized config

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agocommon/config: normalize key name for get_val (external) variants 20172/head
Sage Weil [Tue, 6 Mar 2018 20:21:28 +0000 (14:21 -0600)]
common/config: normalize key name for get_val (external) variants

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agovstart.sh: -c to ceph cli
Sage Weil [Tue, 6 Mar 2018 20:16:39 +0000 (14:16 -0600)]
vstart.sh: -c to ceph cli

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMonitor: process subs from update_from_paxos
Sage Weil [Mon, 5 Mar 2018 19:38:13 +0000 (13:38 -0600)]
mon/ConfigMonitor: process subs from update_from_paxos

This is what OSDMonitor and MDSMonitor do.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/MonClient: fix auth timeout vs error race
Sage Weil [Mon, 5 Mar 2018 18:59:32 +0000 (12:59 -0600)]
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>
7 years agomon/ConfigMonitor: fix dump when by_type is missing an item
Sage Weil [Mon, 5 Mar 2018 18:36:59 +0000 (12:36 -0600)]
mon/ConfigMonitor: fix dump when by_type is missing an item

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/common_init: use unique admin_socket path for unprivileged daemons
Sage Weil [Wed, 28 Feb 2018 22:24:34 +0000 (16:24 -0600)]
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>
7 years agocommon/config: intercept "keyfile", translate into "key"
Sage Weil [Wed, 28 Feb 2018 21:59:25 +0000 (15:59 -0600)]
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>
7 years agolibrados: fix common_init_finish timing
Sage Weil [Wed, 28 Feb 2018 21:37:34 +0000 (15:37 -0600)]
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>
7 years agocommon/config: check against raw value (no meta) to detect unchanged option
Sage Weil [Mon, 26 Feb 2018 18:41:46 +0000 (12:41 -0600)]
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>
7 years agomon/ConfigMonitor: add missing #include, tweak types
Sage Weil [Mon, 19 Feb 2018 15:00:24 +0000 (09:00 -0600)]
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>
7 years agotest/cli/ceph-conf: fix test
Sage Weil [Sun, 18 Feb 2018 15:45:44 +0000 (09:45 -0600)]
test/cli/ceph-conf: fix test

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoqa/tasks/rebuild_mondb.py: --no-mon-config to ceph-objectstore-tool
Sage Weil [Sun, 18 Feb 2018 02:05:02 +0000 (20:05 -0600)]
qa/tasks/rebuild_mondb.py: --no-mon-config to ceph-objectstore-tool

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: add --mon-config option (opposite of --no-mon-config)
Sage Weil [Fri, 16 Feb 2018 15:01:14 +0000 (09:01 -0600)]
common/config: add --mon-config option (opposite of --no-mon-config)

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/MonClient: apply timeout while fetching config
Sage Weil [Tue, 13 Feb 2018 03:47:21 +0000 (21:47 -0600)]
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>
7 years agomon/MonClient: tolerate pre-mimic mons
Sage Weil [Tue, 13 Feb 2018 00:00:02 +0000 (18:00 -0600)]
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>
7 years agoceph-disk: --no-mon-config
Sage Weil [Thu, 8 Feb 2018 17:20:40 +0000 (11:20 -0600)]
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>
7 years agoqa/workunits/cephtool/test.sh: fix mon_caps
Sage Weil [Tue, 6 Feb 2018 19:31:01 +0000 (13:31 -0600)]
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>
7 years agoqa: --no-mon-config for ceph-objectstore-tool --op mkfs ..
Sage Weil [Tue, 6 Feb 2018 19:09:55 +0000 (13:09 -0600)]
qa: --no-mon-config for ceph-objectstore-tool --op mkfs ..

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoceph-objectstore-tool: infer osd id to authenticate
Sage Weil [Tue, 6 Feb 2018 18:56:10 +0000 (12:56 -0600)]
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>
7 years agoglobal/global_init: send startup errors to cerr, not log
Sage Weil [Tue, 6 Feb 2018 18:56:44 +0000 (12:56 -0600)]
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>
7 years agoqa/tasks/ceph.py: --no-mon-config during ceph-osd mkfs
Sage Weil [Mon, 5 Feb 2018 19:06:04 +0000 (13:06 -0600)]
qa/tasks/ceph.py: --no-mon-config during ceph-osd mkfs

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agovstart.sh: use assimilate-conf to ingest config options quickly
Sage Weil [Fri, 2 Feb 2018 17:55:47 +0000 (11:55 -0600)]
vstart.sh: use assimilate-conf to ingest config options quickly

Separate 'config set' commands is slow.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/MgrClient: only send config_bl if it has changed
Sage Weil [Fri, 2 Feb 2018 17:29:21 +0000 (11:29 -0600)]
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>
7 years agovstart.sh: fix osd bootstrap
Sage Weil [Thu, 1 Feb 2018 15:26:31 +0000 (09:26 -0600)]
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>
7 years agomon: require authentication but no caps for monmap and config
Sage Weil [Thu, 1 Feb 2018 15:18:04 +0000 (09:18 -0600)]
mon: require authentication but no caps for monmap and config

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon: clean up dealth_with bool weirdness
Sage Weil [Thu, 1 Feb 2018 15:13:25 +0000 (09:13 -0600)]
mon: clean up dealth_with bool weirdness

Just return!

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon: require authentication for MGetConfig and mon metadata
Sage Weil [Thu, 1 Feb 2018 15:03:32 +0000 (09:03 -0600)]
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>
7 years agomon: add authenticated flag in Session
Sage Weil [Thu, 1 Feb 2018 15:01:31 +0000 (09:01 -0600)]
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>
7 years agotest/mgr/mgr-dashboard-smoke: don't clobber CEPH_ARGS for other daemons
Sage Weil [Wed, 31 Jan 2018 23:41:24 +0000 (17:41 -0600)]
test/mgr/mgr-dashboard-smoke: don't clobber CEPH_ARGS for other daemons

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoglobal/global_init: apply_changes() for config fetch session
Sage Weil [Wed, 31 Jan 2018 23:40:53 +0000 (17:40 -0600)]
global/global_init: apply_changes() for config fetch session

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: exclude unchanged defaults from diff
Sage Weil [Wed, 31 Jan 2018 23:18:21 +0000 (17:18 -0600)]
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>
7 years agotest/run-cli-tests: CEPH_ARGS="--no-mon-config"
Sage Weil [Wed, 31 Jan 2018 22:41:30 +0000 (16:41 -0600)]
test/run-cli-tests: CEPH_ARGS="--no-mon-config"

These are all offline tool tests.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: parse --no-mon-config into md_config_t, not CephInitParameters
Sage Weil [Wed, 31 Jan 2018 22:36:07 +0000 (16:36 -0600)]
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>
7 years agocommon/config: tweak order of env parsing
Sage Weil [Wed, 31 Jan 2018 22:33:44 +0000 (16:33 -0600)]
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>
7 years agotest/clie/ceph-conf: fix loop detection output test
Sage Weil [Wed, 31 Jan 2018 22:19:47 +0000 (16:19 -0600)]
test/clie/ceph-conf: fix loop detection output test

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: use cerr for --show-config-value
Sage Weil [Wed, 31 Jan 2018 22:19:34 +0000 (16:19 -0600)]
common/config: use cerr for --show-config-value

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: normalize the default value
Sage Weil [Wed, 31 Jan 2018 21:50:00 +0000 (15:50 -0600)]
common/config: normalize the default value

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoqa/tasks/rebuild_mondb: --no-mon-config for ceph-monstore-tool
Sage Weil [Wed, 31 Jan 2018 14:37:08 +0000 (08:37 -0600)]
qa/tasks/rebuild_mondb: --no-mon-config for ceph-monstore-tool

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoqa/workunits/objectstore/test_fuse.sh: no mon config for ceph-objectstore-tool
Sage Weil [Wed, 31 Jan 2018 14:35:11 +0000 (08:35 -0600)]
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>
7 years agoqa/workunits/cephtool/test.sh: streamline test_mon_injectargs
Sage Weil [Wed, 31 Jan 2018 13:20:18 +0000 (07:20 -0600)]
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>
7 years agoosd: implement tell/daemon 'config get'
Sage Weil [Wed, 31 Jan 2018 13:09:09 +0000 (07:09 -0600)]
osd: implement tell/daemon 'config get'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agorados: only suggest changing mon_allow_pool_delete on EPERM
Sage Weil [Tue, 30 Jan 2018 15:12:39 +0000 (09:12 -0600)]
rados: only suggest changing mon_allow_pool_delete on EPERM

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/ceph_context: only common_init_finish() once per cct
Sage Weil [Tue, 30 Jan 2018 15:11:23 +0000 (09:11 -0600)]
common/ceph_context: only common_init_finish() once per cct

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: 'developer' -> 'dev'
Sage Weil [Thu, 18 Jan 2018 17:31:54 +0000 (11:31 -0600)]
common/options: 'developer' -> 'dev'

I like shorter.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agodoc/rados/configuration: big update
Sage Weil [Thu, 18 Jan 2018 17:31:39 +0000 (11:31 -0600)]
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>
7 years agoqa: test config CLI interface
Sage Weil [Wed, 17 Jan 2018 20:59:58 +0000 (14:59 -0600)]
qa: test config CLI interface

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: fix stringification
Sage Weil [Wed, 17 Jan 2018 20:34:27 +0000 (14:34 -0600)]
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>
7 years agomon/ConfigMonitor: indent 'config dump'
Sage Weil [Wed, 17 Jan 2018 20:09:41 +0000 (14:09 -0600)]
mon/ConfigMonitor: indent 'config dump'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agodoc/dev/config-key: document how we structure things in config-key
Sage Weil [Thu, 11 Jan 2018 23:29:10 +0000 (17:29 -0600)]
doc/dev/config-key: document how we structure things in config-key

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config,mgr: fix config for new encode/decode syntax
Sage Weil [Thu, 11 Jan 2018 23:24:43 +0000 (17:24 -0600)]
common/config,mgr: fix config for new encode/decode syntax

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomessages/MMgrOpen: fix decode
Sage Weil [Thu, 11 Jan 2018 23:13:29 +0000 (17:13 -0600)]
messages/MMgrOpen: fix decode

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMonitor: validate and normalize option on 'config set'
Sage Weil [Thu, 11 Jan 2018 22:26:10 +0000 (16:26 -0600)]
mon/ConfigMonitor: validate and normalize option on 'config set'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: flag a bunch of pool settings for RUNTIME
Sage Weil [Thu, 11 Jan 2018 20:34:35 +0000 (14:34 -0600)]
common/options: flag a bunch of pool settings for RUNTIME

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMonitor: 'config (get|show)' RW -> RO
Sage Weil [Thu, 11 Jan 2018 20:23:32 +0000 (14:23 -0600)]
mon/ConfigMonitor: 'config (get|show)' RW -> RO

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoosdmaptool: eliminiate global osd_pg[p]_bits option
Sage Weil [Thu, 11 Jan 2018 19:37:40 +0000 (13:37 -0600)]
osdmaptool: eliminiate global osd_pg[p]_bits option

osdmaptool is the only user.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: some osd startup-only options
Sage Weil [Thu, 11 Jan 2018 17:25:54 +0000 (11:25 -0600)]
common/options: some osd startup-only options

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: a few more [CLUSTER_]CREATE options
Sage Weil [Thu, 11 Jan 2018 17:23:43 +0000 (11:23 -0600)]
common/options: a few more [CLUSTER_]CREATE options

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: replace 'mkfs' tag with FLAG_[CLUSTER_]CREATE
Sage Weil [Thu, 11 Jan 2018 17:20:12 +0000 (11:20 -0600)]
common/options: replace 'mkfs' tag with FLAG_[CLUSTER_]CREATE

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options,ceph_test_msgr: unmark misc ms options as RUNTIME
Sage Weil [Thu, 11 Jan 2018 15:45:38 +0000 (09:45 -0600)]
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>
7 years agocommon/config_obs: NoopConfigObserver
Sage Weil [Thu, 11 Jan 2018 15:42:55 +0000 (09:42 -0600)]
common/config_obs: NoopConfigObserver

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: replace FLAG_SAFE with FLAG_{RUNTIME,STARTUP,CLUSTER_CREATE,DAEMON_CR...
Sage Weil [Thu, 11 Jan 2018 15:30:35 +0000 (09:30 -0600)]
common/options: replace FLAG_SAFE with FLAG_{RUNTIME,STARTUP,CLUSTER_CREATE,DAEMON_CREATE}

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: is_safe() -> can_update_at_runtime()
Sage Weil [Thu, 11 Jan 2018 15:21:54 +0000 (09:21 -0600)]
common/options: is_safe() -> can_update_at_runtime()

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMonitor: show changeable for 'config get|show'
Sage Weil [Thu, 11 Jan 2018 15:11:48 +0000 (09:11 -0600)]
mon/ConfigMonitor: show changeable for 'config get|show'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: 'can update at runtime' in 'config help'
Sage Weil [Thu, 11 Jan 2018 14:31:02 +0000 (08:31 -0600)]
common/options: 'can update at runtime' in 'config help'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/DaemonServer: add IGNORES column to 'config show'
Sage Weil [Wed, 10 Jan 2018 23:34:44 +0000 (17:34 -0600)]
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>
7 years agocommon/config: report failed mon config values to mgr
Sage Weil [Wed, 10 Jan 2018 23:06:56 +0000 (17:06 -0600)]
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>
7 years agocommon/config: move unsafe runtime change into _set_val
Sage Weil [Wed, 10 Jan 2018 18:38:50 +0000 (12:38 -0600)]
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>
7 years agocommon/options: drop 'safe' flag on plugin dir options
Sage Weil [Wed, 10 Jan 2018 18:29:14 +0000 (12:29 -0600)]
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>
7 years agomgr: 'config show <who> <key>'
Sage Weil [Tue, 9 Jan 2018 00:47:26 +0000 (18:47 -0600)]
mgr: 'config show <who> <key>'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon: 'ceph config get <who> <key>'
Sage Weil [Tue, 9 Jan 2018 00:14:04 +0000 (18:14 -0600)]
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>
7 years agotest: CINIT_FLAG_NO_MON_CONFIG or NO_DEFAULT_CONFIG_FILE
Sage Weil [Wed, 10 Jan 2018 22:43:04 +0000 (16:43 -0600)]
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>
7 years agounittest_daemon_config: add needed rm_val()
Sage Weil [Wed, 10 Jan 2018 22:13:10 +0000 (16:13 -0600)]
unittest_daemon_config: add needed rm_val()

Otherwise we polluate later tests.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoceph-disk/tests: simplify CEPH_LIB hack
Sage Weil [Wed, 10 Jan 2018 18:26:56 +0000 (12:26 -0600)]
ceph-disk/tests: simplify CEPH_LIB hack

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoqa/standalone: drop CEPH_LIB hacks
Sage Weil [Wed, 10 Jan 2018 18:26:02 +0000 (12:26 -0600)]
qa/standalone: drop CEPH_LIB hacks

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agotest: drop hackery for CEPH_LIB
Sage Weil [Wed, 10 Jan 2018 18:24:50 +0000 (12:24 -0600)]
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>
7 years agocommon/config: interpret CEPH_LIB in parse_env()
Sage Weil [Wed, 10 Jan 2018 18:23:20 +0000 (12:23 -0600)]
common/config: interpret CEPH_LIB in parse_env()

Apply to the three plugin directory options.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agodoc/man/8/ceph-conf: make not about ceph-conf's lack of mon config support
Sage Weil [Wed, 10 Jan 2018 16:54:46 +0000 (10:54 -0600)]
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>
7 years agocommon/config: comment config levels
Sage Weil [Mon, 8 Jan 2018 20:14:09 +0000 (14:14 -0600)]
common/config: comment config levels

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agodrop unnecessary env_to_vec calls
Sage Weil [Mon, 8 Jan 2018 20:10:07 +0000 (14:10 -0600)]
drop unnecessary env_to_vec calls

global[_pre]_init does this for us now.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agolibrados,libcephfs,...: use parse_env()
Sage Weil [Mon, 8 Jan 2018 20:08:08 +0000 (14:08 -0600)]
librados,libcephfs,...: use parse_env()

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/global_init: parse environment
Sage Weil [Mon, 8 Jan 2018 20:07:14 +0000 (14:07 -0600)]
common/global_init: parse environment

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: take level to parse_argv
Sage Weil [Mon, 8 Jan 2018 19:56:19 +0000 (13:56 -0600)]
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>
7 years agocommon/config: distinguish between cmdline and override (injectargs)
Sage Weil [Mon, 8 Jan 2018 19:47:53 +0000 (13:47 -0600)]
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>
7 years agoglobal/global_init: make --show-config and --show-config-val reflect mon configs
Sage Weil [Sat, 6 Jan 2018 17:25:47 +0000 (11:25 -0600)]
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>