]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agotest_libcephfs: fix xattr test
Sage Weil [Wed, 30 Jan 2013 19:32:23 +0000 (11:32 -0800)]
test_libcephfs: fix xattr test

Ignore the ceph.*.layout xattrs.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit b0d4dd21c7be86eb47728a4702a3c67ca44424ac)

12 years agoradosgw-admin: fix cli test
Sage Weil [Fri, 8 Feb 2013 06:51:29 +0000 (22:51 -0800)]
radosgw-admin: fix cli test

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 1b05b0edbac09d1d7cf0da2e536829df05e48573)

12 years agoMerge remote-tracking branch 'gh/wip-bobtail-vxattrs' into bobtail
Sage Weil [Fri, 8 Feb 2013 07:25:30 +0000 (23:25 -0800)]
Merge remote-tracking branch 'gh/wip-bobtail-vxattrs' into bobtail

12 years agomon: enforce reweight be between 0..1
Sage Weil [Mon, 4 Feb 2013 17:14:39 +0000 (09:14 -0800)]
mon: enforce reweight be between 0..1

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
(cherry picked from commit 4e29c95d6f61daa838888840cef0cceedc0fcfdd)

12 years agoPG: dirty_info on handle_activate_map
Samuel Just [Thu, 7 Feb 2013 18:38:00 +0000 (10:38 -0800)]
PG: dirty_info on handle_activate_map

We need to make sure the pg epoch is persisted during
activate_map.

Backport: bobtail
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit dbce1d0dc919e221523bd44e1d0834711da1577d)

12 years agoosd: flush peering queue (consume maps) prior to boot
Sage Weil [Thu, 7 Feb 2013 18:21:49 +0000 (10:21 -0800)]
osd: flush peering queue (consume maps) prior to boot

If the osd itself is behind on many maps during boot, it will get more and
(as part of that) flush the peering wq to ensure the pgs consume them.
However, it is possible for OSD to have latest/recnet maps, but pgs to be
behind, and to jump directly to boot and join.  The OSD is then laggy and
unresponsive because the peering wq is way behind.

To avoid this, call consume_map() (kick the peering wq) at the end of
init and flush it to ensure we are *internally* all caught up before we
consider joining the cluster.

I'm pretty sure this is the root cause of #3905 and possibly #3995.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit af95d934b039d65d3667fc022e2ecaebba107b01)

12 years agorgw: a tool to fix clobbered bucket info in user's bucket list
Yehuda Sadeh [Thu, 7 Feb 2013 01:10:00 +0000 (17:10 -0800)]
rgw: a tool to fix clobbered bucket info in user's bucket list

This fixes bad entries in user's bucket list that may have occured
due to issue #4039. Syntax:

 $ radosgw-admin user check --uid=<uid> [--fix]

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 9cb6c33f0e2281b66cc690a28e08459f2e62ca13)

Conflicts:
src/rgw/rgw_admin.cc

12 years agorgw: bucket recreation should not clobber bucket info
Yehuda Sadeh [Thu, 7 Feb 2013 00:43:48 +0000 (16:43 -0800)]
rgw: bucket recreation should not clobber bucket info

Fixes: #4039
User's list of buckets is getting modified even if bucket already
exists. This fix removes the newly created directory object, and
makes sure that user info's data points at the correct bucket.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 9d006ec40ced9d97b590ee07ca9171f0c9bec6e9)

Conflicts:
src/rgw/rgw_op.cc
src/rgw/rgw_rados.cc

12 years agorgw: a tool to fix buckets with leaked multipart references
Yehuda Sadeh [Tue, 5 Feb 2013 22:50:54 +0000 (14:50 -0800)]
rgw: a tool to fix buckets with leaked multipart references

Checks specified bucket for the #4011 symptoms, optionally fix
the issue.

sytax:
  radosgw-admin bucket check --bucket=<bucket> [--fix]

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 2d8faf8e5f15e833e6b556b0f3c4ac92e4a4151e)

Conflicts:
src/rgw/rgw_admin.cc
src/rgw/rgw_rados.h

12 years agorgw: radosgw-admin object unlink
Yehuda Sadeh [Tue, 5 Feb 2013 21:54:11 +0000 (13:54 -0800)]
rgw: radosgw-admin object unlink

Add a radosgw-admin option to remove object from bucket index

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 16235a7acb9543d60470170bb2a09956364626cd)

Conflicts:
src/rgw/rgw_admin.cc
src/rgw/rgw_rados.h
src/test/cli/radosgw-admin/help.t

12 years agoqa: add layout_vxattrs.sh test script
Sage Weil [Sat, 19 Jan 2013 19:33:04 +0000 (11:33 -0800)]
qa: add layout_vxattrs.sh test script

Test virtual xattrs for file and directory layouts.

TODO: create a data pool, add it to the fs, and make sure we can use it.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 61fbe27a52d12ecd98ddeb5fc0965c4f8ee7841a)

12 years agomds: allow dir layout/policy to be removed via removexattr on ceph.dir.layout
Sage Weil [Sat, 19 Jan 2013 18:11:18 +0000 (10:11 -0800)]
mds: allow dir layout/policy to be removed via removexattr on ceph.dir.layout

