I'm going to extract this logic and reuse it in crimson. Recovery* has
always been a confusing name as it implements neither log-based recovery
nor backfill. Rather, it's mainly the buisiness logic for agreeing on
an authoritative log and some ancillary things such as scrub/backfill
reservation.
$ for i in $(git grep -l 'RecoveryMachine'); do sed -i 's/RecoveryMachine/PeeringMachine/g' $i; done
$ for i in $(git grep -l 'RecoveryState'); do sed -i 's/RecoveryState/PeeringState/g' $i; done
$ for i in $(git grep -l 'RecoveryCtx'); do sed -i 's/RecoveryCtx/PeeringCtx/g' $i; done
Signed-off-by: Samuel Just <sjust@redhat.com>
* refs/pull/27804/head:
common, osd: remove erroneous 'section' in dump functions
dencoder: include some missed types
common: make utime_t dencoder-compatible
common: make uuid_d dencoder-compatible
osd: make watch_item_t dencoder-compatible
Reviewed-by: Sage Weil <sage@redhat.com>
strictly speaking, time_t is an opaque time, and in this context, we
need a uint32_t, so it is not necessary and wrong. let's remove it.
Signed-off-by: Kefu Chai <kchai@redhat.com>
we could have kept rotating_keyring as a plain member variable, but
`AuthClientHandler` keeps a weak reference to it, we are not able to
update it to point it to the new rotating_keyring in the newly created
active_con created from the connected pending connection -- the move
ctor of ceph::mon::Connection does create a new RotatingKeyring. so this
has two consequences:
- the raw pointer held by AuthClientHandler is not valid anymore, after
the pending connection is destroyed when it is promoted to active_con.
so we are writing to freed memory when renewing the rotating keyring.
- we won't have access to the updated keyring.
if we use a std::vector<unique_ptr<Connection>> for pending_conns, this
change won't be needed. we could make this change in a future change
though.
Signed-off-by: Kefu Chai <kchai@redhat.com>
AuthAuthorizeHandler::verify_authorizer() neither changes the keystore,
nor expects a nullptr. so we should pass the keystore by const reference
for better readability
Signed-off-by: Kefu Chai <kchai@redhat.com>
crimson-common and ceph-common have subtle difference which is
conditionalized by WITH_SEASTAR macro. and the different implementations
share the same name, so we should not link crimson executables against ceph-common .
Signed-off-by: Kefu Chai <kchai@redhat.com>
crimson messenger's tests does not use ConfigProxy at the time of writing,
and ldout() cannot tell if a log message should be written to the
logfile or not without querying config subsystem, so, to avoid involving
config system in crimson messenger's tests, the log line is disabled if
WITH_SEASTAR, we will kill this workaround once we ditch crimson/net/Config.h.
Signed-off-by: Kefu Chai <kchai@redhat.com>
crimson/msgr does not depend on ConfigProxy at the time of writing. we
want to decouple it from config subsystem in hope to have less cross
subsystem dependencies and speed up the compiling speed.
but, to introduce cephx to msgr, we need to enable msgr to read from
ConfigProxy at runtime. so, to avoid keeping a CephContext instance
simply for accessing the ConfigProxy reference in it, it would be more
efficient to define a free function `conf()` which hides the difference
between crimson and classic user of auth/cephx.
Signed-off-by: Kefu Chai <kchai@redhat.com>
OSD always relies on its server to tell its address, without this
feature, it will advertise a blank ip address to monitor in MOSDBoot.
Signed-off-by: Kefu Chai <kchai@redhat.com>
CephxAuthorizeHandler::verify_authorizer() uses it for querying config
and for a RNG, so we have to pass it a CephContext which has `_conf` and
`random()`.
Signed-off-by: Kefu Chai <kchai@redhat.com>
This flag is used for compatibility with pre-nautilus OSDs, which do not
send authorizers on the OSD heartbeat connections. However, because the
AuthServer is implemented by MonClient, which is shared across all
OSD messengers, we can't set this to false for the OSD without disabling
all auth. Instead, make it a Messenger property, and set it only on the
heartbeat server messengers.
Signed-off-by: Kefu Chai <kchai@redhat.com>
This flag is used for compatibility with pre-nautilus OSDs, which do not
send authorizers on the OSD heartbeat connections. However, because the
AuthServer is implemented by MonClient, which is shared across all
OSD messengers, we can't set this to false for the OSD without disabling
all auth. Instead, make it a Messenger property, and set it only on the
heartbeat server messengers.
Signed-off-by: Sage Weil <sage@redhat.com>