Commit Graph

75651 Commits

Author SHA1 Message Date
John Spray
4340f4b6c6 common/options: fix overflowing 64 bit literals
This manifested as a failure in objectstore tool test_fuse.sh

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:30 -04:00
John Spray
55989f5853 test: update daemon_config.cc for conf changes
This was only partially updated in previous commits
for --num-clients, --num-open-files.

Also update int validation test to reflect that values
are now 64 bit internally.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:29 -04:00
John Spray
e7d66bd3d9 common: update options.cc for latest master
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:29 -04:00
John Spray
be2136cd34 common: fix Option::is_safe
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:29 -04:00
John Spray
54740dd568 common: remove usage of set_daemon_default for now
The code in common_preinit is still there to override
these settings as appropriate.

The set_daemon_default stuff was breaking ceph-conf tests (because
you would get the client-side defaults when asking about an OSD's
settings), and md_config_t isn't properly identifying daemons
using code_env yet.

Ticket to add it back in:
http://tracker.ceph.com/issues/20627

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:29 -04:00
John Spray
b0fbd7151c common: run validator on all defaults
RBD relies on this behaviour to get the int-ized
form for rbd_default_features.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:29 -04:00
John Spray
7cde2e51e4 rgw: set mins on options to avoid unneeded max()
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:29 -04:00
John Spray
c3ba6ce588 common: update options.cc for master
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:28 -04:00
John Spray
1411953083 common: move validation in Option and add a test
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:28 -04:00
John Spray
291a7f597d test: update md_config_t unit test
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:28 -04:00
John Spray
a3054ef0d9 common: revert public_addr setting to a string
This was a string in the old schema, and tests
depended on that -- if we want to change its type
let's do that separately to the infrastructure changes.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:28 -04:00
John Spray
1e9b62c1b6 tools: avoid max() calls on rbd config options
These were awkward for typing of the '1' literal vs.
the int64_t settings.  The whole max() thing is also
unnecessary now, if we set proper bounds on the option
definitions.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:28 -04:00
John Spray
0f04dab0b7 common/options: separate "service" from "tags"
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:27 -04:00
John Spray
3f99f6ef20 common: enforce min/max/enum on config options
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:27 -04:00
John Spray
5b9a6a6d42 include/uuid: give uuid_d a < comparator
This is only there so that a variant<> containing
a uuid (amongst other types) can have operator< acting on it.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:27 -04:00
John Spray
f777599baa common: update options.cc for latest additions
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:27 -04:00
John Spray
c74b2d9fc7 mon: implement config set
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:27 -04:00
John Spray
a1cf36bfc0 mds: implement config set
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:27 -04:00
John Spray
33d6a2d974 osd: implement config set
This is a friendlier replacement for injectargs.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:26 -04:00
John Spray
48c6d34418 common: pass up error strings from set_val
This is so that we can use it as a replacment
for the ugly injectargs.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:26 -04:00
John Spray
241a547ba1 common: implement "config help" to output schema
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:26 -04:00
John Spray
5e8b37245e rgw: treat config ints as 64 bit
In the new world, all int config values are 64 bit.  When
doing a min() like this, need both sides in the same type.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:26 -04:00
John Spray
b41dc4108e common: respect daemon defaults in config options
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:26 -04:00
John Spray
72d42de9d0 common: re-add unsigned config option type
As long as some options are being consumed
via md_config_t:: members, various users
of (unsigned) int values will get compile warnings
when they e.g. compare them with other unsigned values.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:25 -04:00
John Spray
3933adef6a common: reinstate config opt validators
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:25 -04:00
John Spray
c1a6b497fb common: sync up options.cc with latest master
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:25 -04:00
John Spray
08731c3567 common/config: hook in new Option config descriptions
The C++ class member fields continue to exist for
settings defined in common/legacy_config_opts.h, but
all the schema information is coming from common/options.cc
now.

The values in md_config_t::values are automatically
copied into the C++ class member fields for legacy config
options as needed.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:25 -04:00
John Spray
f7b2179685 log/SubsystemMap: return a size_t from get_num
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:25 -04:00
John Spray
5e17c2889f mgr: tighten initialization of keyring setting
We should not proceed if setting this fails.  Also
the meta=false setting is not what you want when
calling into set_val after initialization, I'm not sure
how that ever worked!

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:24 -04:00
John Spray
10f33a1bdd common: separate config opts definitions from subsys definitions
Previously these were all in one header and inclusions of it
got really verbose from everyone having to define SUBSYS and OPTION
macros even though they only wanted to pick out one or the other.

