Several targets had libglobal.la in the _LDFLAGS macro definition
when it should have been in the _LDADD macro. Remove those occurrance
and add the LIBGLOBAL_LDA macro to the targets _LDADD instead.
See related commit 71f3e56d4b
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
We can race with a mon upgrade:
- get command descriptions, get EINVAL
- mons upgrade, new quorum
- send old-style command
- get EINVAL
In this case, we should try one last time to get the command descriptions.
Fixes: #5788
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
The Observer class we defined to observe conf changes and thus avoid
triggering #5205 (as fixed by eb86eebe1b),
was returning always the same const static array, which would lead us to
always populate the observer's list with an observer for 'public_addr'.
This would of course become a problem when trying to obtain the observer
for 'cluster_add' during md_config_t::set_val() -- thus triggering the
same assert as initially reported on #5205.
Backport: cuttlefish
Fixes: #5205
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Fixes: #5882
Translate the EBUSY we get when trying to lock a shard / object
to 423 Locked response. Beforehand it was just translated to the
default 500.
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This will make it easier to catch interface changes, like the
ones that triggered #5921.
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Fixes: #5921
As part of the work that was made for dumpling, the http
client in-data callback was renamed in order to avoid confusion.
However, we missed the rename in a couple of places, which this
patch amend.
Reported-by: Roald van Loon <roaldvanloon@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
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>