Commit Graph

31396 Commits

Author SHA1 Message Date
Loic Dachary
fdc967d8f3 pybind: cosmetic changes to tests
* untabify
* re-indent
* 2014 to copyright notice

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:16:23 +01:00
Loic Dachary
ad09023e1b pybind: fix tests that do not fail as expected
A missing argument make the test fail indeed, but the intended test is
to demonstrate something else ( either character validation or excess of
arguments etc. ). The result is {} instead of None which is what should
have been expected in the first place.

Ideally there would be a more verbose way to check for syntactic errors
to make such mistakes less probable.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:26 +01:00
Loic Dachary
cb39b13676 mon: osd crush rule create-erasure
Delegates the creation of the rule to the erasure code plugin associated
with the specified pool.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:26 +01:00
Loic Dachary
1acc73bb09 mon: compute the ruleset of erasure-coded pools
The default ruleset of an erasure coded pool may depend on the
parameters used to configure it. In the case of a pyramidal /
hierarchical plugin, the desired ruleset will, for instance, chose from
datacenters and then from racks and disperse local coding chunks among
them.

For this reason the default ruleset cannot be hardcoded in config_opts
as it is for replicated pools. Instead, the "crush_ruleset" property is
interpreted to be the name of an existing crush ruleset to be used.

If the corresponding ruleset is found in a pending crushmap, the
prepare_pool_crush_ruleset will return EAGAIN. The "osd pool create"
caller is modified to handle the EAGAIN error and reschedules the message.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:26 +01:00
Loic Dachary
8259e51d46 mon: compute the size of erasure-coded pools
It is K+M ( data chunks + coding chunks ) as returned by the
get_chunk_count() method of the erasure code plugin.

http://tracker.ceph.com/issues/7277 refs #7277

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:26 +01:00
Loic Dachary
caefb8a29a mon: erasure code plugin loader helper
The get_erasure_code helper loads the erasure code plugin found in the
erasure-code-plugin string of the properties argument. It is meant to be
used to query the plugin to determine the desired size of a pool, the
more suitable ruleset to use etc.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:26 +01:00
Loic Dachary
61c45fe03d mon: pool create helper for crush ruleset
The crush ruleset of the replicated pools are by default set to
osd_pool_default_crush_replicated_ruleset but it may vary depending on
the pool type. Create a helper to compute the crush ruleset.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:26 +01:00
Loic Dachary
6caac92c7e mon: pool creation helper for size
The size of the replicated pools are by default set to
osd_pool_default_size but it may vary depending on the pool type. Create
a helper to compute the pool size.

http://tracker.ceph.com/issues/7277 refs #7277

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:26 +01:00
Loic Dachary
9d766cabdc mon: no default ruleset except for replicated pools
Remove the hardcoded default ruleset for erasure coded pools and only
keep it for replicated pools. Move the logic up in the  prepare_new_pool
method so that an error code can be returned before allocating the new
pending pool in case the ruleset is not initialized.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:25 +01:00
Loic Dachary
0cac20251a mon: helper for pool properties parsing
Add the prepare_pool_properties to convert the properties vector into a
properties map suitable for either initializing the pg_pool_t member or
an erasure code plugin.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:25 +01:00
Loic Dachary
cc66c6a01d erasure-code: test ErasureCodeJerasure::create_ruleset
Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:25 +01:00
Loic Dachary
02869f8d6a erasure-code: implement ErasureCodeJerasure::create_ruleset
It is based on CrushWrapper::add_simple_ruleset, using a "default" root
and "host" failure domain by default. They can be overridden with
erasure-code parameters ( erasure-code-ruleset-root and
erasure-code-ruleset-failure-domain respectively ).

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:25 +01:00
Loic Dachary
f019c906b6 erasure-code: implement example create_ruleset
And the associated unit tests.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:25 +01:00
Loic Dachary
6ca9b24693 erasure-code: add crush ruleset creation API
Because only the erasure code plugin knows enough to create a ruleset
that is best suited for a given set of parameters.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:25 +01:00
Loic Dachary
2dca7371c9 erasure-code: the plugin is in a convenience library
So that it can be used by mon without linking with libosd

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 08:06:25 +01:00
Sage Weil
a8fcffb9ad Merge remote-tracking branch 'gh/next' 2014-02-03 22:20:47 -08:00
Sage Weil
e47e49d23a doc/release-notes: v0.77 draft notes
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-03 21:55:45 -08:00
Sage Weil
2c504ea122 doc/release-notes: v0.76
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-03 21:40:59 -08:00
Sage Weil
60ca6f699b client: fix warnings
client/Client.cc: In member function 'int Client::_read(Fh*, int64_t, uint64_t, ceph::bufferlist*)':
warning: client/Client.cc:5893:27: comparison between signed and unsigned integer expressions [-Wsign-compare]
client/Client.cc: In member function 'int Client::_write(Fh*, int64_t, uint64_t, const char*)':
warning: client/Client.cc:6235:30: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-03 21:12:41 -08:00
Josh Durgin
1829d2c9fd librados: add timeout to wait_for_osdmap()
This is used by several pool operations independent of the objecter,
including rados_ioctx_create() to look up the pool id in the first
osdmap.

