Commit Graph

24604 Commits

Author SHA1 Message Date
Joe Buck
09fa711093 testing: fix hadoop-internal-tests
The hadoop-internal-tests workunit needs
to be updated in light of our moving to
using stock Hadoop with our hadoop-cephfs
jars.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-03-11 23:41:27 -07:00
Sage Weil
936b8f20af ceph-disk-activate: rely on default/configured keyring path
No reason to override the default or configured value here.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-11 21:15:11 -07:00
Sage Weil
813e9fe2b4 ceph-disk-activate: don't override default or configured osd journal path
There is no reason not to rely on the default or obey any configured
value here.

Fixes: #4031
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-11 21:14:53 -07:00
Josh Durgin
82677c38b7 Merge branch 'next' 2013-03-11 16:59:05 -07:00
Josh Durgin
1ac8f6abaf Merge branch 'wip-rbd-flatten-cache' into next
Reviewed-by: Sage Weil <sage.weil@inktank.com>
2013-03-11 16:57:47 -07:00
Sage Weil
9eb0d91b86 debian: stop ceph-mds before uninstalling ceph-mds
Fixes: #4384
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-11 17:09:37 -07:00
Sage Weil
f2a877ad0d Merge remote-tracking branch 'gh/next' 2013-03-11 16:57:00 -07:00
Sage Weil
c021c5ccf0 log: drop default 'log max recent' from 100k -> 10k
Use less memory.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-11 16:25:16 -07:00
Josh Durgin
46e8fc00b2 librbd: invalidate cache when flattening
The cache stores which objects don't exist. Flatten bypasses the cache
when doing its copyups, so when it is done the -ENOENT from the cache
is treated as zeroes instead of 'need to read from parent'.

Clients that have the image open need to forgot about the cached
non-existent objects as well. Do this during ictx_refresh, while the
parent_lock is held exclusively so no new reads from the parent can
happen until the updated parent metadata is visible, so no new reads
from the parent will occur.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-11 15:49:55 -07:00
Josh Durgin
f2a23dc0b0 ObjectCacher: add a method to clear -ENOENT caching
Clear the exists and complete flags for any objects that have exists
set to false, and force any in-flight reads to retry if they get
-ENOENT instead of generating zeros.

This is useful for getting the cache into a consistent state for rbd
after an image has been flattened, since many objects which previously
did not exist and went up to the parent to retrieve data may now exist
in the child.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-11 15:49:46 -07:00
Josh Durgin
f6f876fe51 ObjectCacher: keep track of outstanding reads on an object
Reads always use C_ReadFinish as a callback (and they are the only
user of this callback). Keep an xlist of these for each object, so
they can remove themselves as they finish. To prevent racing requests
and with discard removing objects from the cache, clear the xlist in
the object destructor, so if the Object is still valid the set_item
will still be on the list.

Make the ObjectCacher constructor take an Object* instead of the pool
and object id, which are derived from the Object* anyway.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-11 15:44:32 -07:00
Sage Weil
c48c76ffa1 ceph: fix cli test
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-11 14:54:55 -07:00
Sage Weil
2450db1b92 Revert "Use start-stop-daemon --chuid option to setuid to www-data."
This reverts commit a99ed038ec.

On second thought, this will require a bit more care to ensure that all
of the paths radosgw needs to read/write from have the correct permissions
in the packages and so forth.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-11 13:23:13 -07:00
David Zafman
467a95dffb Merge branch 'wip-4135'
Feature: #4135 - osd: noscrub, nodeepscrub osdmap flags