This lets a user remove a policy that was previously set on a dir.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit db31a1f9f27416e4d531fda716e32d42a275e84f)

12 years agomds: handle ceph.*.layout.* setxattr
Sage Weil [Sat, 19 Jan 2013 18:09:39 +0000 (10:09 -0800)]
mds: handle ceph.*.layout.* setxattr

Allow individual fields of file or dir layouts to be set via setxattr.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit ebebf72f0993d028e795c78a986e1aee542ca5e0)

12 years agomdsmap: backported is_data_pool()
Sage Weil [Tue, 5 Feb 2013 06:03:32 +0000 (22:03 -0800)]
mdsmap: backported is_data_pool()

This roughly corresponds to mainline commit 99d9e1d.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: fix client view of dir layout when layout is removed
Sage Weil [Sat, 19 Jan 2013 18:04:05 +0000 (10:04 -0800)]
mds: fix client view of dir layout when layout is removed

We weren't handling the case where the projected node has NULL for the
layout properly.  Fixes the client's view when we remove the dir layout.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 09f28541e374ffac198e4d48082b064aae93cb2c)

12 years agoclient: note presence of dir layout in inode operator<<
Sage Weil [Sat, 19 Jan 2013 18:04:39 +0000 (10:04 -0800)]
client: note presence of dir layout in inode operator<<

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 84751489ca208964e617516e04556722008ddf67)

12 years agoclient: list only aggregate xattr, but allow setting subfield xattrs
Sage Weil [Sat, 19 Jan 2013 17:05:59 +0000 (09:05 -0800)]
client: list only aggregate xattr, but allow setting subfield xattrs

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit ba32ea9454d36072ec5ea3e6483dc3daf9199903)

12 years agoclient: implement ceph.file.* and ceph.dir.* vxattrs
Sage Weil [Sat, 19 Jan 2013 06:26:00 +0000 (22:26 -0800)]
client: implement ceph.file.* and ceph.dir.* vxattrs

Display ceph.file.* vxattrs on any regular file, and ceph.dir.* vxattrs
on any directory that has a policy set.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 3f82912a891536dd7e930f98e28d9a8c18fab756)

12 years agoclient: move xattr namespace enforcement into internal method
Sage Weil [Sat, 19 Jan 2013 01:21:37 +0000 (17:21 -0800)]
client: move xattr namespace enforcement into internal method

This captures libcephfs users now too.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit febb96509559084357bfaabf7e4d28e494c274aa)

12 years agoclient: allow ceph.* xattrs
Sage Weil [Sat, 19 Jan 2013 01:20:22 +0000 (17:20 -0800)]
client: allow ceph.* xattrs

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit ad7ebad70bf810fde45067f78f316f130a243b9c)

12 years agorgw_rest: Make fallback uri configurable.
caleb miles [Mon, 14 Jan 2013 17:16:12 +0000 (12:16 -0500)]
rgw_rest: Make fallback uri configurable.

Some HTTP servers, notabily lighttp, do not set SCRIPT_URI, make the fallback
string configurable.

Signed-off-by: caleb miles <caleb.miles@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit b3a2e7e955547a863d29566aab62bcc480e27a65)

Conflicts:
src/rgw/rgw_rest.cc

12 years agorgw: fix setting of NULL to string
Yehuda Sadeh [Fri, 1 Feb 2013 18:56:11 +0000 (10:56 -0800)]
rgw: fix setting of NULL to string

Fixes: #3777
s->env->get() returns char * and not string and can return NULL.
Also, remove some old unused code.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 9019fbbe8f84f530b6a8700dfe99dfeb03e0ed3d)

12 years agoOSD: check for empty command in do_command
Samuel Just [Fri, 11 Jan 2013 18:44:04 +0000 (10:44 -0800)]
OSD: check for empty command in do_command

Fixes: #3878
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 8cf79f252a1bcea5713065390180a36f31d66dfd)

12 years agoPGMap: fix -Wsign-compare warning
Danny Al-Gaaf [Wed, 30 Jan 2013 17:52:24 +0000 (18:52 +0100)]
PGMap: fix -Wsign-compare warning

Fix -Wsign-compare compiler warning:

mon/PGMap.cc: In member function 'void PGMap::apply_incremental
 (CephContext*, const PGMap::Incremental&)':
mon/PGMap.cc:247:30: warning: comparison between signed and
 unsigned integer expressions [-Wsign-compare]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit b571f8ee2d22a3894120204bc5f119ff37e1de53)

12 years agomon: smooth pg stat rates over last N pgmaps
Sage Weil [Tue, 29 Jan 2013 03:46:33 +0000 (19:46 -0800)]
mon: smooth pg stat rates over last N pgmaps

This smooths the recovery and throughput stats over the last N pgmaps,
defaulting to 2.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit a7d15afb529615db56bae038b18b66e60d827a96)

12 years agomon/PGMap: report IO rates
Sage Weil [Sat, 26 Jan 2013 03:51:40 +0000 (19:51 -0800)]
mon/PGMap: report IO rates

