]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoceph-disk: do not stop activate-all on first failure
Sage Weil [Sun, 16 Jun 2013 03:06:33 +0000 (20:06 -0700)]
ceph-disk: do not stop activate-all on first failure

Keep going even if we hit one activation error.  This avoids failing to
start some disks when only one of them won't start (e.g., because it
doesn't belong to the current cluster).

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

12 years agoceph.spec: include partuuid rules in package
Sage Weil [Fri, 14 Jun 2013 23:30:24 +0000 (16:30 -0700)]
ceph.spec: include partuuid rules in package

Commit f3234c147e083f2904178994bc85de3d082e2836 missed this.

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

12 years agoceph.spec: install/uninstall init script
Sage Weil [Fri, 14 Jun 2013 22:01:14 +0000 (15:01 -0700)]
ceph.spec: install/uninstall init script

This was commented out almost years ago in commit 9baf5ef4 but it is not
clear to me that it was correct to do so.  In any case, we are not
installing the rc.d links for ceph, which means it does not start up after
a reboot.

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

12 years agosysvinit, upstart: ceph-disk activate-all on start
Sage Weil [Fri, 14 Jun 2013 20:39:03 +0000 (13:39 -0700)]
sysvinit, upstart: ceph-disk activate-all on start

On 'service ceph start' or 'service ceph start osd' or start ceph-osd-all
we should activate any osd GPT partitions.

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

12 years agoceph-disk: add 'activate-all'
Sage Weil [Fri, 14 Jun 2013 20:34:40 +0000 (13:34 -0700)]
ceph-disk: add 'activate-all'

Scan /dev/disk/by-parttypeuuid for ceph OSDs and activate them all.  This
is useful when the event didn't trigger on the initial udev event for
some reason.

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

12 years agoudev: /dev/disk/by-parttypeuuid/$type-$uuid
Sage Weil [Fri, 14 Jun 2013 20:23:52 +0000 (13:23 -0700)]
udev: /dev/disk/by-parttypeuuid/$type-$uuid

We need this to help trigger OSD activations.

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

12 years agorgw: escape prefix correctly when listing objects
Yehuda Sadeh [Fri, 14 Jun 2013 21:53:54 +0000 (14:53 -0700)]
rgw: escape prefix correctly when listing objects

Fixes: #5362
When listing objects prefix needs to be escaped correctly (the
same as with the marker). Otherwise listing objects with prefix
that starts with underscore doesn't work.
Backport: bobtail, cuttlefish

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

12 years agomessages/MMonSync: initialize crc in ctor
Sage Weil [Tue, 11 Jun 2013 00:28:22 +0000 (17:28 -0700)]
messages/MMonSync: initialize crc in ctor

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

12 years agoclient: fix ancient typo in caps revocation path
Sage Weil [Sat, 15 Jun 2013 15:48:37 +0000 (08:48 -0700)]
client: fix ancient typo in caps revocation path

If we have dropped all references to a revoked capability, send the ack
to the MDS.  This typo has been there since v0.7 (early 2009)!

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit b7143c2f84daafbe2c27d5b2a2d5dc40c3a68d15)

12 years agomessages/MMonHealth: remove unused flag field
Sage Weil [Wed, 5 Jun 2013 15:42:25 +0000 (08:42 -0700)]
messages/MMonHealth: remove unused flag field

This was initialized in (one of) the ctor(s), but not encoded/decoded,
and not used.  Remove it.  This makes valgrind a happy.

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

12 years agomessages/MMonProbe: fix uninitialized variables
Sage Weil [Wed, 5 Jun 2013 15:34:20 +0000 (08:34 -0700)]
messages/MMonProbe: fix uninitialized variables

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

12 years agocommon/Preforker: fix broken recursion on exit(3)
Sage Weil [Sat, 15 Jun 2013 15:14:40 +0000 (08:14 -0700)]
common/Preforker: fix broken recursion on exit(3)

If we exit via preforker, call exit(3) and not recursively back into
Preforker::exit(r).  Otherwise you get a hang with the child blocked
at:

Thread 1 (Thread 0x7fa08962e7c0 (LWP 5419)):
#0  0x000000309860e0cd in write () from /lib64/libpthread.so.0
#1  0x00000000005cc906 in Preforker::exit(int) ()
#2  0x00000000005c8dfb in main ()

and the parent at

#0  0x000000309860eba7 in waitpid () from /lib64/libpthread.so.0
#1  0x00000000005cc87a in Preforker::parent_wait() ()
#2  0x00000000005c75ae in main ()

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

12 years agorules: Don't disable tcmalloc on ARM (and other non-intel)
Gary Lowell [Thu, 13 Jun 2013 23:38:26 +0000 (16:38 -0700)]
rules:  Don't disable tcmalloc on ARM (and other non-intel)

Fixes #5342

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
12 years agoRemove mon socket in post-stop
Guilhem Lettron [Mon, 27 May 2013 10:41:53 +0000 (12:41 +0200)]
Remove mon socket in post-stop

If ceph-mon segfault, socket file isn't removed.

By adding a remove in post-stop, upstart clean run directory properly.