Unfortunately we can't just rely on WaitInterval returning ETIMEDOUT,
since it may also get interrupted by a signal, so we can't avoid
keeping track of time explicitly here.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-03 19:00:20 -08:00
Josh Durgin
0dcceff137 conf: add options for librados timeouts
These will be implemented in subsequent patches.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-03 18:57:33 -08:00
Sage Weil
a23a2c8f01 os/KeyValueStore: fix warning
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-03 17:50:32 -08:00
Sage Weil
8e30db8f2a rest: add a few rest api tests
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-03 17:50:32 -08:00
Sage Weil
eb9ffd5a79 mon: use 'mds set inline_data ...' for enable/disable of inline data
This makes the management interface a bit more consistent.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-03 17:50:32 -08:00
Sage Weil
408b0c8e75 mon: fix 'mds set allow_new_snaps'
We had already added this as a flag (set/unset) when I generalized the
'mds set_max_mds' to be 'ceph mds set <var> <val>'.  Switch the snaps
flag to be a key/value to with true/false (similar to the hashpspool
pool flag) since there are fewer users and the var/val approach is more
general.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-02-03 17:50:18 -08:00
Sage Weil
33338c5ceb Merge pull request #1179 from dachary/wip-force-proposal
mon: do not force proposal when no osds

Backport: emperor, dumpling
Reviewed-by: Sage Weil <sage@inktank.com>
2014-02-03 16:37:00 -08:00
Loic Dachary
e5ed1b2998 mon: do not force proposal when no osds
If there are no OSDs, there is no need to propose to paxos. It does not
hurt on a production cluster but it matters when running tests because
it effectively alway ignores --paxos-propose-interval.

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 01:25:15 +01:00
Gregory Farnum
9f4edb611e Merge pull request #1151 from ceph/wip-performance-configs
Performance improvements and config options

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-03 15:06:12 -08:00
Ken Dreyer
f9b9f52420 Merge branch 'next' 2014-02-03 22:39:26 +00:00
Ken Dreyer
3b990136bf v0.76 2014-02-03 18:26:25 +00:00
Sage Weil
7ff2b541c2 client: use 64-bit value in sync read eof logic
The file size can jump to a value that is very much larger than our current
position (for example, it could be a disk image file that gets a sparse
write at a large offset).  Use a 64-bit value so that 'some' doesn't
overflow.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: John Spray <john.spray@inktank.com>
2014-02-03 08:54:14 -08:00
Sage Weil
e4ff4720d5 Merge remote-tracking branch 'gh/next'
Conflicts:
	src/mon/OSDMonitor.cc
	src/osd/OSDMap.h
