Commit Graph

31330 Commits

Author SHA1 Message Date
Josh Durgin
db034acf54 ObjectCacher: use uint64_t for target and max values
All the options are uint64_t, but the ObjectCacher was converting them
to int64_t. There's never any reason for these to be negative, so
change the type.

Adjust a few conditionals so that they only convert known-positive
signed values to uint64_t before comparing with the target and max
values. Leave the actual stats accounting as loff_t for now, since
bugs in accounting will have bad effects if negative values wrap
around.

Backport: emperor, dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-11 12:06:20 -08:00
Josh Durgin
bf8cf2d6d2 ObjectCacher: remove max_bytes and max_ob arguments to trim()
These are never passed, so replace them with the defaults.

Backport: emperor, dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-11 12:06:10 -08:00
John Wilkins
576465faca Merge pull request #1209 from fghaas/master
doc: highlight that "raw" is the only useful RBD format for QEMU
2014-02-10 15:52:31 -08:00
Florian Haas
9292cc215a doc: highlight that "raw" is the only useful RBD format for QEMU
Explain why people should be using the "raw" image format for RBD
volumes created for use by QEMU: using any other format adds only
overhead, but no extra value (since RBDs are also CoW and
thin-provisioned), plus the Qcow2 storage driver is not migration safe
when caching is enabled, whereas the RBD driver is.

Also, fix a minor glitch in the example qemu-img commands ("-f rbd"
and "-O rbd" should really be "-f raw" and "-O raw").

Finally, drop the "-f" option altogether on qemu-img commands where it
makes no sense (info and resize).

Signed-off-by: Florian Haas <florian@hastexo.com>
2014-02-11 00:30:07 +01:00
Josh Durgin
32aa9fdf66 Merge branch wip-librados-timeout
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
2014-02-10 14:12:35 -08:00
Josh Durgin
af5d0fcd90 Merge pull request #1205 from ceph/wip-7334
use `partx` for CentOS/RHEL instead of `partprobe`
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-10 13:09:40 -08:00
Josh Durgin
78240c266a Merge pull request #1204 from ceph/wip-fsetpipesz-fix
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-10 12:59:03 -08:00
Josh Durgin
9e62beb80b qa: add script for testing rados client timeout options
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-10 12:53:12 -08:00
Josh Durgin
79c1874346 rados: check return values for commands that can now fail
A few places were not checking the return values of commands, since
they could not fail before timeouts were added.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-10 12:53:12 -08:00
Josh Durgin
8e9459e897 librados: check and return on error so timeouts work
Some functions could not previously return errors, but they had an
int return value, which can now receive ETIMEDOUT.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-10 12:53:12 -08:00
Josh Durgin
d389e617c1 msg/Pipe: add option to restrict delay injection to specific msg type
This makes it possible to test timeouts reliably by delaying certain
messages effectively forever, but still being able to e.g. connect and
authenticate to the monitors.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-10 12:53:12 -08:00
Josh Durgin
671a76d64b MonClient: add a timeout on commands for librados
Just use the conf option directly, since librados is the only caller.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-10 12:53:11 -08:00
Josh Durgin
3e1f7bbb42 Objecter: implement mon and osd operation timeouts
This captures almost all operations from librados other than mon_commands().

Get the values for the timeouts from the Objecter constructor, so only
librados uses them.

Add C_Cancel_*_Op, finish_*_op(), and *_op_cancel() for each type of
operation, to mirror those for Op. Create a callback and schedule it
in the existing timer thread if the timeouts are specified.

Fixes: #6507
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-10 12:53:11 -08:00
Alfredo Deza
9bcc42a3e6 alert the user about error messages from partx
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
2014-02-10 15:09:39 -05:00
Alfredo Deza
42900ff9da use partx for red hat or centos instead of partprobe
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
2014-02-10 15:09:18 -05:00
Sage Weil
2c5783cc6c Merge remote-tracking branch 'gh/next' 2014-02-10 10:19:55 -08:00
Ilya Dryomov
6926272056 common/buffer: fix build breakage for CEPH_HAVE_SETPIPE_SZ
common/buffer.cc fails to build if CEPH_HAVE_SETPIPE_SZ is defined.
Fix it.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-02-10 19:37:30 +02:00
Ilya Dryomov
a5f479c2aa configure: fix F_SETPIPE_SZ detection
Currently CEPH_HAVE_SETPIPE_SZ is not set even if F_SETPIPE_SZ is
available, because AC_COMPILE_IFELSE test program as written always
fails to compile.  F_SETPIPE_SZ is a macro, so use AC_EGREP_CPP which
works on the preprocessor output instead of trying to compile.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-02-10 19:37:30 +02:00
Ilya Dryomov
450163ec40 configure: don't check for arpa/nameser_compat.h twice
Nuke redundant check and move the real one into the common
AC_CHECK_HEADERS stanza.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-02-10 19:37:30 +02:00
Sage Weil
39b393d7fa Merge remote-tracking branch 'gh/wip-7329' into next 2014-02-09 10:37:47 -08:00
Sage Weil
575566b168 ceph_test_rados_api_tier: try harder to trigger the flush vs try-flush race
It seems to be reasonable easy to complete a flush before the next client
request is processed.  Crazy...

Same with the flush vs write race.