Signed-off-by: Guilhem Lettron <guilhem@lettron.fr>
(cherry picked from commit 554b41b171eab997038e83928c462027246c24f4)

12 years agoRemove stop on from upstart tasks
James Page [Mon, 20 May 2013 09:26:06 +0000 (10:26 +0100)]
Remove stop on from upstart tasks

Upstart tasks don't have to concept of 'stop on' as they
are not long running.
(cherry picked from commit 17f6fccabc262b9a6d59455c524b550e77cd0fe3)

12 years agoceph-disk: extra dash in error message
Dan Mick [Thu, 13 Jun 2013 05:22:42 +0000 (22:22 -0700)]
ceph-disk: extra dash in error message

Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit f86b4e7a4831c684033363ddd335d2f3fb9a189a)

12 years agoceph-disk: cast output of _check_output()
Danny Al-Gaaf [Fri, 24 May 2013 10:41:11 +0000 (12:41 +0200)]
ceph-disk: cast output of _check_output()

Cast output of _check_output() to str() to be able to use
str.split().

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

12 years agoceph-disk: remove unnecessary semicolons
Danny Al-Gaaf [Fri, 24 May 2013 10:46:15 +0000 (12:46 +0200)]
ceph-disk: remove unnecessary semicolons

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

12 years agoceph-disk: fix undefined variable
Danny Al-Gaaf [Fri, 24 May 2013 10:33:16 +0000 (12:33 +0200)]
ceph-disk: fix undefined variable

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

12 years agoceph-disk: add missing spaces around operator
Danny Al-Gaaf [Fri, 24 May 2013 10:29:07 +0000 (12:29 +0200)]
ceph-disk: add missing spaces around operator

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

12 years agoudev: drop useless --mount argument to ceph-disk
Sage Weil [Fri, 14 Jun 2013 05:02:03 +0000 (22:02 -0700)]
udev: drop useless --mount argument to ceph-disk

It doesn't mean anything anymore; drop it.

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

12 years agoceph-disk-udev: activate-journal
Sage Weil [Fri, 14 Jun 2013 05:01:34 +0000 (22:01 -0700)]
ceph-disk-udev: activate-journal

Trigger 'ceph-disk activate-journal' from the alt udev rules.

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

12 years agoceph-disk: do not use mount --move (or --bind)
Sage Weil [Fri, 14 Jun 2013 04:56:23 +0000 (21:56 -0700)]
ceph-disk: do not use mount --move (or --bind)

The kernel does not let you mount --move when the parent mount is
shared (see, e.g., https://bugzilla.redhat.com/show_bug.cgi?id=917008
for another person this also confused).  We can't use --bind either
since that (on RHEL at least) screws up /etc/mtab so that the final
result looks like

 /var/lib/ceph/tmp/mnt.HNHoXU /var/lib/ceph/osd/ceph-0 none rw,bind 0 0

Instead, mount the original dev in the final location and then umount
from the old location.

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

12 years agoceph.spec: include by-partuuid udev workaround rules
Sage Weil [Fri, 14 Jun 2013 04:22:53 +0000 (21:22 -0700)]
ceph.spec: include by-partuuid udev workaround rules

These are need for old or buggy udev.  Having them for new and unbroken
udev is harmless.

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

12 years agoceph-disk: work around buggy rhel/centos parted
Sage Weil [Fri, 14 Jun 2013 19:10:49 +0000 (12:10 -0700)]
ceph-disk: work around buggy rhel/centos parted

parted on RHEL/Centos prefixes the *machine readable output* with

 1b 5b 3f 31 30 33 34 68

Note that the same thing happens when you 'import readline' in python.

Work around it!

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

12 years agoceph-disk: implement 'activate-journal'
Sage Weil [Thu, 13 Jun 2013 22:54:58 +0000 (15:54 -0700)]
ceph-disk: implement 'activate-journal'

Activate an osd via its journal device.  udev populates its symlinks and
triggers events in an order that is not related to whether the device is
an osd data partition or a journal.  That means that triggering
'ceph-disk activate' can happen before the journal (or journal symlink)
is present and then fail.

Similarly, it may be that they are on different disks that are hotplugged
with the journal second.

This can be wired up to the journal partition type to ensure that osds are
started when the journal appears second.

Include the udev rules to trigger this.

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

12 years agoceph-disk: call partprobe outside of the prepare lock; drop udevadm settle
Sage Weil [Wed, 12 Jun 2013 01:35:01 +0000 (18:35 -0700)]
ceph-disk: call partprobe outside of the prepare lock; drop udevadm settle

After we change the final partition type, sgdisk may or may not trigger a
udev event, depending on how well udev is behaving (it varies between
distros, it seems).  The old code would often settle and wait for udev to
activate the device, and then partprobe would uselessly fail because it
was already mounted.

Call partprobe only at the very end, after prepare is done.  This ensures
that if partprobe calls udevadm settle (which is sometimes does) we do not
get stuck.

Drop the udevadm settle.  I'm not sure what this accomplishes; take it out,
at least until we determine we need it.

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

