mon: make mark_me_down asserts match check

The OSD may have sent a request where the message source does not match
the target in the message.  Verify that the target matches so that it
matches the assert.

Signed-off-by: Sage Weil <sage@inktank.com>
udev: /dev/disk/by-parttypeuuid/$type-$uuid

We need this to help trigger OSD activations.

Signed-off-by: Sage Weil <sage@inktank.com>
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>
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>
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>
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>
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>
ceph.spec: include partuuid rules in package

Commit f3234c147e083f2904178994bc85de3d082e2836 missed this.

Signed-off-by: Sage Weil <sage@inktank.com>
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>
ceph-disk-udev: set up by-partuuid, -typeuuid symlinks on ancient udev

Make the ancient-udev/blkid workaround script for RHEL/CentOS create the
symlinks for us too.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph-disk: clear TERM to avoid libreadline hijinx

The weird output from libreadline users is related to the TERM variable.

Signed-off-by: Sage Weil <sage@inktank.com>
client: fix sync read zeroing at EOF

If we have a read that hits EOF, we need to do a short read.  Previously
we would zero the buffer if we were completely withing the file, but
we also need to zero things if we overlap with EOF.  This fixes a hang
of mpi-fsx on ceph-fuse.  Triggered/tested by
LibCephFS.MulticlientHoleEOF.

Fixes: #5368
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
libcephfs: add a couple multiclient tests

Signed-off-by: Sage Weil <sage@inktank.com>
OSD: we need to check pg ?.0 for resurrection

Fixes: #5269
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Merge branch 'next'
*: always include rados.h using types.h

types.h redefines __le* to ceph_le* to ensure endian
safety.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
ceph-disk: add some notes on wth we are up to

Signed-off-by: Sage Weil <sage@inktank.com>
Merge branch 'wip-5194' into next

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
mon: fix 'osd dump <epoch>'

The optional epoch argument was missing from the command spec.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
client: handle reset during initial mds session open

If we get a reset during our attempt to open an MDS session, close out the
Connection* and retry to open the session, moving the waiters over.

Fixes: #5379
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>