]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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>
7 years agomon/ConfigMonitor: "ceph config assimilate-conf"
Sage Weil [Sat, 6 Jan 2018 17:19:43 +0000 (11:19 -0600)]
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>
7 years agocommon/options: mark many options NO_MON_UPDATE
Sage Weil [Sat, 6 Jan 2018 17:06:38 +0000 (11:06 -0600)]
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>
7 years agomgr/DaemonServer: make 'config show' indicate duplicate overrides
Sage Weil [Sat, 6 Jan 2018 03:39:10 +0000 (21:39 -0600)]
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>
7 years agomgr/DaemonServer: 'ceph config show-with-defaults'
Sage Weil [Fri, 5 Jan 2018 23:45:21 +0000 (17:45 -0600)]
mgr/DaemonServer: 'ceph config show-with-defaults'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr: get config defaults on session open
Sage Weil [Fri, 5 Jan 2018 23:44:56 +0000 (17:44 -0600)]
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>
7 years agomgr/DaemonServer: fix daemon registration
Sage Weil [Fri, 5 Jan 2018 23:43:49 +0000 (17:43 -0600)]
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>
7 years agocommon/config: get_defaults_bl()
Sage Weil [Fri, 5 Jan 2018 23:40:42 +0000 (17:40 -0600)]
common/config: get_defaults_bl()

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoosd,mds: 'config unset' tell command
Sage Weil [Fri, 5 Jan 2018 22:44:00 +0000 (16:44 -0600)]
osd,mds: 'config unset' tell command

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/ceph_context: implement 'config unset <var>'
Sage Weil [Fri, 5 Jan 2018 22:36:25 +0000 (16:36 -0600)]
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>
7 years agomon/ConfigMonitor: show fabricated options as level 'unknown'
Sage Weil [Fri, 5 Jan 2018 22:24:58 +0000 (16:24 -0600)]
mon/ConfigMonitor: show fabricated options as level 'unknown'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMonitor: include LEVEL column in config dump|get
Sage Weil [Fri, 5 Jan 2018 22:24:44 +0000 (16:24 -0600)]
mon/ConfigMonitor: include LEVEL column in config dump|get

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMap: const * to Option, so we don't have to copy it
Sage Weil [Fri, 5 Jan 2018 22:19:44 +0000 (16:19 -0600)]
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>
7 years agomgr: have MgrStandby send mgr reports to active mgr (even self!)
Sage Weil [Fri, 5 Jan 2018 20:55:12 +0000 (14:55 -0600)]
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>
7 years agomon/ConfigMonitor: 'config help'
Sage Weil [Fri, 5 Jan 2018 19:41:07 +0000 (13:41 -0600)]
mon/ConfigMonitor: 'config help'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: fix dump()
Sage Weil [Fri, 5 Jan 2018 19:45:02 +0000 (13:45 -0600)]
common/options: fix dump()

By convention dump() does not include the containing object section.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: operator<< for value_t
Sage Weil [Fri, 5 Jan 2018 19:39:13 +0000 (13:39 -0600)]
common/options: operator<< for value_t

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agovstart.sh: move debug values over to mon config
Sage Weil [Fri, 5 Jan 2018 19:03:04 +0000 (13:03 -0600)]
vstart.sh: move debug values over to mon config

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoceph-osd: do not set/override osd_objectstore config option
Sage Weil [Fri, 5 Jan 2018 18:07:34 +0000 (12:07 -0600)]
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>
7 years agocommon/config: "conffile" -> "file"
Sage Weil [Fri, 5 Jan 2018 17:35:33 +0000 (11:35 -0600)]
common/config: "conffile" -> "file"