Reviewed-by: Samuel Just <sam.just@inktank.com>
2013-03-11 12:51:25 -07:00
Joao Eduardo Luis
a52c48d639 mon: Paxos: increase trim tolerance from 3 to 30.
This increase only means that we'll keep more versions around before we
trim.  It doesn't change the number of versions we'll keep around after
trimming (that's still as much as 'paxos_max_join_drift', i.e. 10), nor
does it change the criteria used to consider a monitor as having drifted
(same rule applies, 'paxos_max_join_drift').

This change however will enable the leader to put off trimming for a longer
period of time, giving a better chance for a monitor to join the cluster.
See, after going through the probing phase, at which point a monitor may
only be, say, 5 versions off, the same monitor may end up getting into the
quorum only to find that in-between probing and finally triggering an
election some 6 versions might have come to existence.  Before this patch,
by then the state had been trimmed and the monitor would have to bootstrap
to perform a full store sync.  With this patch in place, the monitor would
be able to sync the remaining 11 versions.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-11 12:50:43 -07:00
Joao Eduardo Luis
41987f380f mon: Paxos: bootstrap leader if he has fallen behind upon reaching collect
Fixes: #4256

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-11 12:50:24 -07:00
David Zafman
8ce26eaf02 Document scrubbing behavior
Signed-off-by: David Zafman <david.zafman@inktank.com>
2013-03-11 12:44:47 -07:00
Sage Weil
263bff8d4b Merge pull request #100 from jaharkes/init
Fixes for RadosGW init script

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-11 12:00:52 -07:00
Sage Weil
42d24395f0 Merge pull request #99 from dalgaaf/wip-da-sca-style-3
More smaller (style related) fixes

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-11 12:00:14 -07:00
Sage Weil
25f8d2c685 Merge pull request #91 from Youscribe/defaultweight
Set weight of an osd based on df.

Reviewed-by: Sage Weil <sage@inktank.com>
2013-03-11 09:31:57 -07:00
Jan Harkes
a99ed038ec Use start-stop-daemon --chuid option to setuid to www-data.
Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
2013-03-11 12:26:02 -04:00
Jan Harkes
44f1cc5bc4 Fix radosgw actually reloading after rotating logs.
The --signal argument to Debian's start-stop-daemon doesn't
make it send a signal, but defines which signal should be send
when --stop is specified.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
2013-03-11 12:26:02 -04:00
Danny Al-Gaaf
c846e5c074 rgw/rgw_op.cc: remove unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 16:31:15 +01:00
Danny Al-Gaaf
7e65048765 rgw/rgw_op.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 16:28:02 +01:00
Danny Al-Gaaf
6f85287419 rgw/rgw_multi_del.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 16:25:49 +01:00
Danny Al-Gaaf
f87b4ea26b rgw/rgw_multi.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 16:23:05 +01:00
Danny Al-Gaaf
7ed6fe88d8 rgw/rgw_http_client.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 16:19:04 +01:00
Danny Al-Gaaf
b322024ec0 rados_sync.cc: fix typo in error msg
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 16:10:54 +01:00
Danny Al-Gaaf
8ad58b43b1 rgw/rgw_common.cc: initialize has_acl_header in constructor with 'false'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 16:08:00 +01:00
Danny Al-Gaaf
33f67c9b30 rgw/rgw_admin.cc: remove some unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 16:00:16 +01:00
Danny Al-Gaaf
026575b78c rgw/rgw_admin.cc: reduce scope of 'int ret'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:56:28 +01:00
Danny Al-Gaaf
30938f689c rgw/rgw_admin.cc: remove twice check for 'object'
Remove twice checked 'object'. Put checks in alphabetic order to make
double checks easier to catch.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:52:34 +01:00
Danny Al-Gaaf
9f34cf5822 rgw/rgw_rados.h: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:47:14 +01:00
Danny Al-Gaaf
ece03bc6fa rgw/rgw_acl_s3.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:44:13 +01:00
Danny Al-Gaaf
f106e1a5a7 rgw/rgw_common.h: pass some const variables by reference to 'operator<<'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:35:53 +01:00
Danny Al-Gaaf
b6696822a0 rbd_fuse/rbd-fuse.c: remove consecutive return/break statement
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:31:50 +01:00
Danny Al-Gaaf
fab9ee5076 rbd.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:30:55 +01:00
Danny Al-Gaaf
8720f520ab rados_sync.{cc,h}: pass some const std::string by reference
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:23:15 +01:00
Danny Al-Gaaf
315c8c3ec3 rados_sync.cc: remove unused variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:14:41 +01:00
Danny Al-Gaaf
2b3cef7e1d rados_export.cc: reduce scope of 'int ret' in do_rados_export()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:07:36 +01:00
Danny Al-Gaaf
da51f596a0 src/rados.cc: remove unused variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:05:00 +01:00
Danny Al-Gaaf
965f5d0cfd src/osdmaptool.cc: remove some unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 15:02:09 +01:00
Danny Al-Gaaf
531ff1c052 osdc/Objecter.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 14:58:59 +01:00
Danny Al-Gaaf
0517a2d537 osdc/ObjectCacher.cc: set left to 0 instead off 'left -= left'
Instead of call 'left -= left', which results in 0, set left directly
to 0 and remove not needed assert call 'left == 0'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 14:50:23 +01:00
Danny Al-Gaaf
75531a100e osdc/ObjectCacher.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 14:38:24 +01:00
Danny Al-Gaaf
868447d65d os/FileStore.cc: move variable async_done to the right #ifdef block
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 14:06:10 +01:00
Danny Al-Gaaf
2a94340019 os/FileStore.cc: remove assignment of a never used value
There is no need to set local variable basedir_fd to -1 after
closing and right before leaving the function.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 14:03:27 +01:00
Danny Al-Gaaf
a6f4de924c msg/SimpleMessenger.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 13:45:33 +01:00
Danny Al-Gaaf
637e8e77e5 mon/PGMonitor.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 13:30:04 +01:00
Danny Al-Gaaf
0ed2f377d7 mon/Monitor.cc: Clarify calculation precedence for '%' and '?'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-11 13:25:41 +01:00