Pipe: rename keepalive->send_keepalive

Signed-off-by: Greg Farnum <greg@inktank.com>
msgr: add KEEPALIVE2 feature

This is similar to KEEPALIVE, except a timestamp is also exchanged.  It is
sent with the KEEPALIVE, and then returned with the ACK.  The last
received stamp is stored in the Connection so that it can be queried for
liveness.  Since all of the users of keepalive are already regularly
triggering a keepalive, they can check the liveness at the same time.

See #7888.

Signed-off-by: Sage Weil <sage@inktank.com>
mon/MonClient: use keepalive2 to verify the mon session is live

Verify that the mon is responding by checking the keepalive2 reply
timestamp.  We cannot rely solely on TCP timing out and returning an
error.

Fixes: #7888
Signed-off-by: Sage Weil <sage@inktank.com>
global: separate first half of global_init into global_pre_init

The pre_init now captures enough to create the g_ceph_context and parse
and initialize the in-memory config.  However, we don't

 - fiddle with signal handlers
 - init lockdep
 - call config observers (which starts up logging)

Signed-off-by: Sage Weil <sage@inktank.com>
ceph-conf: use global_pre_init to avoid starting logging

This avoids starting up logging, which is not appropriate when we are
examining the config state and not actually starting up the entity in
question.

Fixes: #7849
Signed-off-by: Sage Weil <sage@inktank.com>
fuse: implement 'access' low level function

Add an empty 'access' function to fuse low level functions. This
allow us to use ceph-fuse with fuse_default_permissions = false.
'fuse_default_permissions = false' can significantly improve the
speed of create/removing large number of files.

When fuse_default_permissions is true, the fuse kernel module sends
a getattr request whenever the kernel needs to check a directory's
permission. getattr (STAT_CAP_INODE_ALL) can be very slow if the
directory was just modified.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
.gitignore: add examples/librados files

Signed-off-by: Loic Dachary <loic@dachary.org>
mon/PGMap: clear pool sum when last pg is deleted

Use the x.0 pg as a sentinel for the existence of the pool.  Note that we
have to clean in up two paths: apply_incrmenetal (which is actually
deprecated) and the normal PGMonitor refresh.

Fixes: #7912
Signed-off-by: Sage Weil <sage@inktank.com>
Add ceph-client-debug and jerasure shared objects to RPM spec file.
Merge pull request #1570 from dachary/wip-gitignore

.gitignore: add examples/librados files

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #1567 from ceph/wip-7849

ceph-conf: don't create log files

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
java/test: ceph.file.layout xattr is still not there now

b8ea65694faf59f12f285a65dc21753dab20ba11 tried to fix this, but
missed a spot.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
OSDMonitor: add 'osd pg-temp ...' command

ceph osd pg-temp <pgid> [<osd1> [<osd2> ...]]

Examples:

ceph osd pg-temp 0.2 0 1 2 # set pg_temp mapping for 0.2 to osds [0,1,2]
ceph osd pg-temp 0.2 3     # set pg_temp mapping for 0.2 to osds [3]
ceph osd pg-temp 0.2       # remove pg_temp mapping for 0.2

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
OSDMonitor: add 'osd primary-temp ...' command

ceph osd primary-temp <pgid> [<osd>]

Examples:

ceph osd primary-temp 0.2 4 # set primary_temp mapping for 0.2 to osd4
ceph osd primary-temp 0.2   # remove primary_temp mapping for 0.2

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
OSDMonitor: add 'mon osd allow primary temp' bool option

By default, we don't send out maps with primary_temp mappings because
there is no infrastructure in place that would make sure that the
entire cluster knows about primary_temp.  Add an option to allow
primary_temp mappings, for development purposes.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
mon/OSDMonitor: clear primary_temp on osd pg_temp updates

Until the OSD and the MOSDPGTemp messages encode primary_temp updates,
assume that any pg_temp update will clear primary_temp.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Ilya Dryomov <ilya.dryomov@inktank.com>
qa/workunits/cephtool/test.sh: test 'osd pg-temp ...'

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1566 from ceph/wip-fuse-access

fuse: implement 'access' low level function

Reviewed-by: Sage Weil <sage@inktank.com>
Merge pull request #1556 from ceph/wip-7888

msgr: add new ping/ping reply to use in place of keepalive

Reviewed-by: Greg Farnum <greg@inktank.com>
Merge pull request #1573 from ceph/wip-7912

mon/PGMap: clear pool sum when last pg is deleted

Reviewed-by: Greg Farnum <greg@inktank.com>