Easier on the eyes

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: exclude host, fsid from config reproted to mgr
Sage Weil [Fri, 5 Jan 2018 17:19:15 +0000 (11:19 -0600)]
common/config: exclude host, fsid from config reproted to mgr

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMonitor: load_config() a bit less often
Sage Weil [Fri, 5 Jan 2018 15:17:45 +0000 (09:17 -0600)]
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>
7 years agomon/ConfigMonitor: implement 'config {rm,get,dump}'
Sage Weil [Thu, 4 Jan 2018 23:14:30 +0000 (17:14 -0600)]
mon/ConfigMonitor: implement 'config {rm,get,dump}'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr: remove old 'config set' command
Sage Weil [Thu, 4 Jan 2018 23:13:15 +0000 (17:13 -0600)]
mgr: remove old 'config set' command

This is a cli command to set a config option on the mgr.  It doesn't
really belong because it only sets it on the mgr that happens to be
active.  It was probably mixed up with the asok or tell command.

Added in 057b73d641decb9403aba50caae9d139f3a34dd4

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/MonClient: one-shot mon connection on started to fetch config
Sage Weil [Tue, 5 Dec 2017 17:43:43 +0000 (11:43 -0600)]
mon/MonClient: one-shot mon connection on started to fetch config

This is not particularly efficient, but it works:

 - connect to the monitor to get the monmap and config
 - tear it all down
 - proceed with normal startup (which presumably involves reconnecting
   to the mon all over again).

This allows us to set config options that may affect the mon communication
itself, like ms_type.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMonitor: always send initial config, even if empty
Sage Weil [Thu, 4 Jan 2018 20:55:56 +0000 (14:55 -0600)]
mon/ConfigMonitor: always send initial config, even if empty

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/ceph_context: count crypto/shutdown cycles
Sage Weil [Thu, 4 Jan 2018 20:55:30 +0000 (14:55 -0600)]
common/ceph_context: count crypto/shutdown cycles

We need to allow crypto to be set up and torn down before a fork.  Count
the init/shutdown cycles to make that safe.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/ceph_context: whitespace
Sage Weil [Thu, 4 Jan 2018 20:40:45 +0000 (14:40 -0600)]
common/ceph_context: whitespace

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon: handle MGetConfig
Sage Weil [Tue, 5 Dec 2017 17:39:02 +0000 (11:39 -0600)]
mon: handle MGetConfig

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agovstart.sh: use mon config for many things
Sage Weil [Mon, 4 Dec 2017 22:54:27 +0000 (16:54 -0600)]
vstart.sh: use mon config for many things

We also trim out some obsolete options while we're at it.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon: 'config set <who> <name> <value>'
Sage Weil [Mon, 4 Dec 2017 22:54:07 +0000 (16:54 -0600)]
mon: 'config set <who> <name> <value>'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMonitor: refresh mon configs too
Sage Weil [Mon, 4 Dec 2017 22:53:54 +0000 (16:53 -0600)]
mon/ConfigMonitor: refresh mon configs too

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMap: some improvements
Sage Weil [Thu, 4 Jan 2018 23:14:09 +0000 (17:14 -0600)]
mon/ConfigMap: some improvements

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMap: move option mask parsing into helper
Sage Weil [Mon, 4 Dec 2017 22:52:31 +0000 (16:52 -0600)]
mon/ConfigMap: move option mask parsing into helper

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/DaemonServer: 'config show <who>'
Sage Weil [Mon, 4 Dec 2017 22:52:00 +0000 (16:52 -0600)]
mgr/DaemonServer: 'config show <who>'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomgr/MgrClient: report running config to mgr
Sage Weil [Mon, 4 Dec 2017 22:51:33 +0000 (16:51 -0600)]
mgr/MgrClient: report running config to mgr

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigKeyService: add 'prefix' arg to 'config-key dump ...'
Sage Weil [Mon, 4 Dec 2017 22:50:18 +0000 (16:50 -0600)]
mon/ConfigKeyService: add 'prefix' arg to 'config-key dump ...'

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agovstart.sh: less config noise
Sage Weil [Mon, 4 Dec 2017 22:37:14 +0000 (16:37 -0600)]
vstart.sh: less config noise

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: remove obsolete 'crushtool' option
Sage Weil [Mon, 4 Dec 2017 22:32:36 +0000 (16:32 -0600)]
common/options: remove obsolete 'crushtool' option

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/MonClient: subscribe to config, handle updates
Sage Weil [Sat, 2 Dec 2017 04:43:02 +0000 (22:43 -0600)]
mon/MonClient: subscribe to config, handle updates

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMonitor: add monitor service for distributing configs
Sage Weil [Sat, 2 Dec 2017 04:42:45 +0000 (22:42 -0600)]
mon/ConfigMonitor: add monitor service for distributing configs

