entity_name: is_*() methods

Signed-off-by: Sage Weil <sage@inktank.com>
osd: simplify session peer type check

Check the authenticated peer name directly; don't store a copy in the
OSDCaps struct.  Also set the entity_name member of the session!

Signed-off-by: Sage Weil <sage@inktank.com>
osdcaps: drop dead peer_type code

Not sure what this wasn intended for.

Signed-off-by: Sage Weil <sage@inktank.com>
config: make meta expansion in set_val optional

Signed-off-by: Sage Weil <sage@inktank.com>
config: expand any config variable in config

This is currently broken wrt 'foo' vs 'foo_bar', but otherwise works.

Signed-off-by: Sage Weil <sage@inktank.com>
config: improve variable substitution

- allow ${foo_bar}
- prevent $foogarbage from substitution variable 'foo'
- use std::string throughout
- improve tests

Signed-off-by: Sage Weil <sage@inktank.com>
mds: add mds_data config

This is where the keyring will live.  Eventually more may move in too.

Signed-off-by: Sage Weil <sage@inktank.com>
new default keyring location for daemons

$osd_data/keyring
$mds_data/keyring

Fixes: #2498
Signed-off-by: Sage Weil <sage@inktank.com>
vstart.sh: set data dirs instead of keyring locations

Signed-off-by: Sage Weil <sage@inktank.com>
rgw: default keyring to $rgw_data/keyring

Signed-off-by: Sage Weil <sage@inktank.com>
ceph_argparse: make entityname parsing error more helpful

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

Reviewed-by: Greg Farnum <greg@inktank.com>
PG: track purged pgs during active

See bug #2462.

The following sequence could cause a log assuming a non-empty pg
to an empty replica:

1. primary sends query to stray
2. stray sends notify to primary
3. primary sends purge to stray removing stray from peer_info
4. stray recieves query and sends a notify
5. stray recieves purge and purges its pg
6. primary recieves notify from stray and adds it to peer_info
	note: peer_info[stray] is now wrong
7. acting set changes, primary is still primary, stray is replica
8. primary sends log to replica based on incorrect info from 6.

This patch adds a purged_peer set which is populated during purge_strays
and cleared during start_peering_interval.  The primary will ignore
notifies from the peer once the peer is in this set.

Signed-off-by: Samuel Just <sam.just@inktank.com>
init-ceph: make 'status' report running version

Try to report the running version with 'status'.

Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
osd: reimplement OSDCap struct

The old OSDCaps had a few undesireable features:

 - deny
 - weird 'default permissions' semantics when auid matches and no other
   cap is specified
 - difficult to understand, maintain parser

This version is renamed and has a few nice features:

 - spirit grammar for parsing
 - simple internal grant structure with simple semantics
 - support for object prefix maches
 - partial support for per-class (not yet implmeented by the OSD)

Signed-off-by: Sage Weil <sage@inktank.com>
CrushTester.cc: eliminated old compiler warning of uninitialized pointer.

Signed-off-by: caleb miles <caselim@gmail.com>
radosgw: upstart support

Like the other upstart configs, these assume the default value for
'rgw data'.  Same pattern as ceph-mon and ceph-mds.

Fixes: #2415
Signed-off-by: Sage Weil <sage@inktank.com>
debian: install radosgw upstart configs, daemon dir

Signed-off-by: Sage Weil <sage@inktank.com>
Makefile: link gtest statically

The problem:

 - the unittests link against gtest, and gtest is not installed.  that's
   normally fine, but...
 - rbd and rados api unit tests link against gtest, and are installed
   by 'make install'.  they are needed for teuthology runs, etc.
 - if we build gtest as an .la library, we can only control whether *all*
   or *no* .la libraries are linked statically.
 - we want librados to be linked dynamically.

The solution:

 - build gtest as .a instead of a libtool library
 - link it statically, always.

Unit test binaries are bigger now.  Oh well...

Fixes: #2331
Signed-off-by: Sage Weil <sage@inktank.com>
rbd: fix usage test

Fixes: #2347
Signed-off-by: Sage Weil <sage@inktank.com>