12 years agoceph-disk: add 'zap' command
Sage Weil [Thu, 13 Jun 2013 18:03:37 +0000 (11:03 -0700)]
ceph-disk: add 'zap' command

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

12 years agoceph-disk: fix stat errors with new suppress code
Sage Weil [Tue, 21 May 2013 19:52:03 +0000 (12:52 -0700)]
ceph-disk: fix stat errors with new suppress code

Broken by 225fefe5e7c997b365f481b6c4f66312ea28ed61.

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

12 years agoceph-disk: add '[un]suppress-activate <dev>' command
Sage Weil [Mon, 13 May 2013 19:35:32 +0000 (12:35 -0700)]
ceph-disk: add '[un]suppress-activate <dev>' command

It is often useful to prepare but not activate a device, for example when
preparing a bunch of spare disks.  This marks a device as 'do not
activate' so that it can be prepared without activating.

Fixes: #3255
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 225fefe5e7c997b365f481b6c4f66312ea28ed61)

12 years agoupstart: start ceph-all on runlevel [2345]
Sage Weil [Fri, 14 Jun 2013 18:21:25 +0000 (11:21 -0700)]
upstart: start ceph-all on runlevel [2345]

Starting when only one network interface has started breaks machines with
multiple nics in very problematic ways.

There may be an earlier trigger that we can use for cases where other
services on the local machine depend on ceph, but for now this is better
than the existing behavior.

See #5248

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

12 years agoclient: set issue_seq (not seq) in cap release
Sage Weil [Sun, 9 Jun 2013 00:38:07 +0000 (17:38 -0700)]
client: set issue_seq (not seq) in cap release

We regularly have been observing a stall where the MDS is blocked waiting
for a cap revocation (Ls, in our case) and never gets a reply.  We finally
tracked down the sequence:

 - mds issues cap seq 1 to client
 - mds does revocation (seq 2)
 - client replies
 - much time goes by
 - client trims inode from cache, sends release with seq == 2
 - mds ignores release because its issue_seq is 1
 - mds later tries to revoke other caps
 - client discards message because it doesn't have the inode in cache

The problem is simply that we are using seq instead of issue_seq in the
cap release message.  Note that the other release call site in
encode_inode_release() is correct.  That one is much more commonly
triggered by short tests, as compared to this case where the inode needs to
get pushed out of the client cache.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 9b012e234a924efd718826ab6a53b9aeb7cd6649)

12 years agoosd: skip mark-me-down message if osd is not up
Sage Weil [Wed, 22 May 2013 22:03:50 +0000 (15:03 -0700)]
osd: skip mark-me-down message if osd is not up

Fixes crash when the OSD has not successfully booted and gets a
SIGINT or SIGTERM.

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

12 years agoceph-fuse: create finisher threads after fork()
Sage Weil [Mon, 3 Jun 2013 04:21:51 +0000 (21:21 -0700)]
ceph-fuse: create finisher threads after fork()

The ObjectCacher and MonClient classes both instantiate Finisher
threads.  We need to make sure they are created *after* the fork(2)
or else the process will fail to join() them on shutdown, and the
threads will not exist while fuse is doing useful work.

Put CephFuse on the heap and move all this initalization into the child
block, and make sure errors are passed back to the parent.

Fix-proposed-by: Alexandre Marangone <alexandre.maragone@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 4fa5f99a40792341d247e51488c37301da3c4e4f)

12 years agoosd: do not include logbl in scrub map
Sage Weil [Thu, 6 Jun 2013 23:35:54 +0000 (16:35 -0700)]
osd: do not include logbl in scrub map

This is a potentially use object/file, usually prefixed by a zeroed region
on disk, that is not used by scrub at all.  It dates back to
f51348dc8bdd5071b7baaf3f0e4d2e0496618f08 (2008) and the original version of
scrub.

This *might* fix #4179.  It is not a leak per se, but I observed 1GB
scrub messages going over the write.  Maybe the allocations are causing
fragmentation, or the sub_op queues are growing.

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

12 years agorgw: handle deep uri resources
Yehuda Sadeh [Fri, 7 Jun 2013 04:53:00 +0000 (21:53 -0700)]
rgw: handle deep uri resources

In case of deep uri resources (ones created beyond a single level
of hierarchy, e.g. auth/v1.0) we want to create a new empty
handlers for the path if no handlers exists. E.g., for
auth/v1.0 we need to have a handler for 'auth', otherwise
the default S3 handler will be used, which we don't want.

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

12 years agorgw: fix get_resource_mgr() to correctly identify resource
Yehuda Sadeh [Fri, 7 Jun 2013 04:47:21 +0000 (21:47 -0700)]
rgw: fix get_resource_mgr() to correctly identify resource

Fixes: #5262
The original test was not comparing the correct string, ended up
with the effect of just checking the substring of the uri to match
the resource.

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

12 years agorgw: add 'cors' to the list of sub-resources
Yehuda Sadeh [Thu, 6 Jun 2013 18:22:38 +0000 (11:22 -0700)]
rgw: add 'cors' to the list of sub-resources

Fixes: #5261
Backport: cuttlefish
Add 'cors' to the list of sub-resources, otherwise auth signing
is wrong.

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