This does not appear to be very accurate; probably the stat values we're
displaying are not being calculated correctly.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 3f6837e022176ec4b530219043cf12e009d1ed6e)

12 years agomon/PGMap: report recovery rates
Sage Weil [Sat, 26 Jan 2013 03:51:14 +0000 (19:51 -0800)]
mon/PGMap: report recovery rates

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 208b02a748d97378f312beaa5110d8630c853ced)

12 years agomon/PGMap: include timestamp
Sage Weil [Sat, 26 Jan 2013 03:50:45 +0000 (19:50 -0800)]
mon/PGMap: include timestamp

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 76e9fe5f06411eb0e96753dcd708dd6e43ab2c02)

12 years agoosd: track recovery ops in stats
Sage Weil [Sat, 26 Jan 2013 03:49:16 +0000 (19:49 -0800)]
osd: track recovery ops in stats

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit a2495f658c6d17f56ea0a2ab1043299a59a7115b)

12 years agoosd_types: add recovery counts to object_sum_stats_t
Sage Weil [Sat, 26 Jan 2013 03:06:52 +0000 (19:06 -0800)]
osd_types: add recovery counts to object_sum_stats_t

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 4aea19ee60fbe1106bdd71de2d172aa2941e8aab)

12 years agov0.56.2 v0.56.2
Gary Lowell [Wed, 30 Jan 2013 07:54:47 +0000 (23:54 -0800)]
v0.56.2

12 years agocls_rbd, cls_rgw: use PRI*64 when printing/logging 64-bit values
Dan Mick [Wed, 30 Jan 2013 07:05:49 +0000 (23:05 -0800)]
cls_rbd, cls_rgw: use PRI*64 when printing/logging 64-bit values

caused segfaults in 32-bit build

Fixes: #3961
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit e253830abac76af03c63239302691f7fac1af381)

12 years agoinit-ceph: make ulimit -n be part of daemon command
Dan Mick [Tue, 29 Jan 2013 23:18:53 +0000 (15:18 -0800)]
init-ceph: make ulimit -n be part of daemon command

ulimit -n from 'max open files' was being set only on the machine
running /etc/init.d/ceph.  It needs to be added to the commands to
start the daemons, and run both locally and remotely.

Verified by examining /proc/<pid>/limits on local and remote hosts

Fixes: #3900
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Loïc Dachary <loic@dachary.org>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
(cherry picked from commit 84a024b647c0ac2ee5a91bacdd4b8c966e44175c)

12 years agomon: OSDMonitor: only share osdmap with up OSDs
Joao Eduardo Luis [Sat, 12 Jan 2013 01:06:36 +0000 (01:06 +0000)]
mon: OSDMonitor: only share osdmap with up OSDs

Try to share the map with a randomly picked OSD; if the picked monitor is
not 'up', then try to find the nearest 'up' OSD in the map by doing a
backward and a forward linear search on the map -- this would be O(n) in
the worst case scenario, as we only do a single iteration starting on the
picked position, incrementing and decrementing two different iterators
until we find an appropriate OSD or we exhaust the map.

Fixes: #3629
Backport: bobtail

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 3610e72e4f9117af712f34a2e12c5e9537a5746f)

12 years agoutime: fix narrowing conversion compiler warning in sleep()
Danny Al-Gaaf [Sun, 27 Jan 2013 20:57:31 +0000 (21:57 +0100)]
utime: fix narrowing conversion compiler warning in sleep()

Fix compiler warning:
./include/utime.h: In member function 'void utime_t::sleep()':
./include/utime.h:139:50: warning: narrowing conversion of
 '((utime_t*)this)->utime_t::tv.utime_t::<anonymous struct>::tv_sec' from
 '__u32 {aka unsigned int}' to '__time_t {aka long int}' inside { } is
 ill-formed in C++11 [-Wnarrowing]
./include/utime.h:139:50: warning: narrowing conversion of
 '((utime_t*)this)->utime_t::tv.utime_t::<anonymous struct>::tv_nsec' from
 '__u32 {aka unsigned int}' to 'long int' inside { } is
 ill-formed in C++11 [-Wnarrowing]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 014fc6d6c1c68e2e3ad0117d08c4e46e4030d49e)

12 years agorgw: fix crash when missing content-type in POST object
Yehuda Sadeh [Tue, 29 Jan 2013 01:13:23 +0000 (17:13 -0800)]
rgw: fix crash when missing content-type in POST object

Fixes: #3941
This fixes a crash when handling S3 POST request and content type
is not provided.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit f41010c44b3a4489525d25cd35084a168dc5f537)

12 years agoReplicatedPG: make_snap_collection when moving snap link in snap_trimmer
Samuel Just [Fri, 11 Jan 2013 23:00:02 +0000 (15:00 -0800)]
ReplicatedPG: make_snap_collection when moving snap link in snap_trimmer

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 88956e3186798058a1170803f8abfc0f3cf77a07)