Add 'config' subscribe option to get MConfigs on auth and when config is
updated.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigMap: parsed cluster-wide config
Sage Weil [Sat, 2 Dec 2017 04:41:46 +0000 (22:41 -0600)]
mon/ConfigMap: parsed cluster-wide config

Breaks down options by global, type, daemon, and can filter options by
crush location.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomessages/MConfig: send config map
Sage Weil [Sat, 2 Dec 2017 04:41:08 +0000 (22:41 -0600)]
messages/MConfig: send config map

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: set_mon_vals()
Sage Weil [Sat, 2 Dec 2017 04:12:52 +0000 (22:12 -0600)]
common/config: set_mon_vals()

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: some cleanup; rm_val
Sage Weil [Sat, 2 Dec 2017 04:12:15 +0000 (22:12 -0600)]
common/config: some cleanup; rm_val

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocleanup: src/.libs -> build/lib
Sage Weil [Fri, 1 Dec 2017 23:11:46 +0000 (17:11 -0600)]
cleanup: src/.libs -> build/lib

Clean up remaining traces of automake's .libs.  This makes unittest_*
tests easier to run by hand (mostly).

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: rewrite (╯°□°)╯︵ ┻━┻
Sage Weil [Fri, 1 Dec 2017 21:50:59 +0000 (15:50 -0600)]
common/config: rewrite (╯°□°)╯︵ ┻━┻

This is too complete a rewrite to reasonably break down into small steps,
and even if I could, it would be harder to review that way than to simply
review the new implementation.  The semantics of the old one were so weird
that it's harder to reason about the change in behavior than to simply
review the new behavior.

That's my story, at least, and I'm sticking to it!

So, here are the highlights:

 - $foo meta expansions are evaluated at get_val() time.  This means the
weird bool arguments to set_val specifying whether things were expanded
are removed (they didn't make any sense unless you were thinking about the
old implementation).
 - for every option, we track values from any inputs (config, mon,
   override).  At get_val() time, we pick the highest priority one.
 - diff() is rewritten to be simple and to show you all of the above.
 - internal interfaces are simplified, and in terms of Option::value_t
   whenever possible.
 - unit tests simplified somewhat based on the above.

Known issues:

 - legacy values get pushed out in select cases.  Notably if foo=$bar
   and bar is updated, we do not update $foo (there is no dependency
   tracking to do this efficiently).

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: whitespace
Sage Weil [Thu, 30 Nov 2017 21:33:20 +0000 (15:33 -0600)]
common/config: whitespace

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: streamline get_val_generic
Sage Weil [Mon, 20 Nov 2017 21:28:12 +0000 (15:28 -0600)]
common/config: streamline get_val_generic

Lookup value first; avoid a schema lookup entirely.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon: refactor default config value handling
Sage Weil [Mon, 13 Nov 2017 15:27:00 +0000 (09:27 -0600)]
common: refactor default config value handling

- pass an optional map<string,string> instead of an arg list
- remember default values in md_config_t
- some nicer helpers

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoos/bluestore: pass rocksdb options via map, not global config
Sage Weil [Mon, 20 Nov 2017 20:52:51 +0000 (14:52 -0600)]
os/bluestore: pass rocksdb options via map, not global config

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agokv/KeyValueDB: pass kv_options map to ctor
Sage Weil [Mon, 20 Nov 2017 20:52:18 +0000 (14:52 -0600)]
kv/KeyValueDB: pass kv_options map to ctor