12 years agomon: fix preforker exit behavior behavior
Sage Weil [Sat, 1 Jun 2013 04:23:45 +0000 (21:23 -0700)]
mon: fix preforker exit behavior behavior

In 3c5706163b72245768958155d767abf561e6d96d we made exit() not actually
exit so that the leak checking would behave for a non-forking case.
That is only needed for the normal exit case; every other case expects
exit() to actually terminate and not continue execution.

Instead, make a signal_exit() method that signals the parent (if any)
and then lets you return.  exit() goes back to it's usual behavior,
fixing the many other calls in main().

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

12 years agorados.py: correct some C types
Josh Durgin [Tue, 4 Jun 2013 20:23:36 +0000 (13:23 -0700)]
rados.py: correct some C types

trunc was getting size_t instead of uint64_t, leading to bad results
in 32-bit environments. Explicitly cast to the desired type
everywhere, so it's clear the correct type is being used.

Fixes: #5233
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 6dd7d469000144b499af84bda9b735710bb5cec3)

12 years agov0.61.3 v0.61.3
Gary Lowell [Wed, 5 Jun 2013 18:10:05 +0000 (11:10 -0700)]
v0.61.3

12 years agoos/LevelDBStore: only remove logger if non-null
Sage Weil [Tue, 4 Jun 2013 17:42:13 +0000 (10:42 -0700)]
os/LevelDBStore: only remove logger if non-null

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit ce67c58db7d3e259ef5a8222ef2ebb1febbf7362)
Fixes: #5255
12 years agotest_librbd: use correct type for varargs snap test
Josh Durgin [Mon, 3 Jun 2013 22:57:23 +0000 (15:57 -0700)]
test_librbd: use correct type for varargs snap test

uint64_t is passed in, but int was extracted. This fails on 32-bit builds.

Fixes: #5220
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 17029b270dee386e12e5f42c2494a5feffd49b08)

12 years agoos/LevelDBStore: fix merge loop
Sage Weil [Mon, 3 Jun 2013 01:07:34 +0000 (18:07 -0700)]
os/LevelDBStore: fix merge loop

We were double-incrementing p, both in the for statement and in the
body.  While we are here, drop the unnecessary else's.

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

12 years agomsgr: add get_messenger() to Connection
Sage Weil [Mon, 3 Jun 2013 00:27:10 +0000 (17:27 -0700)]
msgr: add get_messenger() to Connection

This was part of commit 27381c0c6259ac89f5f9c592b4bfb585937a1cfc.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: start lease timer from peon_init()
Sage Weil [Sat, 1 Jun 2013 00:09:19 +0000 (17:09 -0700)]
mon: start lease timer from peon_init()

In the scenario:

 - leader wins, peons lose
 - leader sees it is too far behind on paxos and bootstraps
 - leader tries to sync with someone, waits for a quorum of the others
 - peons sit around forever waiting

The problem is that they never time out because paxos never issues a lease,
which is the normal timeout that lets them detect a leader failure.

Avoid this by starting the lease timeout as soon as we lose the election.
The timeout callback just does a bootstrap and does not rely on any other
state.

I see one possible danger here: there may be some "normal" cases where the
leader takes a long time to issue its first lease that we currently
tolerate, but won't with this new check in place.  I hope that raising
the lease interval/timeout or reducing the allowed paxos drift will make
that a non-issue.  If it is problematic, we will need a separate explicit
"i am alive" from the leader while it is getting ready to issue the lease
to prevent a live-lock.

Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit f1ccb2d808453ad7ef619c2faa41a8f6e0077bd9)

12 years agomon: discard messages from disconnected clients
Sage Weil [Fri, 31 May 2013 05:52:21 +0000 (22:52 -0700)]
mon: discard messages from disconnected clients

If the client is not connected, discard the message.  They will
reconnect and resend anyway, so there is no point in processing it
twice (now and later).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit fb3cd0c2a8f27a1c8d601a478fd896cc0b609011)

12 years agomsgr: add Messenger reference to Connection
Sage Weil [Wed, 22 May 2013 15:13:21 +0000 (08:13 -0700)]
msgr: add Messenger reference to Connection

This allows us to get the messenger associated with a connection.

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

12 years agomon/Paxos: adjust trimming defaults up; rename options
Sage Weil [Thu, 30 May 2013 22:59:49 +0000 (15:59 -0700)]
mon/Paxos: adjust trimming defaults up; rename options

- trim more at a time (by an order of magnitude)
- rename fields to paxos_trim_{min,max}; only trim when there are min items
  that are trimmable, and trim at most max items at a time.
- adjust the paxos_service_trim_{min,max} values up by a factor of 2.

Since we are compacting every time we trim, adjusting these up mean less
frequent compactions and less overall work for the monitor.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 6b8e74f0646a7e0d31db24eb29f3663fafed4ecc)

12 years agocommon/Preforker: fix warnings
Sage Weil [Wed, 8 May 2013 23:42:24 +0000 (16:42 -0700)]
common/Preforker: fix warnings

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