2014-02-02 09:40:11 -08:00
Sage Weil
29eac1d14e Merge remote-tracking branch 'gh/wip-inline'
Passed fs suite, sage-2014-02-01_22:18:10-fs-wip-inline-testing-basic-plana,
modulo a snap test error in the suite.

Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-02-02 09:16:06 -08:00
Sage Weil
9c3a4d8af6 Merge pull request #1165 from mo22/client_fuse_multithreading
client: ceph-fuse use fuse_session_loop_mt to allow multithreaded operat...

Reviewed-by: Sage Weil <sage@inktank.com>
2014-02-01 21:00:41 -08:00
Somnath Roy
684e5c4576 Pipe, cephx: Message signing under config option
The config option was present earlier but the option is checked
not in the beginning, so, it was doing some stuff. Now the config
option guard is at the very beginning of the function.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-31 15:54:40 -08:00
Somnath Roy
5fde828dac cmp.h: boost tuple comparison is replaced by regular comparison
Profiler was showing this boost tuple comparison is expensive.
So, it is replaced by regular comparison.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-31 15:54:40 -08:00
Greg Farnum
8e19488859 TrackedOp: optionally disable the actual tracking operations
To avoid op contention on global locks, optionally disable the
op tracking. Create an "osd_op_tracker" config to control it, then
in the OpTracker constructor set a bool. If it's set, the OpTracker
doesn't actually maintain its lists and avoids taking any locks. We
maintain the within-op tracking for now since it shouldn't contend,
but we can turn that off later on if we like.

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-31 15:54:40 -08:00
Somnath Roy
98ae0592ed Throttle: Turn off throttle based on max bytes
If max throttle bytes is 0, throttle should not be doing anything.
This check is introduced in the beginning of each throttle function

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-31 15:54:40 -08:00
Greg Farnum
03f7f771d6 Throttler: optionally disable use of perfcounters
These can be expensive enough that we want to disable them. We're already
mostly set up for it to be optional, so just plug in a config option and
move a timestamp read under the "if (logger)" guard to set it up!

Signed-off-by: Greg Farnum <greg@inktank.com>
2014-01-31 15:54:40 -08:00
Samuel Just
ee48c871d6 common/shared_cache.hpp: compact to a single lookup where possible
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-01-31 15:54:40 -08:00
Samuel Just
27b5f2b873 common/shared_cache.hpp: avoid list::size()
Signed-off-by: Samuel Just <sam.just@inktank.com>
2014-01-31 15:54:40 -08:00
John Wilkins
b717e11b52 Merge pull request #1174 from alram/master
doc: rgw: el6 documentation fixes
2014-01-31 14:20:37 -08:00
Alexandre Marangone
ee4cfda151 doc: rgw: el6 documentation fixes
- fix a couple of typo for repo configuration and service restart
- the ceph package must be installed on RPM distro since the init
script relies on ceph-conf
- Note on radosgw service name for RPM distro

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
2014-01-31 13:55:55 -08:00
David Zafman
dffe6019c3 Merge pull request #1162 from ceph/wip-5997
Fixes: #5997

 Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-01-31 12:35:56 -08:00
David Zafman
48fbccece5 osd: Change some be_compare_scrub_objects() args to const
Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-01-31 11:00:22 -08:00
David Zafman
ce1ea619f6 osd: Change be_scan_list() arg to const
Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-01-31 11:00:22 -08:00
David Zafman
e1bfed52f9 common: buffer::ptr::cmp() is a const function
Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-01-31 11:00:22 -08:00
David Zafman
34eb549cd4 osd: Move the rest of scrubbing routines to the backend
Move enum scrub_error_type to osd_types.h
Move PG::_compare_scrub_objects to ReplicatedBackend::be_compare_scrub_objects
Move PG::_select_auth_object to ReplicatedBackend::be_select_auth_object
Move PG::_compare_scrubmaps to ReplicatedBackend::be_compare_scrubmaps

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-01-31 11:00:22 -08:00
David Zafman
f9128e89a3 osd: Move PG::_scan_list() to backend as ReplicatedBackend::be_scan_list()
Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-01-31 11:00:22 -08:00
David Zafman
37447e758e osd: Add scrub_supported() backend interface
Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-01-31 11:00:22 -08:00