12 years agoReplicatedPG: correctly handle new snap collections on replica
Samuel Just [Sat, 12 Jan 2013 00:43:14 +0000 (16:43 -0800)]
ReplicatedPG: correctly handle new snap collections on replica

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 9e44fca13bf1ba39dbcad29111b29f46c49d59f7)

12 years agomon: Elector: reset the acked leader when the election finishes and we lost
Joao Eduardo Luis [Sun, 27 Jan 2013 18:08:15 +0000 (18:08 +0000)]
mon: Elector: reset the acked leader when the election finishes and we lost

Failure to do so will mean that we will always ack the same leader during
an election started by another monitor.  This had been working so far
because we were still acking the existing leader if he was supposed to
still be the leader; or we were acking a new potentially leader; or we
would eventually fall behind on an election and start a new election
ourselves, thus resetting the previously acked leader.  While this wasn't
something that mattered much until now, the timechecks code stumbled into
this tiny issue and was failing hard at completing a round because there
wouldn't be a reset before the election started -- timechecks are bound
to election epochs.

Fixes: #3854
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit c54781618569680898e77e151dd7364f22ac4aa1)

12 years agorbd: fix bench-write infinite loop
Josh Durgin [Wed, 26 Dec 2012 22:24:22 +0000 (14:24 -0800)]
rbd: fix bench-write infinite loop

I/O was continously submitted as long as there were few enough ops in
flight. If the number of 'threads' was high, or caching was turned on,
there would never be that many ops in flight, so the loop would continue
indefinitely. Instead, submit at most io_threads ops per offset.

Fixes: #3413
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
(cherry picked from commit d81ac8418f9e6bbc9adcc69b2e7cb98dd4db6abb)

12 years agorbd: Don't call ProgressContext's finish() if there's an error.
Dan Mick [Sat, 5 Jan 2013 02:00:24 +0000 (18:00 -0800)]
rbd: Don't call ProgressContext's finish() if there's an error.

do_copy was different from the others; call pc.fail() on error and
do not call pc.finish().

Fixes: #3729
Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 0978dc4963fe441fb67afecb074bc7b01798d59d)

12 years agolibrbd: establish watch before reading header
Josh Durgin [Wed, 2 Jan 2013 22:15:24 +0000 (14:15 -0800)]
librbd: establish watch before reading header

This eliminates a window in which a race could occur when we have an
image open but no watch established. The previous fix (using
assert_version) did not work well with resend operations.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit c4370ff03f8ab655a009cfd9ba3a0827d8c58b11)

12 years agoRevert "librbd: ensure header is up to date after initial read"
Josh Durgin [Wed, 2 Jan 2013 20:32:33 +0000 (12:32 -0800)]
Revert "librbd: ensure header is up to date after initial read"

Using assert version for linger ops doesn't work with retries,
since the version will change after the first send.
This reverts commit e1776809031c6dad441cfb2b9fac9612720b9083.

Conflicts:

qa/workunits/rbd/watch_correct_version.sh
(cherry picked from commit e0858fa89903cf4055889c405f17515504e917a0)

12 years agoos/FileStore: only adjust up op queue for btrfs
Sage Weil [Thu, 24 Jan 2013 06:16:49 +0000 (22:16 -0800)]
os/FileStore: only adjust up op queue for btrfs

We only need to adjust up the op queue limits during commit for btrfs,
because the snapshot initiation (async create) is currently
high-latency and the op queue is quiesced during that period.

This lets us revert 44dca5c, which disabled the extra allowance because
it is generally bad for non-btrfs writeahead mode.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 38871e27eca5a34de78db23aa3663f6cb045d461)

12 years agocommon/HeartbeatMap: fix uninitialized variable
Sage Weil [Thu, 24 Jan 2013 18:52:46 +0000 (10:52 -0800)]
common/HeartbeatMap: fix uninitialized variable

Introduced by me in 132045ce085e8584a3e177af552ee7a5205b13d8.  Thank you,
valgrind!

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 00cfe1d3af286ffab7660933415684f18449720c)

12 years agosharedptr_registry: remove extaneous Mutex::Locker declaration
Samuel Just [Fri, 25 Jan 2013 19:31:29 +0000 (11:31 -0800)]
sharedptr_registry: remove extaneous Mutex::Locker declaration

For some reason, the lookup() retry loop (for when happened to
race with a removal and grab an invalid WeakPtr) locked
the lock again.  This causes the #3836 crash since the lock
is already locked.  It's rare since it requires a lookup between
invalidation of the WeakPtr and removal of the WeakPtr entry.

Fixes: #3836
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 037900dc7a051ce2293a4ef9d0e71911b29ec159)

12 years agoFileStore: ping TPHandle after each operation in _do_transactions
Samuel Just [Thu, 24 Jan 2013 20:02:09 +0000 (12:02 -0800)]
FileStore: ping TPHandle after each operation in _do_transactions

Each completed operation in the transaction proves thread
liveness, a stuck thread should still trigger the timeouts.

Fixes: #3928
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 0c1cc687b6a40d3c6a26671f0652e1b51c3fd1af)