12 years agofix test users of LevelDBStore
Sage Weil [Thu, 30 May 2013 22:53:35 +0000 (15:53 -0700)]
fix test users of LevelDBStore

Need to pass in cct.

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

12 years agomon: destroy MonitorDBStore before g_ceph_context
Sage Weil [Fri, 31 May 2013 04:43:50 +0000 (21:43 -0700)]
mon: destroy MonitorDBStore before g_ceph_context

Put it on the heap so that we can destroy it before the g_ceph_context
cct that it references.  This fixes a crash like

*** Caught signal (Segmentation fault) **
in thread 4034a80
ceph version 0.63-204-gcf9aa7a (cf9aa7a0037e56eada8b3c1bb59d59d0bfe7bba5)
1: ceph-mon() [0x59932a]
2: (()+0xfcb0) [0x4e41cb0]
3: (Mutex::Lock(bool)+0x1b) [0x6235bb]
4: (PerfCountersCollection::remove(PerfCounters*)+0x27) [0x6a0877]
5: (LevelDBStore::~LevelDBStore()+0x1b) [0x582b2b]
6: (LevelDBStore::~LevelDBStore()+0x9) [0x582da9]
7: (main()+0x1386) [0x48db16]
8: (__libc_start_main()+0xed) [0x658076d]
9: ceph-mon() [0x4909ad]

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

12 years agomon: fix leak of health_monitor and config_key_service
Sage Weil [Thu, 30 May 2013 18:07:06 +0000 (11:07 -0700)]
mon: fix leak of health_monitor and config_key_service

Switch to using regular pointers here.  The lifecycle of these services is
very simple such that refcounting is overkill.

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

12 years agomon: return instead of exit(3) via preforker
Sage Weil [Thu, 30 May 2013 00:54:17 +0000 (17:54 -0700)]
mon: return instead of exit(3) via preforker

This lets us run all the locally-scoped dtors so that leak checking will
work.

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

12 years agoos/LevelDBStore: add perfcounters
Sage Weil [Thu, 30 May 2013 21:57:42 +0000 (14:57 -0700)]
os/LevelDBStore: add perfcounters

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

12 years agomon: make compaction bounds overlap
Sage Weil [Thu, 30 May 2013 21:36:41 +0000 (14:36 -0700)]
mon: make compaction bounds overlap

When we trim items N to M, compact over range (N-1) to M so that the
items in the queue will share bounds and get merged.  There is no harm in
compacting over a larger range here when the lower bound is a key that
doesn't exist anyway.

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

12 years agoos/LevelDBStore: merge adjacent ranges in compactionqueue
Sage Weil [Thu, 30 May 2013 21:26:42 +0000 (14:26 -0700)]
os/LevelDBStore: merge adjacent ranges in compactionqueue

If we get behind and multiple adjacent ranges end up in the queue, merge
them so that we fire off compaction on larger ranges.

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

12 years agomon: compact trimmed range, not entire prefix
Sage Weil [Wed, 29 May 2013 15:40:32 +0000 (08:40 -0700)]
mon: compact trimmed range, not entire prefix

This will reduce the work that leveldb is asked to do by only triggering
compaction of the keys that were just trimmed.

We ma want to further reduce the work by compacting less frequently, but
this is at least a step in that direction.

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

12 years agomon/MonitorDBStore: allow compaction of ranges
Sage Weil [Wed, 29 May 2013 15:35:44 +0000 (08:35 -0700)]
mon/MonitorDBStore: allow compaction of ranges

Allow a transaction to describe the compaction of a range of keys.  Do this
in a backward compatible say, such that older code will interpret the
compaction of a prefix + range as compaction of the entire prefix.  This
allows us to avoid introducing any new feature bits.

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

Conflicts:

src/mon/MonitorDBStore.h

12 years agoos/LevelDBStore: allow compaction of key ranges
Sage Weil [Wed, 29 May 2013 15:34:13 +0000 (08:34 -0700)]
os/LevelDBStore: allow compaction of key ranges

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

12 years agoos/LevelDBStore: do compact_prefix() work asynchronously
Sage Weil [Tue, 28 May 2013 23:35:55 +0000 (16:35 -0700)]
os/LevelDBStore: do compact_prefix() work asynchronously

We generally do not want to block while compacting a range of leveldb.
Push the blocking+waiting off to a separate thread.  (leveldb will do what
it can to avoid blocking internally; no reason for us to wait explicitly.)

This addresses part of #5176.

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

12 years agoqa: rsync test: exclude /usr/local
Sage Weil [Sun, 12 May 2013 00:36:13 +0000 (17:36 -0700)]
qa: rsync test: exclude /usr/local

Some plana have non-world-readable crap in /usr/local/samba.  Avoid
/usr/local entirely for that and any similar landmines.

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

12 years agomon: fix uninitialized fields in MMonHealth
Sage Weil [Sat, 1 Jun 2013 04:16:54 +0000 (21:16 -0700)]
mon: fix uninitialized fields in MMonHealth

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

12 years agoPGLog: only add entry to caller_ops in add() if reqid_is_indexed()
Samuel Just [Fri, 31 May 2013 20:44:39 +0000 (13:44 -0700)]
PGLog: only add entry to caller_ops in add() if reqid_is_indexed()