Fixes: #7329
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-08 20:20:21 -08:00
Loic Dachary
270714d54e Merge pull request #1201 from ceph/wip-7370
crush: fix tries/retries bug that was recently introduced

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-02-09 01:12:46 +01:00
Loic Dachary
7fe10f1271 Merge pull request #1115 from jcsp/tell_cleanup
Remove some almost-duplicate COMMAND definitions

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-02-09 00:58:39 +01:00
Loic Dachary
cf2d71cef5 Merge pull request #1127 from dmsimard/log_links
Doc: Fix 404 broken links to logging and debug configuration

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
2014-02-09 00:33:42 +01:00
Sage Weil
f17caba8ae crush: allow crush rules to set (re)tries counts to 0
These two fields are misnomers; they are *retry* counts.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-08 12:23:05 -08:00
Sage Weil
795704fd61 crush: fix off-by-one errors in total_tries refactor
Back in 27f4d1f6bc we refactored the CRUSH
code to allow adjustment of the retry counts on a per-pool basis.  That
commit had an off-by-one bug: the previous "tries" counter was a *retry*
count, not a *try* count, but the new code was passing in 1 meaning
there should be no retries.

Fix the ftotal vs tries comparison to use < instead of <= to fix the
problem.  Note that the original code used <= here, which means the
global "choose_total_tries" tunable is actually counting retries.
Compensate for that by adding 1 in crush_do_rule when we pull the tunable
into the local variable.

This was noticed looking at output from a user provided osdmap.
Unfortunately the map doesn't illustrate the change in mapping behavior
and I haven't managed to construct one yet that does.  Inspection of the
crush debug output now aligns with prior versions, though.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-08 12:21:33 -08:00
Sage Weil
ed32c4002f crushtool: add cli test for off-by-one tries vs retries bug
See bug #7370.  This passes on dumpling and breaks prior to the #7370 fix.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-08 12:21:26 -08:00
Sage Weil
5bc8e9e402 Merge remote-tracking branch 'gh/next' 2014-02-08 08:23:12 -08:00
Sage Weil
75c55258f1 qa/workunits/rest: use larger max_file_size
64k is the min.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-08 08:22:29 -08:00
tamil
3d656600e9 script to test rgw multi part uploads using s3 interface
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
(cherry picked from commit 5d59dd9cd6)
2014-02-07 22:27:05 -08:00
tamil
5d59dd9cd6 script to test rgw multi part uploads using s3 interface
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2014-02-07 22:15:11 -08:00
tamil
d4e5db58fa Merge branch 'next' of github.com:ceph/ceph into next 2014-02-07 17:10:10 -08:00
tamil
0bac064e90 added script to test rgw user quota
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2014-02-07 17:09:30 -08:00
tamil
0f2386a102 script to test rgw user quota functionality
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2014-02-07 15:34:05 -08:00
Gregory Farnum
b04ae1341f Merge pull request #1197 from ceph/wip-osdmap-primary
osd/OSDMap: populate *primary when pool dne

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-02-07 10:21:40 -08:00
Sage Weil
3a5fa8765f osd/OSDMap: populate *primary when pool dne
This fixes a valgrind error from OSD::handle_osd_map where primary is not
initialized and is compared after the call to pg_to_acting_osds().

We are still not distinguishing from "no mapping" to "pool doesn't exist,
no mapping".  That is a somewhat larger change, though.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-07 09:38:37 -08:00
Gregory Farnum
4cca38ca66 Merge pull request #1173 from ceph/wip-7109
Fix #7109: Prevent removal of default data pool

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-02-07 09:26:38 -08:00
Yehuda Sadeh
5b7e2b2297 rgw: initialize variable before call
Need to initialize the truncated variable, as we sometimes ignore error
response (e.g., with ENOENT), and in such cases we can't expect it to be
set.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 9ecf3467a3)
2014-02-07 08:43:47 -08:00
Sage Weil
ebe505b929 Merge pull request #1191 from ceph/wip-rgw-vg
rgw: initialize variable before call

Revewed-by: Sage Weil <sage@inktank.com>
2014-02-07 08:43:21 -08:00
Loic Dachary
ed438aaaf2 Merge pull request #1194 from dachary/wip-erasure-code-directory
erasure code directory

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
2014-02-07 17:10:29 +01:00
Sage Weil
0e9adf7343 Merge pull request #1178 from ceph/wip-osdmaptool
osdmaptool: add --test-map-pgs mode

Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
2014-02-07 07:12:11 -08:00
Loic Dachary
45d31f09a2 osdmaptool: tests for --test-map-pgs
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-07 07:10:19 -08:00
Loic Dachary
b98eaa5cc0 osdmaptool: test --import/export-crush
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-07 07:10:19 -08:00
Loic Dachary
7c31036842 osdmaptool: s/simple.t/missing-argument.t/
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-07 07:10:18 -08:00
Sage Weil
362825c4a0 osdmaptool: fix cli tests
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-07 07:10:18 -08:00
Sage Weil
9caaef716f osdmaptool: allow a completely random placement
This useful for comparison purposes and sanity-checking the results.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-07 07:10:13 -08:00
Sage Weil
7f1b12f2ef osdmaptool: add --test-map-pgs mode
This command will map all pgs from all pools (or just one pool) to osds
and summarize the placement and calculate the actual standard deviation and
the expected value.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-07 07:10:13 -08:00
Sage Weil
bb6d3f81a7 rest/test.py: use larger max_file_size for mds set test
Current min is 64k.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-07 06:11:57 -08:00
David Zafman
42a64e19b7 Revert test case of "mon: OSDMonitor: do not allow changing an erasure-coded pool's size"
This reverts part of commit c8c4cc6e81.

Fixes: #7355

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-02-06 19:13:20 -08:00
Loic Dachary
fc963acfb6 erasure-code: move test files to a dedicated directory
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-06 11:28:52 +01:00