12 years agoOSD: use TPHandle in peering_wq
Samuel Just [Thu, 24 Jan 2013 19:07:37 +0000 (11:07 -0800)]
OSD: use TPHandle in peering_wq

Implement _process overload with TPHandle argument and use
that to ping the hb map between pgs and between map epochs
when advancing a pg.  The thread will still timeout if
genuinely stuck at any point.

Fixes: 3905
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit e0511f4f4773766d04e845af2d079f82f3177cb6)

12 years agoWorkQueue: add TPHandle to allow _process to ping the hb map
Samuel Just [Thu, 24 Jan 2013 19:04:04 +0000 (11:04 -0800)]
WorkQueue: add TPHandle to allow _process to ping the hb map

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 4f653d23999b24fc8c65a59f14905db6630be5b5)

12 years agoReplicatedPG: handle omap > max_recovery_chunk
Samuel Just [Wed, 23 Jan 2013 20:49:04 +0000 (12:49 -0800)]
ReplicatedPG: handle omap > max_recovery_chunk

span_of fails if len == 0.

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 8a97eef1f7004988449bd7ace4c69d5796495139)

12 years agoReplicatedPG: correctly handle omap key larger than max chunk
Samuel Just [Wed, 23 Jan 2013 20:18:31 +0000 (12:18 -0800)]
ReplicatedPG: correctly handle omap key larger than max chunk

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit c3dec3e30a85ecad0090c75a38f28cb83e36232e)

12 years agoReplicatedPG: start scanning omap at omap_recovered_to
Samuel Just [Wed, 23 Jan 2013 20:15:10 +0000 (12:15 -0800)]
ReplicatedPG: start scanning omap at omap_recovered_to

Previously, we started scanning omap after omap_recovered_to.
This is a problem since the break in the loop implies that
omap_recovered_to is the first key not recovered.

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 09c71f2f5ee9929ac4574f4c35fb8c0211aad097)

12 years agoReplicatedPG: don't finish_recovery_op until the transaction completes
Samuel Just [Wed, 23 Jan 2013 19:50:13 +0000 (11:50 -0800)]
ReplicatedPG: don't finish_recovery_op until the transaction completes

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 62a4b96831c1726043699db86a664dc6a0af8637)

12 years agoReplicatedPG: ack push only after transaction has completed
Samuel Just [Wed, 23 Jan 2013 19:35:47 +0000 (11:35 -0800)]
ReplicatedPG: ack push only after transaction has completed

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 20278c4f77b890d5b2b95d2ccbeb4fbe106667ac)

12 years agoObjectStore: add queue_transactions with oncomplete
Samuel Just [Wed, 23 Jan 2013 19:13:28 +0000 (11:13 -0800)]
ObjectStore: add queue_transactions with oncomplete

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 4d6ba06309b80fb21de7bb5d12d5482e71de5f16)

12 years agocommon/HeartbeatMap: inject unhealthy heartbeat for N seconds
Sage Weil [Wed, 23 Jan 2013 05:18:45 +0000 (21:18 -0800)]
common/HeartbeatMap: inject unhealthy heartbeat for N seconds

This lets us test code that is triggered by an unhealthy heartbeat in a
generic way.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 132045ce085e8584a3e177af552ee7a5205b13d8)

12 years agoos/FileStore: add stall injection into filestore op queue
Sage Weil [Wed, 23 Jan 2013 02:08:22 +0000 (18:08 -0800)]
os/FileStore: add stall injection into filestore op queue

Allow admin to artificially induce a stall in the op queue.  Forces the
thread(s) to sleep for N seconds.  We pause for 1 second increments and
recheck the value so that a previously stalled thread can be unwedged by
reinjecting a lower value (or 0).  To stall indefinitely, just injust
very large number.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 657df852e9c89bfacdbce25ea014f7830d61e6aa)

12 years agoosd: do not join cluster if not healthy
Sage Weil [Wed, 23 Jan 2013 02:03:10 +0000 (18:03 -0800)]
osd: do not join cluster if not healthy

If our internal heartbeats are failing, do not send a boot message and try
to join the cluster.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit a4e78652cdd1698e8dd72dda51599348d013e5e0)

12 years agoosd: hold lock while calling start_boot on startup
Sage Weil [Wed, 23 Jan 2013 02:01:07 +0000 (18:01 -0800)]
osd: hold lock while calling start_boot on startup

This probably doesn't strictly matter because start_boot doesn't need the
lock (currently) and few other threads should be running, but it is
better to be consistent.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit c406476c0309792c43df512dddb2fe0f19835e71)

12 years agoosd: do not reply to ping if internal heartbeat is not healthy
Sage Weil [Wed, 23 Jan 2013 01:56:32 +0000 (17:56 -0800)]
osd: do not reply to ping if internal heartbeat is not healthy

If we find that our internal threads are stalled, do not reply to ping
requests.  If we do this long enough, peers will mark us down.  If we are
only transiently unhealthy, we will reply to the next ping and they will
be satisfied.  If we are unhealthy and marked down, and eventually recover,
we will mark ourselves back up.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit ad6b231127a6bfcbed600a7493ca3b66c68484d2)

