version: drop 'commit:' prefix on sha1

This was only added so that crash dumps pasted into redmine would link
properly, but those links don't work in redmine right now anyway, so drop
it.  The prefix makes it harder to manually cut and paste.

Signed-off-by: Sage Weil <sage@inktank.com>
objecter: fix handling for pool DNE on pgls

Fix check for whther the pool exists for pgls.  This was broken ages ago by
e0ec2865014b5ac32c7e4e4427c7d6f8681f3736.

Signed-off-by: Sage Weil <sage@inktank.com>
objecter: refactor pool dne checks

We need to verify that a pool really doesn't exist before erroring out. In
particular, we need to make sure it doesn't exist in an osdmap we haven't
seen yet (future from this client's perspective, but still strictly in the
past).  The code to do this before was fragile and broken.  A 'map latest'
check would go out for every map epoch we process, and we would clear out
our check state on the first reply.  Also, we would have to win the race
to get a check back for the exact map that we have before we would succeed.

Instead:
 - If we haven't already done so, ask the monitor for the latest map.  This
   establishes an upper bound on the current map at the time the request
   was queued.
 - On reply, make note of this map.
 - Thereafter, we can fail the request if at any point we call into the
   check_*_pool_dne() helper and the current map is >= that bound map. The
   caller performs the actual check for whether the pool exists or not.

Among other things, this fixes testrados_list_parallel.

Signed-off-by: Sage Weil <sage@inktank.com>
testrados_list_parallel: fix

- don't delete the pool during the run
- ignore create error codes (may succeed for return EEXIST)
- use a unique pool name

Signed-off-by: Sage Weil <sage@inktank.com>
testrados_watch_notify: fix most tests, disable one

The last test is disabled until #2339 is resolved.

Signed-off-by: Sage Weil <sage@inktank.com>
qa: run multiprocess rados tests

These now pass, except for the watch/notify one.

Signed-off-by: Sage Weil <sage@inktank.com>
monclient: drop now-unused MonClient::is_latest_map()

Any sensible caller probably wants to use get_version() directly.

Signed-off-by: Sage Weil <sage@inktank.com>
mds: deal with the case where you have a Session close event without a Session.

This case shouldn't ever happen, but we've seen it, so there's a bug
somewhere. Handling a Session close when the Session is already closed
is easy, though -- we don't need to do anything!

Signed-off-by: Greg Farnum <greg@inktank.com>
mds: make dup session close an error; make case consistent

Signed-off-by: Sage Weil <sage@inktank.com>
mds: fix typo, build

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

Lightly-reviewed-by: Josh Durgin <josh.durgin@inktank.com>
auth: change default: require 'cephx' for daemons

Daemons will require cephx.

Clients will require nothing (i.e., will be able to connect to a cluster
with auth disabled).

See #3136

Signed-off-by: Sage Weil <sage@inktank.com>
client: release import caps we don't have

If we don't have the inode, release the caps.  There is no point in adding
it to our cache, and that is problematic anyway because it ends up with a
ref count of zero and no dentry that will get trimmed by trim_cache(),
leaving it stuck there on shutdown.

This also aligns us with the kernel client behavior.

Signed-off-by: Sage Weil <sage@inktank.com>
java: add FileAlreadyExists exception
java: add O_WRONLY open flag
java: remove tabs to fix formatting
java: don't log after shutdown

Fixes tracker item 3371
java: add finalize() to catch missed shutdown call

Fixes tracker item #3372
java: prevent access to JNI after shutdown

Fixes tracker item #3373
java: mkdirs returns IOException

For example, CephFileAlreadyExistsException may be returned if mkdirs is
called to create a directory already present.