Fixes: #5216
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG: don't write out pg map epoch every handle_activate_map
Samuel Just [Mon, 15 Apr 2013 23:33:48 +0000 (16:33 -0700)]
PG: don't write out pg map epoch every handle_activate_map

We don't actually need to write out the pg map epoch on every
activate_map as long as:
a) the osd does not trim past the oldest pg map persisted
b) the pg does update the persisted map epoch from time
to time.

To that end, we now keep a reference to the last map persisted.
The OSD already does not trim past the oldest live OSDMapRef.
Second, handle_activate_map will trim if the difference between
the current map and the last_persisted_map is large enough.

Fixes: #4731
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 2c5a9f0e178843e7ed514708bab137def840ab89)

Conflicts:

src/common/config_opts.h
src/osd/PG.cc
- last_persisted_osdmap_ref gets set in the non-static
  PG::write_info

12 years agoupstart: handle upper case in cluster name and id
Alexandre Marangone [Fri, 31 May 2013 19:33:11 +0000 (12:33 -0700)]
upstart: handle upper case in cluster name and id

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
(cherry picked from commit 851619ab6645967e5d7659d9b0eea63d5c402b15)

12 years agoOSDMonitor: skip new pools in update_pools_status() and get_pools_health()
Samuel Just [Tue, 21 May 2013 22:22:56 +0000 (15:22 -0700)]
OSDMonitor: skip new pools in update_pools_status() and get_pools_health()

New pools won't be full.  mon->pgmon()->pg_map.pg_pool_sum[poolid] will
implicitly create an entry for poolid causing register_new_pgs() to assume that
the newly created pgs in the new pool are in fact a result of a split
preventing MOSDPGCreate messages from being sent out.

Fixes: #4813
Backport: cuttlefish
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 0289c445be0269157fa46bbf187c92639a13db46)

12 years agorgw: only append prefetched data if reading from head
Yehuda Sadeh [Thu, 30 May 2013 19:58:11 +0000 (12:58 -0700)]
rgw: only append prefetched data if reading from head

Fixes: #5209
Backport: bobtail, cuttlefish
If the head object wrongfully contains data, but according to the
manifest we don't read from the head, we shouldn't copy the prefetched
data. Also fix the length calculation for that data.

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

12 years agorgw: don't copy object idtag when copying object
Yehuda Sadeh [Thu, 30 May 2013 16:34:21 +0000 (09:34 -0700)]
rgw: don't copy object idtag when copying object

Fixes: #5204
When copying object we ended up also copying the original
object idtag which overrode the newly generated one. When
refcount put is called with the wrong idtag the count
does't go down.

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

12 years agodebian: sync up postinst and prerm with latest
Sage Weil [Thu, 30 May 2013 15:53:22 +0000 (08:53 -0700)]
debian: sync up postinst and prerm with latest

- do not use invoke-rc.d for upstart
- do not stop daemons on upgrade
- misc other cleanups

This corresponds to the state of master as of cf9aa7a.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: Monitor: backup monmap using all ceph features instead of quorum's
Joao Eduardo Luis [Thu, 30 May 2013 17:17:28 +0000 (18:17 +0100)]
mon: Monitor: backup monmap using all ceph features instead of quorum's

When a monitor is freshly created and for some reason its initial sync is
aborted, it will end up with an incorrect backup monmap.  This monmap is
incorrect in the sense that it will not contain the monitor's names as
it will expect on the next run.

This results from us being using the quorum features to encode the monmap
when backing it up, instead of CEPH_FEATURES_ALL.

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

12 years agoosd: do not assume head obc object exists when getting snapdir
Sage Weil [Wed, 29 May 2013 16:49:11 +0000 (09:49 -0700)]
osd: do not assume head obc object exists when getting snapdir

For a list-snaps operation on the snapdir, do not assume that the obc for the
head means the object exists.  This fixes a race between a head deletion and
a list-snaps that wrongly returns ENOENT, triggered by the DiffItersateStress
test when thrashing OSDs.

Fixes: #5183
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 29e4e7e316fe3f3028e6930bb5987cfe3a5e59ab)

12 years agoosd: initialize new_state field when we use it
Sage Weil [Wed, 29 May 2013 23:50:04 +0000 (16:50 -0700)]
osd: initialize new_state field when we use it

If we use operator[] on a new int field its value is undefined; avoid
reading it or using |= et al until we initialize it.

Fixes: #4967
Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 50ac8917f175d1b107c18ecb025af1a7b103d634)

12 years agoHashIndex: sync top directory during start_split,merge,col_split
Samuel Just [Tue, 28 May 2013 18:10:05 +0000 (11:10 -0700)]
HashIndex: sync top directory during start_split,merge,col_split

Otherwise, the links might be ordered after the in progress
operation tag write.  We need the in progress operation tag to
correctly recover from an interrupted merge, split, or col_split.

Fixes: #5180
Backport: cuttlefish, bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 5bca9c38ef5187c7a97916970a7fa73b342755ac)