12 years agoosd: reduce op thread heartbeat default 30 -> 15 seconds
Sage Weil [Wed, 23 Jan 2013 01:53:40 +0000 (17:53 -0800)]
osd: reduce op thread heartbeat default 30 -> 15 seconds

If the thread stalls for 15 seconds, let our internal heartbeat fail.
This will let us internally respond more quickly to a stalled or failing
disk.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 61eafffc3242357d9add48be9308222085536898)

12 years agoosd: improve sub_op flag points
Sage Weil [Tue, 22 Jan 2013 05:02:01 +0000 (21:02 -0800)]
osd: improve sub_op flag points

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 73a969366c8bbd105579611320c43e2334907fef)

12 years agoosd: refactor ReplicatedPG::do_sub_op
Sage Weil [Tue, 22 Jan 2013 04:55:20 +0000 (20:55 -0800)]
osd: refactor ReplicatedPG::do_sub_op

PULL is the only case where we don't wait for active.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 23c02bce90c9725ccaf4295de3177e8146157723)

12 years agoosd: make last state for slow requests more informative
Sage Weil [Tue, 22 Jan 2013 00:36:36 +0000 (16:36 -0800)]
osd: make last state for slow requests more informative

Report on the last event string, and pass in important context for the
op event list, including:

 - which peers were sent sub ops and we are waiting for
 - which pg queue we are delayed by

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit a1137eb3e168c2d00f93789e4d565c1584790df0)

12 years agoosd: dump op priority queue state via admin socket
Sage Weil [Mon, 21 Jan 2013 23:59:07 +0000 (15:59 -0800)]
osd: dump op priority queue state via admin socket

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 24d0d7eb0165c8b8f923f2d8896b156bfb5e0e60)

12 years agoosd: simplify asok to single callback
Sage Weil [Mon, 21 Jan 2013 23:50:33 +0000 (15:50 -0800)]
osd: simplify asok to single callback

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 33efe32151e04beaafd9435d7f86dc2eb046214d)

12 years agocommon/PrioritizedQueue: dump state to Formatter
Sage Weil [Mon, 21 Jan 2013 23:58:57 +0000 (15:58 -0800)]
common/PrioritizedQueue: dump state to Formatter

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 514af15e95604bd241d2a98a97b938889c6876db)

12 years agocommon/PrioritizedQueue: add min cost, max tokens per bucket
Sage Weil [Mon, 21 Jan 2013 23:29:28 +0000 (15:29 -0800)]
common/PrioritizedQueue: add min cost, max tokens per bucket

Two problems.

First, we need to cap the tokens per bucket.  Otherwise, a stream of
items at one priority over time will indefinitely inflate the tokens
available at another priority.  The cap should represent how "bursty"
we allow a given bucket to be.  Start with 4MB for now.

Second, set a floor on the item cost.  Otherwise, we can have an
infinite queue of 0 cost items that start over queues.  More
realistically, we need to balance the overhead of processing small items
with the cost of large items.  I.e., a 4 KB item is not 1/1000th as
expensive as a 4MB item.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 6e3363b20e590cd9df89f2caebe71867b94cc291)

12 years agocommon/PrioritizedQueue: buckets -> tokens
Sage Weil [Mon, 21 Jan 2013 22:52:54 +0000 (14:52 -0800)]
common/PrioritizedQueue: buckets -> tokens

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit c549a0cf6fae78c8418a3b4b0702fd8a1e4ce482)

12 years agonote puller's max chunk in pull requests
Sage Weil [Mon, 21 Jan 2013 22:31:00 +0000 (14:31 -0800)]
note puller's max chunk in pull requests

this lets us calculate a cost value
(cherry picked from commit 128fcfcac7d3fb66ca2c799df521591a98b82e05)

12 years agoosd: add OpRequest flag point when commit is sent
Sage Weil [Mon, 21 Jan 2013 22:14:25 +0000 (14:14 -0800)]
osd: add OpRequest flag point when commit is sent

With writeahead journaling in particular, we can get requests that
stay in the queue for a long time even after the commit is sent to the
client while we are waiting for the transaction to apply to the fs.
Instead of showing up as 'waiting for subops', make it clear that the
client has gotten its reply and it is local state that is slow.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit b685f727d4c37a26cb78bd4a04cce041428ceb52)

12 years agoosd: set PULL subop cost to size of requested data
Sage Weil [Mon, 21 Jan 2013 21:57:59 +0000 (13:57 -0800)]
osd: set PULL subop cost to size of requested data

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit a1bf8220e545f29b83d965f07b1abfbea06238b3)

12 years agoosd: use Message::get_cost() function for queueing
Sage Weil [Mon, 21 Jan 2013 21:57:38 +0000 (13:57 -0800)]
osd: use Message::get_cost() function for queueing

The data payload is a decent proxy for cost in most cases, but not all.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit e8e0da1a577e24cd4aad71fb94d8b244e2ac7300)

