Not handling the error return from cmd_getval() may leave uninitialzied
values, which can cause issues, specially with non-string values.
Fixes: 6806
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
This avoids a lot of hassle when dealing with to whom tell each command
on interactive mode, and even more so if multiple targets are specified.
As so, 'tell' commands should be used while on interactive mode instead.
Backport: dumpling,emperor
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
We will set lb=hobject_t() if we resurrect the pg. In that case,
we need to have sent that to the primary before hand. If we
finish the removal before the pg is recreated, we'll just end
up backfilling it, which is ok since the pg doesn't exist anyway.
Fixes: #7740
Signed-off-by: Samuel Just <sam.just@inktank.com>
Following sequence of events can happen.
- Client releases an inode, queues cap release message.
- A 'lookup' reply brings the same inode back, but the reply doesn't
contain inline data because MDS didn't receive the cap release
message and thought client already has up-to-data inline data.
The fix is trigger a getattr if client finds inline_version is zero.
The getattr mask is set to CEPH_STAT_CAP_INLINE_DATA, so that MDS knows
client does not have inline data.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
When requeuing and item at the front, we need to shuffle the items in
pg_for_processing if there is an entry for this PG there. If so, we need
to hold the qlock for the duration of the requeue of the shuffled item
back into the primary queue in order to avoid reshuffling items. For
example, consider the queue has
A B C D
- dequeue1 gets (pg, A), puts A in the processing list
- dequeue1 tries to lock pg, blocks
- enqueue_front on X takes qlock, swaps it for A, drops qlock
- dequeue2 gets (pg, B), puts B in the processing list
- enqueue_front pushes X back into the original list
so we have processing: X B queue: A C D
- dequeue* get X, then B, then A C D
If we whole qlock for the duration of the enqueue_front, we avoid dequeu2
from sneaking in an shuffling B into the processing list before we have
crammed A back onto the front of the list.
This may have caused #7712.
Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Temp object repops have version eversion_t() since they don't
actually send log entries. Updating the last_updates here
caused the peer info last_updates to be incorrect until the
next non-temp repop.
Fixes: #7718
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717377 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member "max_uploads" is not initialized
in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member "default_max" is not initialized
in this constructor nor in any functions that it calls.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit b23a141d54)
In file included from test/ceph_argparse.cc:17:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = long unsigned int]’:
../src/gtest/include/gtest/gtest.h:1333:30: instantiated from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = long unsigned int]’
test/ceph_argparse.cc:344:207: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: Sage Weil <sage@inktank.com>
Clearing it in that way in on_shutdown() can cause a stray
shard to clobber the want_pg_temp value created by the primary
shard on the same osd. Thus, instead only clear it if we are
the primary.
Fixes: #7719
Signed-off-by: Samuel Just <sam.just@inktank.com>
If we are still on monmap epoch 0, our mon ranks cannot yet be trusted
since there is not yet a shared source of truth from paxos. If we do
timechecks, the code gets confused about the ranks in e.g. the
timecheck_waiting map.
Fixes: #7692
Signed-off-by: Sage Weil <sage@inktank.com>
The added case covers a situation where a replica is not contiguous with
the auth_log, but is contiguous with the primary. Reshuffling the
active set to handle this would be tricky, so instead we just go ahead
and backfill it anyway. This is probably preferrable in any case since
the replica in question would have to be significantly behind.
Fixes: #7696
Signed-off-by: Samuel Just <sam.just@inktank.com>
We split global_init_postfork() in two: start and finish, with the first
keeping much of postfork()'s tasks except closing stderr, which we leave
open until just before we daemonize. This allows the user to see any
error messages that the monitor may spit out before it daemonizes, making
sense of the error code (which we were already returning).
Fixes: 7489
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
We were releasing the op locks when we applied the update but (potentially)
before we committed it. This means that another client can read object
state that is not yet durable.
Fixes: #7709
Signed-off-by: Sage Weil <sage@inktank.com>
These were hard-coded in the pg_pool_t constructor, but that was a dumb
idea.
Note that decoding legacy pg_pool_t's no longer does what it used to. I'm
pretty sure that's okay since we care less about interim releases and
because we are pulling these normally out of OSDMap, which is freshly
encoded on a regular basis (and certainly recently with real values). Also,
let's not forget that this field is meaningless on old pools anyway.
Signed-off-by: Sage Weil <sage@inktank.com>
First, this is what we wanted in the first place
Second, if we wait for ACK, we may look at a user_version value that is
not stable.
Fixes: #7705
Signed-off-by: Sage Weil <sage@inktank.com>