12 years agomon: Paxos: get rid of the 'prepare_bootstrap()' mechanism
Joao Eduardo Luis [Wed, 22 May 2013 12:59:08 +0000 (13:59 +0100)]
mon: Paxos: get rid of the 'prepare_bootstrap()' mechanism

We don't need it after all.  If we are in the middle of some proposal,
then we guarantee that said proposal is likely to be retried.  If we
haven't yet proposed, then it's forever more likely that a client will
eventually retry the message that triggered this proposal.

Basically, this mechanism attempted at fixing a non-problem, and was in
fact triggering some unforeseen issues that would have required increasing
the code complexity for no good reason.

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

12 years agomon: Paxos: finish queued proposals instead of clearing the list
Joao Eduardo Luis [Wed, 22 May 2013 12:51:13 +0000 (13:51 +0100)]
mon: Paxos: finish queued proposals instead of clearing the list

By finishing these Contexts, we make sure the Contexts they enclose (to be
called once the proposal goes through) will behave as their were initially
planned:  for instance, a C_Command() may retry the command if a -EAGAIN
is passed to 'finish_contexts', while a C_Trimmed() will simply set
'going_to_trim' to false.

This aims at fixing at least a bug in which Paxos will stop trimming if an
election is triggered while a trim is queued but not yet finished.  Such
happens because it is the C_Trimmed() context that is responsible for
resetting 'going_to_trim' back to false.  By clearing all the contexts on
the proposal list instead of finishing them, we stay forever unable to
trim Paxos again as 'going_to_trim' will stay True till the end of time as
we know it.

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

12 years agomon: Paxos: finish_proposal() when we're finished recovering
Joao Eduardo Luis [Fri, 17 May 2013 17:23:36 +0000 (18:23 +0100)]
mon: Paxos: finish_proposal() when we're finished recovering

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 2ff23fe784245f3b86bc98e0434b21a5318e0a7b)

12 years agoMerge branch 'wip_scrub_tphandle' into cuttlefish
Samuel Just [Fri, 24 May 2013 03:09:29 +0000 (20:09 -0700)]
Merge branch 'wip_scrub_tphandle' into cuttlefish

Fixes: #5159
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG: ping tphandle during omap loop as well
Samuel Just [Fri, 24 May 2013 00:40:44 +0000 (17:40 -0700)]
PG: ping tphandle during omap loop as well

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: reset timeout in _scan_list for each object, read chunk
Samuel Just [Thu, 23 May 2013 22:24:39 +0000 (15:24 -0700)]
PG: reset timeout in _scan_list for each object, read chunk

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD,PG: pass tphandle down to _scan_list
Samuel Just [Thu, 23 May 2013 22:23:05 +0000 (15:23 -0700)]
OSD,PG: pass tphandle down to _scan_list

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agorgw: iterate usage entries from correct entry
Yehuda Sadeh [Thu, 23 May 2013 04:34:52 +0000 (21:34 -0700)]
rgw: iterate usage entries from correct entry

Fixes: #5152
When iterating through usage entries, and when user id was
provided, we started at the user's first entry and not from
the entry indexed by the request start time.
This commit fixes the issue.

Backport: bobtail

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

12 years agosysvinit: fix enumeration of local daemons when specifying type only
Sage Weil [Fri, 17 May 2013 03:37:05 +0000 (20:37 -0700)]
sysvinit: fix enumeration of local daemons when specifying type only

- prepend $local to the $allconf list at the top
- remove $local special case for all case
- fix the type prefix checks to explicitly check for prefixes

Fugly bash, but works!

Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit c80c6a032c8112eab4f80a01ea18e1fa2c7aa6ed)

12 years agosysvinit: fix osd weight calculation on remote hosts
Sage Weil [Wed, 22 May 2013 16:47:29 +0000 (09:47 -0700)]
sysvinit: fix osd weight calculation on remote hosts

We need to do df on the remote host, not locally.

Simlarly, the ceph command uses the osd key, which exists remotely; run it there.

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

12 years agosysvinit: use known hostname $host instead of (incorrectly) recalculating
Sage Weil [Wed, 22 May 2013 16:47:03 +0000 (09:47 -0700)]
sysvinit: use known hostname $host instead of (incorrectly) recalculating

We would need to do hostname -s on the remote node, not the local one.
But we already have $host; use it!

Reported-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit caa15a34cb5d918c0c8b052cd012ec8a12fca150)

12 years agomon: be a bit more verbose about osd mark down events
Sage Weil [Mon, 20 May 2013 19:41:30 +0000 (12:41 -0700)]
mon: be a bit more verbose about osd mark down events

Put these in the cluster log; they are interesting.

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

12 years agoPG: subset_last_update must be at least log.tail
Samuel Just [Mon, 13 May 2013 21:23:00 +0000 (14:23 -0700)]
PG: subset_last_update must be at least log.tail

Fixes: 5020
Backport: bobtail, cuttlefish
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 72bf5f4813c273210b5ced7f7793bc1bf813690c)

12 years agoFileJournal: adjust write_pos prior to unlocking write_lock
Samuel Just [Tue, 14 May 2013 23:35:48 +0000 (16:35 -0700)]
FileJournal: adjust write_pos prior to unlocking write_lock

