When we get a pool_op_reply, we find out which osdmap we need to wait for.
The wait_for_new_map() code was feeding that epoch into
maybe_request_map(), which was feeding it to the monitor with the subscribe
request. However, that epoch is the *start* epoch, not what we want. Fix
this code to always subscribe to what we have (+1), and ensure we keep
asking for more until we catch up to what we know we should eventually
get.
Bug: #3075
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Commit dd011aba90 changed
the conf file sample to say {hostname}, but changed the
prose only from ``localhost`` to ``{localhost}``.
Signed-off-by: Tommi Virtanen <tv@inktank.com>
Uses a fixed access/secret key for easier testing. Starts a standalone
apache2 process with basic config (based on the teuthology one).
Signed-off-by: Sage Weil <sage@inktank.com>
If we encounter nobackfill, let ourselves to fall out of the recovery
queue. If we encounter a map that has does not have the flag set and we
are not clean, requeue ourselves. This is a big hammer, but simple.
Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Mike Ryan <mike.ryan@inktank.com>
Reviewed-by: Greg Farnum <gregory.farnum@inktank.com>
Fixes: #3068
Bug #2954
Consider the following case:
1) Primary calls share_pg_info()
2) Primary processes client op and sends off sub_op to replica
3) Replica process sub_op
4) Replica process info reverting stat to before 2)
Similarly:
1) Primary processes client op
2) Primary calls share_pg_info()
3) Replica processes info
[4) Replica processes sub_op]
If 4) is interrupted by a map change, we can end up in a case there
the replica's info has a stat which reflects a log entry which
is not there. If that logs ends up authoratative, the most recent
op will be replayed and end up double counted in the log.
There should actually be no cases where the stats change after the
replica goes active except for as part of a sub_op_modify. Thus,
ReplicaActive::MInfoRec should not update the stats.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 716882: Copy-paste error (COPY_PASTE_ERROR)At (2): "last_epoch_started" in
"other.last_epoch_started" looks like a copy-paste error. Should it say
"last_epoch_split" instead?
From what I can tell, this really should be checking other.last_epoch_split
rather than other.last_epoch_started.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717345: Uninitialized pointer field (UNINIT_CTOR)At (8): Non-static class
member "obc" is not initialized in this constructor nor in any functions that
it calls.
At (2): Non-static class member "id" is not initialized in this constructor nor
in any functions that it calls.
At (4): Non-static class member "reply" is not
initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member "timeout" is not initialized in this
constructor nor in any functions that it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717344: Uninitialized scalar field (UNINIT_CTOR)At (2): Non-static class
member "epoch_started" is not initialized in this constructor nor in any
functions that it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717343: Uninitialized pointer field (UNINIT_CTOR)At (3): Non-static class
member "snapset" is not initialized in this constructor nor in any functions
that it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717057: Big parameter passed by value (PASS_BY_VALUE)At (1): Passing
parameter _pool of type PGPool (size 336 bytes) by value.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717340: Uninitialized pointer field (UNINIT_CTOR)At (2): Non-static class
member "state_name" is not initialized in this constructor nor in any functions
that it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717342: Uninitialized scalar field (UNINIT_CTOR)At (2): Non-static class
member "has_checksums" is not initialized in this constructor nor in any
functions that it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717339: Uninitialized scalar field (UNINIT_CTOR)At (2): Non-static class
member "last_requested" is not initialized in this constructor nor in any
functions that it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717053: Big parameter passed by value (PASS_BY_VALUE)At (1): Passing
parameter _pool of type PGPool (size 336 bytes) by value.
Signed-off-by: Samuel Just <sam.just@inktank.com>
At (2): Non-static class member "hit_flag_points" is not initialized in this
constructor nor in any functions that it calls. CID 717338: Uninitialized
scalar field (UNINIT_CTOR)At (4): Non-static class
member "latest_flag_point" is not initialized in this constructor nor in any
functions that it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717337: Uninitialized scalar field (UNINIT_CTOR)At (6): Non-static class
member "weight" is not initialized in this constructor nor in any functions
that it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717051: Big parameter passed by value (PASS_BY_VALUE)At (1): Passing
parameter block of type OSDSuperblock (size 232 bytes) by value.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717336: Uninitialized pointer field (UNINIT_CTOR)At (2): Non-static class
member "handler" is not initialized in this constructor nor in any functions
that it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717335: Uninitialized scalar field (UNINIT_CTOR)At (2): Non-static class
member "flags" is not initialized in this constructor nor in any functions that
it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717328: Uninitialized scalar field (UNINIT_CTOR) [select defect]
At (2): Non-static class member "newest" is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Sage Weil <sage@inktank.com>
CID 717329: Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "lock_fd" is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Sage Weil <sage@inktank.com>
At (2): Non-static class member "latest_stashed" is not initialized in this constructor nor in any functions that it calls.
At (4): Non-static class member "num_last" is not initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member "uncommitted_v" is not initialized in this constructor nor in any functions that it calls.
CID 717330: Uninitialized scalar field (UNINIT_CTOR)
At (8): Non-static class member "uncommitted_pn" is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Sage Weil <sage@inktank.com>
lcok isn't held during dispatch, so we can take it unconditionally. THis
also makes coverity happier:
CID 716966: Data race condition (MISSING_LOCK)
At (4): Accessing "this->stop" ("DispatchQueue.stop") requires the "Mutex._m" lock.
Signed-off-by: Sage Weil <sage@inktank.com>
cct may be null
CID 716930: Dereference after null check (FORWARD_NULL)
At (11): Dereferencing null pointer "cct".
Signed-off-by: Sage Weil <sage@inktank.com>
CID 717048: Big parameter passed by value (PASS_BY_VALUE)
At (1): Passing parameter a of type entity_addr_t (size 136 bytes) by value.
Signed-off-by: Sage Weil <sage@inktank.com>
This was suggested by Greg too but I was too lazy.
CID 717331: Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "nonce" is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Sage Weil <sage@inktank.com>