Commit Graph

75669 Commits

Author SHA1 Message Date
Jason Dillaman
04cf38cc15 osd: support cmpext operation on EC-backed pools
The forthcoming RBD compare_and_write operation needs to
support this operation when blocks are stored on an EC
pool.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-07-21 09:35:04 -04:00
wangzhengyong
15ab53fcb7 osd: fix cmpext bug
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-21 09:35:04 -04:00
Jason Dillaman
732a9504cb osd: migrated async reads to op finisher
Once an async read completes, the OpContext is re-executed.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-07-21 09:35:03 -04:00
Jason Dillaman
c4f4689c45 osd: generic async operation finisher handler
The COPY_FROM operation has a custom data path for restarting
itself after the read has completed. The CMPEXT operation will
need similar restart handling when running on EC pools so that
it can guard ops after an async read completes.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-07-21 09:35:03 -04:00
Jason Dillaman
fa220bdda1 osd: OpContext ops should be passed as a pointer instead of reference
It's currently being provided a bogus memory reference by 'simple_opc_create'.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-07-21 09:35:03 -04:00
Jos Collin
fae6dc4786 Merge pull request #16430 from yuriw/wip_add_luminous
qa: Added luminous to the mix in schedule_subset.sh

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
2017-07-21 12:11:29 +00:00
John Spray
223c8ce27f Merge pull request #16211 from jcsp/wip-options-jcsp
common: Revamp config option definitions

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-21 13:02:16 +01:00
Jason Dillaman
ee958a5930 Merge pull request #16313 from Songweibin/wip-mirror-peer
rbd: make it more understandable when adding peer returns error

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-07-21 08:00:50 -04:00
Kefu Chai
6a821eea8e Merge pull request #16462 from wjwithagen/wjw-warning-unused-unsetdumpable
common: prevent unset_dumpable from generating warnings

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-21 19:50:45 +08:00
Kefu Chai
4599eb7963 Merge pull request #16454 from liewegas/wip-fix-ceph-scrub
qa/tasks/ceph_manager: wait for osd to start after objectstore-tool sequence

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-21 19:31:19 +08:00
John Spray
b519ed0519 common/options: update for latest added
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:30:27 -04:00
John Spray
85779cba67 common: fix erasure_code_dir definition
This was missing its `safe` flag, causing some attempts
to set it during testing to fail.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:30 -04:00
John Spray
7267065cdf test: use config set_val_or_die instead of set_val
...in places that the return code was not being checked.

This fixes cases where an error in the config schema or the
value being passed in would cause weird failures beacuse the
set_val had not taken effect.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-21 06:27:30 -04:00
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