In committed_thru, we use write_pos to reset the header.start value in cases
where seq is past the end of our journalq.  It is therefore important that the
journalq be updated atomically with write_pos (that is, under the write_lock).

The call to align_bl() is moved into do_write in order to ensure that write_pos
is adjusted correctly prior to write_bl().

Also, we adjust pos at the end of write_bl() such that pos \in [get_top(),
header.max_size) after write_bl().

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

12 years agomon: implement --extract-monmap <filename>
Sage Weil [Tue, 21 May 2013 21:36:11 +0000 (14:36 -0700)]
mon: implement --extract-monmap <filename>

This will make for a simpler process for
  http://ceph.com/docs/master/rados/operations/add-or-rm-mons/#removing-monitors-from-an-unhealthy-cluster

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

12 years agolibrbd: make image creation defaults configurable
Josh Durgin [Thu, 16 May 2013 22:28:40 +0000 (15:28 -0700)]
librbd: make image creation defaults configurable

Programs using older versions of the image creation functions can't
set newer parameters like image format and fancier striping.

Setting these options lets them use all the new functionality without
being patched and recompiled to use e.g. rbd_create3().
This is particularly useful for things like qemu-img, which does not
know how to create format 2 images yet.

Refs: #5067
backport: cuttlefish, bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit aacc9adc4e9ca90bbe73ac153cc754a3a5b2c0a1)

12 years agorbd.py: fix stripe_unit() and stripe_count()
Josh Durgin [Thu, 16 May 2013 22:21:24 +0000 (15:21 -0700)]
rbd.py: fix stripe_unit() and stripe_count()

These matched older versions of the functions, but would segfault
using the current versions.

backport: cuttlefish, bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 53ee6f965e8f06c7256848210ad3c4f89d0cb5a0)

12 years agocls_rbd: make sure stripe_unit is not larger than object size
Josh Durgin [Thu, 16 May 2013 22:19:46 +0000 (15:19 -0700)]
cls_rbd: make sure stripe_unit is not larger than object size

Test a few other cases too.

backport: cuttlefish, bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 810306a2a76eec1c232fd28ec9c351e827fa3031)

12 years agorgw: protect ops log socket formatter
Yehuda Sadeh [Fri, 3 May 2013 19:57:00 +0000 (12:57 -0700)]
rgw: protect ops log socket formatter

Fixes: #4905
Ops log (through the unix domain socket) uses a formatter, which wasn't
protected.

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

12 years agoMakefle: force char to be signed
Sage Weil [Thu, 16 May 2013 06:02:10 +0000 (23:02 -0700)]
Makefle: force char to be signed

On an armv7l build, we see errors like

 warning: rgw/rgw_common.cc:626:16: comparison is always false due to limited range of data type [-Wtype-limits]

from code

      char c1 = hex_to_num(*src++);
...
      if (c1 < 0)

Force char to be signed (regardless of any weird architecture's default)
to avoid risk of this leading to misbehavior.

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

12 years agodebian: stop sysvinit on ceph.prerm
Sage Weil [Mon, 20 May 2013 20:34:27 +0000 (13:34 -0700)]
debian: stop sysvinit on ceph.prerm

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

12 years agoceph df: fix si units for 'global' stats
Mike Kelly [Thu, 16 May 2013 16:29:50 +0000 (12:29 -0400)]
ceph df: fix si units for 'global' stats

si_t expects bytes, but it was being given kilobytes.

Signed-off-by: Mike Kelly <pioto@pioto.org>
(cherry picked from commit 0c2b738d8d07994fee4c73dd076ac9364a64bdb2)

12 years agoudev: install disk/by-partuuid rules
Sage Weil [Fri, 17 May 2013 01:40:29 +0000 (18:40 -0700)]
udev: install disk/by-partuuid rules

Wheezy's udev (175-7.2) has broken rules for the /dev/disk/by-partuuid/
symlinks that ceph-disk relies on.  Install parallel rules that work.  On
new udev, this is harmless; old older udev, this will make life better.

Fixes: #4865
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit d8d7113c35b59902902d487738888567e3a6b933)

12 years agodebian: make radosgw require matching version of librados2
Sage Weil [Thu, 16 May 2013 20:17:45 +0000 (13:17 -0700)]
debian: make radosgw require matching version of librados2

...indirectly via ceph-common.  We get bad behavior when they diverge, I
think because of libcommon.la being linked both statically and dynamically.

Fixes: #4997
Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
(cherry picked from commit 604c83ff18f9a40c4f44bc8483ef22ff41efc8ad)

12 years agomon: fix validatation of mds ids in mon commands
Sage Weil [Sat, 11 May 2013 05:14:05 +0000 (22:14 -0700)]
mon: fix validatation of mds ids in mon commands

Fixes: #4996
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 5c305d63043762027323052b4bb3ae3063665c6f)

12 years agov0.61.2 v0.61.2
Gary Lowell [Mon, 13 May 2013 18:58:35 +0000 (11:58 -0700)]
v0.61.2