Also, this separates the subsys.h stuff (staying) from the legacy
config opt definitions (transitional, will go).

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:24 -04:00
John Spray
73086f1e4c common: remove ::validate definitions
These will be replaced by validate methods
on Option subclasses that need them.  The code
that was in these files moved to options.[h|cc]

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:24 -04:00
John Spray
f1ac8dc7a4 common: hook in 'safe' flag to new config options
It's a poor substitute for real a concurrency solution
but for the moment carry it forward so that the options
structure can replace the list of config_option
in md_config_t.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:24 -04:00
John Spray
a5244f7c67 common: s/config_opts/legacy_config_opts/
Name change reflects that newly added config opts
don't need to go here.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:24 -04:00
John Spray
4aa5f35b8c common: use a vector instead of array in options.cc
Avoids retro 80s style blank entry at the end :-)

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:24 -04:00
John Spray
26551776f2 common: rip out option code generation bit
We can have a legacy (static field) config object
that includes fields from config_opts.h, and
then switch to using dynamic get() for newly
added options, so that we don't need to do
code generation for the new config infrastructure.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:23 -04:00
Sage Weil
6829384546 g++ ../src/convert.cc -o cv -I../src -I.
./cv > /tmp/foo
...and copy that into options.cc
bin/generate_option_header > ../src/common/config_fields.h

Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-21 06:27:23 -04:00
Kefu Chai
bc3930a139 common/options: more constness
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-07-21 06:27:23 -04:00
Kefu Chai
2c6669c5a4 common/options: specialize on non bool integeral types
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-07-21 06:27:23 -04:00
Sage Weil
fe1c592c8c common/options: new options infrastructure
Define schema for config options.  Helper to generate a header fragment
to declare the types.

Unlike the old config_opts.h approach, we will not intialize values in
the header.  This avoids a recompile if there is a change and also allows
us to specify different defaults and do parsing and validation at runtime.
Instead, we'll intialize values in the constructure of the containing
class.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-21 06:27:23 -04:00
Sage Weil
8463894575 common: remove max_open_files config option
The only user is init-ceph, and it can get at it via ceph-conf without
the option being declared here.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-21 06:27:22 -04:00
Sage Weil
03ef427b31 ceph-syn: parse --num-client locally; remove global option
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-21 06:27:22 -04:00
Kefu Chai
0193e38b3f Merge pull request #16028 from jcsp/wip-mgr-commands
mon: load mgr commands at runtime

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-21 18:16:13 +08:00
Kefu Chai
d76b376e78 Merge pull request #16415 from xiexingguo/wip-health-mon
mon: a few health fixes

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-21 18:12:31 +08:00
Kefu Chai
73186686e9 Merge pull request #16409 from liupan1111/wip-restructure-bs
os/bluestore: move aio.h/cc from fs dir to bluestore dir

Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-21 16:55:38 +08:00
Kefu Chai
41c59530c1 Merge pull request #16328 from neha-ojha/recovery_sleep_default
osd: Add recovery sleep configuration option for HDDs and SSDs

Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-21 16:55:02 +08:00
Kefu Chai
2c9b2b1fe6 Merge pull request #16470 from tchaikov/wip-watch-audit-channel
qa/workunits/cephtool/test.sh: fix test to watch audit channel

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-21 13:41:43 +08:00
Sage Weil
6c4992aeca qa/workunits/cephtool/test.sh: fix test to watch audit channel
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-21 11:40:48 +08:00
Sage Weil
27e8d75f61 Merge pull request #16429 from liewegas/wip-jewel-x
qa/suites/upgrade/jewel-x: misc fixes for new health checks
2017-07-20 10:47:05 -05:00
Sage Weil
ed48ed1b74 Merge pull request #16374 from majianpeng/bluestore-double-count-kv-queue-lat
os/bluestore/BlueStore: Avoid double counting state_kv_queued_lat.

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-20 10:44:40 -05:00
Sage Weil
3de9f22ce0 Merge pull request #16423 from liewegas/wip-ls
mon: '* list' -> '* ls'

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-20 10:43:34 -05:00