This will let us avoid passing options via global config options.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: make debug_* regular options
Sage Weil [Tue, 14 Nov 2017 21:45:12 +0000 (15:45 -0600)]
common/config: make debug_* regular options

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocrush/CrushWrapper: get_full_location by name
Sage Weil [Mon, 13 Nov 2017 15:27:56 +0000 (09:27 -0600)]
crush/CrushWrapper: get_full_location by name

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: move parse_value() into Option
Sage Weil [Mon, 13 Nov 2017 15:25:07 +0000 (09:25 -0600)]
common/config: move parse_value() into Option

It is more reuable there.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: new get_val() variant
Sage Weil [Mon, 13 Nov 2017 15:24:23 +0000 (09:24 -0600)]
common/config: new get_val() variant

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: record is_daemon
Sage Weil [Mon, 13 Nov 2017 15:24:03 +0000 (09:24 -0600)]
common/config: record is_daemon

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/config: find_option
Sage Weil [Thu, 9 Nov 2017 23:04:01 +0000 (17:04 -0600)]
common/config: find_option

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon: don't pass alt_def_args if we don't use them
Sage Weil [Mon, 13 Nov 2017 15:22:32 +0000 (09:22 -0600)]
common: don't pass alt_def_args if we don't use them

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agocommon/options: convert bool safe to a flags field
Sage Weil [Fri, 10 Nov 2017 23:03:24 +0000 (17:03 -0600)]
common/options: convert bool safe to a flags field

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agomon/ConfigKeyService: make STORE_PREFIX public
Sage Weil [Thu, 9 Nov 2017 14:49:30 +0000 (08:49 -0600)]
mon/ConfigKeyService: make STORE_PREFIX public

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #20681 from liewegas/wip-fork-vs-msgr
Sage Weil [Tue, 6 Mar 2018 20:43:05 +0000 (14:43 -0600)]
Merge pull request #20681 from liewegas/wip-fork-vs-msgr

common,rbd-nbd: fix up prefork behavior vs AsyncMessenger singletons

Reviewed-by: Haomai Wang <haomai@xsky.com>
7 years agoMerge pull request #17530 from smithfarm/wip-21264
Nathan Cutler [Tue, 6 Mar 2018 14:22:20 +0000 (15:22 +0100)]
Merge pull request #17530 from smithfarm/wip-21264

tools: cleanup: rip out ceph-rest-api

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge PR #20688 into wip-sage-testing-20180306.131906
Sage Weil [Tue, 6 Mar 2018 13:19:46 +0000 (07:19 -0600)]
Merge PR #20688 into wip-sage-testing-20180306.131906

* refs/pull/20688/head:
doc: Drop the output of pg query
doc: Update Monitoring OSDs and PGs

Reviewed-by: Lenz Grimmer <lgrimmer@suse.com>
Reviewed-by: Sage Weil <sage@redhat.com>
7 years agogithubmap: update contributors
Sage Weil [Tue, 6 Mar 2018 13:19:45 +0000 (07:19 -0600)]
githubmap: update contributors

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #20718 from ceph/wip-rm23163
Alfredo Deza [Tue, 6 Mar 2018 13:04:46 +0000 (08:04 -0500)]
Merge pull request #20718 from ceph/wip-rm23163

ceph-volume tests alleviate libvirt timeouts when reloading

Reviewed-by: Andrew Schoen <aschoen@redhat.com>
7 years agoMerge pull request #20726 from b-ranto/wip-doc-upgrade
Kefu Chai [Tue, 6 Mar 2018 11:47:41 +0000 (19:47 +0800)]
Merge pull request #20726 from b-ranto/wip-doc-upgrade

build-doc: Upgrade ceph python libraries

Reviewed-by: Kefu Chai <kchai@redhat.com>