12 years agoosd: debug msg prio, cost, latency
Sage Weil [Mon, 21 Jan 2013 21:25:21 +0000 (13:25 -0800)]
osd: debug msg prio, cost, latency

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit bec96a234c160bebd9fd295df5b431dc70a2cfb3)

12 years agofilestore: filestore_queue_max_ops 500 -> 50
Sage Weil [Tue, 22 Jan 2013 05:05:00 +0000 (21:05 -0800)]
filestore: filestore_queue_max_ops 500 -> 50

Having a deep queue limits the effectiveness of the priority queues
above by adding additional latency.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 40654d6d53436c210b2f80911217b044f4d7643a)

12 years agoosd: target transaction size 300 -> 30
Sage Weil [Tue, 22 Jan 2013 04:00:26 +0000 (20:00 -0800)]
osd: target transaction size 300 -> 30

Small transactions make pg removal nicer to the op queue.  It also slows
down PG deletion a bit, which may exacerbate the PG resurrection case
until #3884 is addressed.

At least on user reported this fixed an osd that kept failing due to
an internal heartbeat failure.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 1233e8617098766c95100aa9a6a07db1a688e290)

12 years agoos/FileStore: allow filestore_queue_max_{ops,bytes} to be adjusted at runtime
Sage Weil [Tue, 22 Jan 2013 03:55:26 +0000 (19:55 -0800)]
os/FileStore: allow filestore_queue_max_{ops,bytes} to be adjusted at runtime

The 'committing' ones too.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit cfe4b8519363f92f84f724a812aa41257402865f)

12 years agoosd: make osd_max_backfills dynamically adjustable
Sage Weil [Sun, 20 Jan 2013 06:06:27 +0000 (22:06 -0800)]
osd: make osd_max_backfills dynamically adjustable

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 101955a6b8bfdf91f4229f4ecb5d5b3da096e160)

12 years agoosd: make OSD a config observer
Sage Weil [Sun, 20 Jan 2013 02:28:35 +0000 (18:28 -0800)]
osd: make OSD a config observer

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 9230c863b3dc2bdda12c23202682a84c48f070a1)

Conflicts:

src/osd/OSD.cc

12 years agolibrbd: Allow get_lock_info to fail
Dan Mick [Tue, 8 Jan 2013 19:21:22 +0000 (11:21 -0800)]
librbd: Allow get_lock_info to fail

If the lock class isn't present, EOPNOTSUPP is returned for lock calls
on newer OSDs, but sadly EIO on older; we need to treat both as
acceptable failures for RBD images.  rados lock list will still fail.

Fixes #3744.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 4483285c9fb16f09986e2e48b855cd3db869e33c)

12 years agoosd: drop newlines from event descriptions
Sage Weil [Fri, 4 Jan 2013 21:00:56 +0000 (13:00 -0800)]
osd: drop newlines from event descriptions

These produce extra newlines in the log.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 9a1f574283804faa6dbba9165a40558e1a6a1f13)

12 years agoOSD: do deep_scrub for repair
Samuel Just [Fri, 18 Jan 2013 22:35:51 +0000 (14:35 -0800)]
OSD: do deep_scrub for repair

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 0cb760f31b0cb26f022fe8b9341e41cd5351afac)

12 years agoReplicatedPG: ignore snap link info in scrub if nlinks==0
Samuel Just [Mon, 14 Jan 2013 20:52:04 +0000 (12:52 -0800)]
ReplicatedPG: ignore snap link info in scrub if nlinks==0

links==0 implies that the replica did not sent snap link information.

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 70c3512037596a42ba6eb5eb7f96238843095db9)

12 years agoosd/PG: fix osd id in error message on snap collection errors
Sage Weil [Fri, 11 Jan 2013 20:25:22 +0000 (12:25 -0800)]
osd/PG: fix osd id in error message on snap collection errors

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 381e25870f26fad144ecc2fb99710498e3a7a1d4)

12 years agoosd/ReplicatedPG: validate ino when scrubbing snap collections
Sage Weil [Thu, 10 Jan 2013 06:34:12 +0000 (22:34 -0800)]
osd/ReplicatedPG: validate ino when scrubbing snap collections

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 665577a88b98390b9db0f9991836d10ebdd8f4cf)

12 years agoReplicatedPG: compare nlinks to snapcolls
Samuel Just [Thu, 10 Jan 2013 00:41:40 +0000 (16:41 -0800)]
ReplicatedPG: compare nlinks to snapcolls

nlinks gives us the number of hardlinks to the object.
nlinks should be 1 + snapcolls.size().  This will allow
us to detect links which remain in an erroneous snap
collection.

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit e65ea70ea64025fbb0709ee8596bb2878be0bbdc)

12 years agoReplicatedPG/PG: check snap collections during _scan_list
Samuel Just [Thu, 10 Jan 2013 23:35:10 +0000 (15:35 -0800)]
ReplicatedPG/PG: check snap collections during _scan_list

During _scan_list check the snapcollections corresponding to the
object_info attr on the object.  Report inconsistencies during
scrub_finalize.

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 57352351bb86e0ae9f64f9ba0d460c532d882de6)

