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>
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>
*: 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>
Merge branch 'next'
config.h: ensure U64 option defaults are computed as 64 bits

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
client: fix warning

client/Client.cc: In member function 'virtual void Client::ms_handle_remote_reset(Connection*)':
warning: client/Client.cc:7892:9: enumeration value 'STATE_NEW' not handled in switch [-Wswitch]
warning: client/Client.cc:7892:9: enumeration value 'STATE_OPEN' not handled in switch [-Wswitch]
warning: client/Client.cc:7892:9: enumeration value 'STATE_CLOSED' not handled in switch [-Wswitch]

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
common/Preforker: fix warning

common/Preforker.h: In member function ‘int Preforker::signal_exit(int)’:
warning: common/Preforker.h:82:45: ignoring return value of ‘ssize_t safe_write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]

This is harder than it should be to fix.  :(
  http://stackoverflow.com/questions/3614691/casting-to-void-doesnt-remove-warn-unused-result-error

Whatever, I guess we can do something useful with this return value.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
Merge remote-tracking branch 'gh/next' into wip-mon
Merge remote-tracking branch 'gh/master' into wip-mon