| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
current state may not work.
Signed-off-by: Joao Eduardo Luis <joao.luis@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 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
- 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
- else create a new entity.
Signed-off-by: Joao Eduardo Luis <joao.luis@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>
|
|
|
|
| |
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
|
|
|
|
|
| |
Fixes: #5648
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
|
|
|
|
|
|
| |
A failed request has a response code *outside* the range (200, 300],
not within it.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
|
|
|
|
|
|
|
| |
requests 0.12.1 handles queryparams in the URL with embedded
spaces; requests 0.8.2 does not. Avoid the issue by quoting the
URL into expect().
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
|
|
|
|
|
|
|
|
|
| |
We may have holes in stored maps during init_splits_between
and advance_pg. In either case, we should simply skip the
missing maps.
Fixes: #5677
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
|
| |
When a nonformatted request is made, currently the only text in the
response is the (probably empty) response buffer. Add the statusmsg
as well, where the error is likely to be explained. This lets
the http client get a clue what happened.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
|
|
|
|
|
|
| |
Lurking bug since version 1...
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
|
|
|
|
|
|
|
| |
The command matching needs key/value pairs.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the leader has and older lc than we do, and we are sharing states to
bring them up to date, we still want to also share our uncommitted value.
This particular case was broken by b26b7f6e, which was only contemplating
the case where the leader was ahead of us or at the same point as us, but
not the case where the leader was behind. Note that the call to
share_state() a few lines up will bring them fully up to date, so
after they receive and store_state() for this message they will be at the
same lc as we are.
Fixes: #5750
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
| |
old-style ones
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
| |
Fix assert in OSDService::get_map()
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
| |
self.t isn't valid in the failure case; use t
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
|\
| |
| |
| |
| |
| | |
Fix CID issues
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
CID 1049213 (#3 of 3): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "rop" going out of scope leaks the
storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
CID 1049214 (#13 of 13): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "op" going out of scope leaks the
storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
CID 1049215 (#12 of 12): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "rop" going out of scope leaks the
storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix some more cases where resource wasn't deleted/freed before
call new().
CID 1049216 (#1-9 of 9): Resource leak (RESOURCE_LEAK)
overwrite_var: Overwriting "op" in "op = new_op()" leaks
the storage that "op" points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
CID 1049217 (#1 of 1): Resource leak (RESOURCE_LEAK)
overwrite_var: Overwriting "op" in "op = new_op()" leaks
the storage that "op" points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
CID 1049219 (#17 of 17): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "op" going out of scope leaks the
storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
CID 1049220 (#18 of 18): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "rop" going out of scope leaks
the storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix for coverity issue:
CID 1049231 (#1 of 1): Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value "start_key_added".
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Fix some more CID issues
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
CID 1054868 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member "cur_shard" is not
initialized in this constructor nor in any functions that it calls.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
CID 1054827 (#1 of 1): Dereference after null check (FORWARD_NULL)
var_deref_model: Passing null pointer "objv_tracker->read_version"
to function "obj_version::operator =(obj_version const &)", which
dereferences it.
Moved affected 2 cases into the block checking for objv_tracker
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
CID 1054829 (#1 of 1): Missing break in switch (MISSING_BREAK)
unterminated_case: This case (value 37) is not terminated by a
'break' statement.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
CID 1019623 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member "scrub_version" is not
initialized in this constructor nor in any functions that it calls.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also increase fd limit defaults to accomodate the larger number
of fds.
Fixes: #5692
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Mark Nelson <mark.nelson@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the replay is being replayed, we might have already
performed the rename, skip it. Also, we must set the
collection replay guard only after we have done the
rename.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A replay of an in progress merge or split might make
our counts unreliable.
Fixes: #5723
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
|\ \ \
| | | |
| | | |
| | | | |
v0.67-rc2
|
| | | | |
|
|/ / /
| | |
| | |
| | | |
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Older requests.py didn't have r.json (or r.json()); avoid by
decoding the json myself
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Tested-by: Olivier Bonvalet <ob.ceph@daevel.fr>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Try clientname, then 'client', then 'global
Fixes: #5743
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We also need to poll the control fd/pipe so that we restart the poll loop
when new signal handlers are added. This was broken by commit 8e4a78f1.
Fixes: #5742
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
|
|\ \ \
| | | |
| | | |
| | | | |
Reviewed-by: Sage Weil <sage@inktank.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
| |/ /
| | |
| | |
| | | |
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In 97462a3213e5e15812c79afc0f54d697b6c498b1 we tried to search for a
recent full osdmap but were looking at the wrong key. If full_0 was
present we could record that the latest full map was last_committed even
though it wasn't present. This is fixed in 76cd7ac1c, but we need to
compensate for when get_version_latest_full() gives us a back version
number by repeating the search.
Fixes: #5737
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
|
| |
| |
| |
| |
| |
| |
| | |
Fixes a segfault
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes: #5737
Backport: cuttlefish
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|