12 years agoosd_types: add nlink and snapcolls fields to ScrubMap::object
Samuel Just [Wed, 9 Jan 2013 19:53:52 +0000 (11:53 -0800)]
osd_types: add nlink and snapcolls fields to ScrubMap::object

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit b85687475fa2ec74e5429d92ee64eda2051a256c)

12 years agoPG: move auth replica selection to helper in scrub
Samuel Just [Fri, 4 Jan 2013 04:16:50 +0000 (20:16 -0800)]
PG: move auth replica selection to helper in scrub

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 39bc65492af1bf1da481a8ea0a70fe7d0b4b17a3)

12 years agomon: note scrub errors in health summary
Sage Weil [Tue, 15 Jan 2013 02:23:52 +0000 (18:23 -0800)]
mon: note scrub errors in health summary

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 8e33a8b9e1fef757bbd901d55893e9b84ce6f3fc)

12 years agoosd: fix rescrub after repair
Sage Weil [Tue, 15 Jan 2013 02:31:06 +0000 (18:31 -0800)]
osd: fix rescrub after repair

We were rescrubbing if INCONSISTENT is set, but that is now persistent.
Add a new scrub_after_recovery flag that is reset on each peering interval
and set that when repair encounters errors.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit a586966a3cfb10b5ffec0e9140053a7e4ff105d2)

12 years agoosd: note must_scrub* flags in PG operator<<
Sage Weil [Tue, 15 Jan 2013 02:22:02 +0000 (18:22 -0800)]
osd: note must_scrub* flags in PG operator<<

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit d56af797f996ac92bf4e0886d416fd358a2aa08e)

12 years agoosd: based INCONSISTENT pg state on persistent scrub errors
Sage Weil [Tue, 15 Jan 2013 02:21:46 +0000 (18:21 -0800)]
osd: based INCONSISTENT pg state on persistent scrub errors

This makes the state persistent across PG peering and OSD restarts.

This has the side-effect that, on recovery, we rescrub any PGs marked
inconsistent.  This is new behavior!

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 2baf1253eed630a7c4ae4cb43aab6475efd82425)

12 years agoosd: fix scrub scheduling for 0.0
Sage Weil [Tue, 15 Jan 2013 02:20:29 +0000 (18:20 -0800)]
osd: fix scrub scheduling for 0.0

The initial value for pair<utime_t,pg_t> can match pg 0.0, preventing it
from being manually scrubbed.  Fix!

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 26a63df97b2a12fd1a7c1e3cc9ccd34ca2ef9834)

12 years agoosd: note last_clean_scrub_stamp, last_scrub_errors
Sage Weil [Mon, 14 Jan 2013 07:03:01 +0000 (23:03 -0800)]
osd: note last_clean_scrub_stamp, last_scrub_errors

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 389bed5d338cf32ab14c9fc2abbc7bcc386b8a28)

12 years agoosd: add num_scrub_errors to object_stat_t
Sage Weil [Mon, 14 Jan 2013 06:59:39 +0000 (22:59 -0800)]
osd: add num_scrub_errors to object_stat_t

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 2475066c3247774a2ad048a2e32968e47da1b0f5)

12 years agoosd: add last_clean_scrub_stamp to pg_stat_t, pg_history_t
Sage Weil [Mon, 14 Jan 2013 06:43:35 +0000 (22:43 -0800)]
osd: add last_clean_scrub_stamp to pg_stat_t, pg_history_t

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit d738328488de831bf090f23e3fa6d25f6fa819df)

12 years agoosd: fix object_stat_sum_t dump signedness
Sage Weil [Mon, 14 Jan 2013 06:56:14 +0000 (22:56 -0800)]
osd: fix object_stat_sum_t dump signedness

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 6f6a41937f1bd05260a8d70b4c4a58ecadb34a2f)

12 years agoosd: change scrub min/max thresholds
Sage Weil [Mon, 14 Jan 2013 06:04:58 +0000 (22:04 -0800)]
osd: change scrub min/max thresholds

The previous 'osd scrub min interval' was mostly meaningless and useless.
Meanwhile, the 'osd scrub max interval' would only trigger a scrub if the
load was sufficiently low; if it was high, the PG might *never* scrub.

Instead, make the 'min' what the max used to be.  If it has been more than
this many seconds, and the load is low, scrub.  And add an additional
condition that if it has been more than the max threshold, scrub the PG
no matter what--regardless of the load.

Note that this does not change the default scrub interval for less-loaded
clusters, but it *does* change the meaning of existing config options.

Fixes: #3786
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 299548024acbf8123a4e488424c06e16365fba5a)

Conflicts:

PendingReleaseNotes

12 years agoosd/PG: remove useless osd_scrub_min_interval check
Sage Weil [Mon, 14 Jan 2013 04:27:59 +0000 (20:27 -0800)]
osd/PG: remove useless osd_scrub_min_interval check

This was already a no-op: we don't call PG::scrub_sched() unless it has
been osd_scrub_max_interval seconds since we last scrubbed.  Unless we
explicitly requested in, in which case we don't want this check anyway.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 16d67c798b6f752a6e03084bafe861396b86baae)