Otherwise, the monclient shutdown may deadlock waiting
on a context trying to take the RadosClient lock.
Fixes: #5897
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
To make sure clients trim the deleted inode from the their cache
ASAP. After all clients release the inode, we can reclaim space.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Also, loop on error. There's no reason to exit the interpreter loop on
an error, and it's probably less annoying if we don't. Print the error,
and any output, and continue.
Fixes: #5746
Signed-off-by: Dan Mick <dan.mick@inktank.com>
If an entity already existed, 'auth add' would smash its key and caps
with whatever was on the supplied keyring file; if a keyring weren't
specified, we would simply generate a new key and destroy all existing
caps (unless caps were specified and happened to be different from the
already in-place caps). This behaviour is obviously sketchy.
With this patch we now enforce the following behaviour:
- if entity does not exist in current state, check if we are about to
create it (by checking the pending state); if so, wait for the new state
to be committed and re-handle the command then, so we don't get bad
results from pending request
- if the command reproduces the current state (same key, same caps), we
return 0; else,
- if entity exists and supplied key OR caps are different, return -EINVAL
- else create a new entity.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
We now perform all perm checks for commands on Monitor::handle_command().
Services no longer need to check them.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Also: One redundant flush in AuthMonitor, two in PGMonitor, and
a ds << that should have been conditional in Monitor.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
It is useful to map OSDs to PGs and vice-versa; pg dump gives that
information, but gives a lot of other stuff. This is the same dump
as pg dump pgs, but omitting everything except pgid, state, and
osd up and acting sets.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
We need to hold mds_lock here.
Normally the con also holds a reference, but an ill-timed connection reset
could drop it.
Fixes: #5883
Backport: dumpling, cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Fixes: #5875
ops logging should (at this point) should only include object
store related operations.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>