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>
rbd: reject negative size (can make image that is hard to delete)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
client: Add permissions checking to open

Users of the libcephfs api (fuse in particular)
don't check the mode against the open flags.  This
commit does the proper checks to grant/deny access
to the file.  The check_mode() function constructs
a requested mode based on the flags, and compares that
to the mode of the file.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
test: Add func. test for chmod in libcephfs

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Merge branch 'wip-3301'

Reviewed-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>
leveldb: update .gitignore

Signed-off-by: Sage Weil <sage@inktank.com>
mon: Monitor: fix potential null-pointer dereference

CID 717443: Dereference after null check (FORWARD_NULL)
At (14): Passing null pointer "detailbl" to function
"ceph::buffer::list::append(std::string const &)", which dereferences it.


Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: unlock before returning

CID 716947 (#1 of 2): Missing unlock (LOCK)
CID 716947 (#2 of 2): Missing unlock (LOCK)
At (25): Returning without unlocking "this->lock._m".

There were a couple of cases in Monitor::init() that could lead us to
return without properly unlocking. Coverity gets mad props for uncovering
this.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: LogMonitor: check return value when writing to file

CID 716851: Unchecked return value (CHECKED_RETURN)
At (51): Calling function "ceph::buffer::list::write_fd(int) const"
without checking return value.


Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: AuthMonitor: check return values

CID 716850: Unchecked return value (CHECKED_RETURN)
At (14): Calling function "KeyServer::get_auth(EntityName const &,
EntityAuth &) const" without checking return value.

CID 716849: Unchecked return value (CHECKED_RETURN)
At (14): Calling function "EntityName::from_str(std::string const &)"
without checking return value.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: MonitorStore: check return value for errors on 'open'

CID 728083: Argument cannot be negative (NEGATIVE_RETURNS)
At (22): "dirfd" is passed to a parameter that cannot be negative.
At (29): "dirfd" is passed to a parameter that cannot be negative.
CID 717445: Argument cannot be negative (NEGATIVE_RETURNS)
At (3): "dirfd" is passed to a parameter that cannot be negative.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: MonitorStore: check mkdir return value for errors

CID 728081: Unchecked return value (CHECKED_RETURN)
At (5): Calling function "mkdir(dfn, 493U)" without checking return value.
CID 716853: Unchecked return value (CHECKED_RETURN)
At (2): Calling function "mkdir(fn, 493U)" without checking return value.
CID 716855: Unchecked return value (CHECKED_RETURN)
At (2): Calling function "mkdir(fn, 493U)" without checking return value.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: MonitorStore: check return value of 'rename' for errors

CID 716854: Unchecked return value (CHECKED_RETURN)
At (10): Calling function "rename(tfn, fn)" without checking return value.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Merge remote-tracking branch 'gh/mon-coverity-fixes'

Reviewed-by: Sage Weil <sage@inktank.com>