Greg Farnum [Fri, 12 Mar 2021 22:41:03 +0000 (22:41 +0000)]
osd: PeeringState: implement an acting_set_writeable() function
Use it instead of direct checks against min_size and stretch_set_can_peer()
when deciding whether to go STATE_ACTIVE/STATE_PEERED or do updates
to things like last_epoch_started.
Greg Farnum [Fri, 12 Mar 2021 20:13:38 +0000 (20:13 +0000)]
osd: PeeringState: fix stretch peering so PGs can go peered but not active
I misunderstood and there was a pretty serious error here: to prevent
accidents, choose_acting() was preventing PGs from *finishing* peering
if they didn't satisfy the stretch cluster rules. What we actually want
to do is to finish peering, but not go active.
Happily, this is easy to fix -- we just add a call to stretch_set_can_peer()
alongside existing min_size checks when we choose whether to go PG_STATE_ACTIVE
or PG_STATE_PEERED!
Greg Farnum [Thu, 11 Mar 2021 22:19:10 +0000 (22:19 +0000)]
osd: PeeringState: don't add acting-set OSDs to candidate set in stretch mode
We were adding them once from the acting set, and then once from the all_infos
set, and that hit an assert later on. (I think it was otherwise harmless, but
I don't want to weaken the assert!)
There was a major error here! get_ancestor() was type-deduced to return
a bucket_candidates_t -- a *copy* of what was in the map, not the reference
to it we wanted to actually amend!
Fix this by returning a pointer instead. There's a way to coerce things
to return a reference instead but the syntax seems clumsier to me
and I'm not familiar with it anyway -- this works just fine.
Greg Farnum [Thu, 11 Mar 2021 07:40:52 +0000 (07:40 +0000)]
osd: PeeringState: respect stretch peering constraints for async recovery
Happily this is pretty simple: we just need to check that the resulting
wanted set can peer, which we have a function for. Run it before actually
swapping the want and candidate_want sets.
If we're not in stretch mode, this is a cheap function call that
will always return true, so it's equivalent to what we already have for them.
Greg Farnum [Thu, 11 Mar 2021 07:19:26 +0000 (07:19 +0000)]
osd: PeeringState: add a comment about using size as a proxy for activateable
When reviewing, I mistakenly thought we needed to skip a size check in
choose_acting() in case of mismatches between size and bucket counts, but that
is not accurate!
Samuel Just [Tue, 9 Mar 2021 02:09:15 +0000 (18:09 -0800)]
crimson/os/seastore: add releasing state for segments pending close
This should fix a bug by which we might start scanning a segment a second
time as it is released and possibly even reused resulting in nonsensical
behavior.
Adam King [Wed, 24 Feb 2021 21:13:01 +0000 (16:13 -0500)]
mgr/cephadm: update caps if necessary when getting keyring
If the caps change from the old version to the new one it causes
issues in the upgrade. This allows the caps to be updated. Currently
only seeing this with iscsi but changing it for other as a precaution
Sebastian Wagner [Wed, 10 Mar 2021 12:58:37 +0000 (13:58 +0100)]
Merge pull request #39877 from liewegas/cephadm-rgw-simplification
mgr/cephadm: simplify handling for rgw
Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com> Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com> Reviewed-by: Or Friedmann <ofriedma@redhat.com>
This doesn't actually make sense for FuturzizedStore implementations other
than BlueStore, and then only in a diagnostic capacity. It also doesn't
have any actual users at the moment.
Doesn't actually have a TransactionManager implementation, and
it needs substantial changes to adapt to changes in Onode.
We can resurrect it in the future if we want to.
Kefu Chai [Wed, 10 Mar 2021 03:08:47 +0000 (11:08 +0800)]
doc/_themes: fine tune styling
* fix the "dl" (definition list) display in manpage. before this
change, if an item in dl is composed of strings with different fonts,
it is cluttered into a single string. after this change, they are
separated with proper spacing as before. see the "WORKLOAD" section in
https://docs.ceph.com/en/latest/man/8/ceph-syn/ and
https://docs.ceph.com/en/octopus/man/8/ceph-syn/
* reduce the spacing in "ul" (unordered list) in table. before
this change, we have large spacing at end of a list in table. after
this change, the spacing is reduced. see
https://docs.ceph.com/en/latest/start/hardware-recommendations/#ram
https://docs.ceph.com/en/octopus/start/hardware-recommendations/#ram
* increase the spacing between two "ul"s in table. see
https://docs.ceph.com/en/latest/start/hardware-recommendations/#Processor
https://docs.ceph.com/en/octopus/start/hardware-recommendations/#ram
* refs/pull/39408/head:
test: add test for validating cephfs-mirror daemon service status
pybind/mirroring: interface to fetch mirror daemon status
cephfs-mirror: register mirror daemon with service manager
cephfs-mirror: remove unneeded json_spirit header
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/39687/head:
tools/cephfs-shell: continue file listing even on error
tools/cephfs-shell: refactoring of code related listing
tools/cephfs-shell: fix listing of symbolic links
Reviewed-by: Rishabh Dave <ridave@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Sage Weil [Mon, 8 Mar 2021 14:49:14 +0000 (09:49 -0500)]
python-common: continue to allow RGWSpec(realm=r,zone=z)
This is for backward compatibility: an octopus spec yaml can still be
applied to an existing cluster. Note that it might not work on a new
cluster, since cephadm no longer tries to create the realm or zone if
they don't exist.
Sage Weil [Fri, 5 Mar 2021 21:30:20 +0000 (16:30 -0500)]
qa/tasks/cephadm: drop realm.zone convention for rgw
Note that cephadm.py will no longer do anything with rgw realms and
zones. That means that the setup of rgw roles here is only useful
for the default zone and a non-multisite config.
Sage Weil [Tue, 9 Mar 2021 18:15:20 +0000 (12:15 -0600)]
mgr/cephadm: do not prime service cache on reconfig
Ceph daemon reconfig does not need any daemon state refresh since we don't
do a restart--we just rewrite the ceph.conf. This also avoids priming
our cache with a 'starting' state when the daemon wasn't touched.
Fixes: https://tracker.ceph.com/issues/49675 Signed-off-by: Sage Weil <sage@newdream.net>
This is just so we can load up a stored spec after upgrade. We'll silently
drop it, since we have the service_id, and this was only used to generate
that anyway.
Sage Weil [Fri, 5 Mar 2021 20:52:54 +0000 (15:52 -0500)]
mgr/orchestrator: drop $realm.$zone naming convention
- Let users name the rgw service(s) whatever they like
- Make the rgw_zone and rgw_realm arguments optional, so that they can
omit them and let radosgw start up in the generic single-cluster
configuration (whichk, notably, has no realm).
- Continue to set the rgw_realm and rgw_zone options for the daemon(s),
but only when those values are specified.
- Adjust the CLI accordingly. Drop the subcluster argument, which was
only used to generate a service_id.
- Adjust rook. This is actually a simplification and improved mapping onto
the rook CRD, *except* that for octopus we enforced the realm.zone
naming *and* realm==zone. I doubt a single user actually did this
so it is not be worth dealing with, but we need a special case for
where there is a . in the service name.
Sage Weil [Fri, 5 Mar 2021 18:13:56 +0000 (13:13 -0500)]
mgr/cephadm: rgw: do not mess with realm configuration
It is simpler to consider this out of scope for the orchestrator. The
user should set up their multisite realms/zones before deploying the
daemons (or the daemons will not start). In the future we can wrap this
with a more friendly tool, perhaps.
Kefu Chai [Thu, 4 Mar 2021 10:25:33 +0000 (18:25 +0800)]
cmake: silence "You are in 'detached HEAD' state" warning
git warns us when the repo is in 'detached HEAD' state, like:
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in
this state without impacting any branches by switching back to a branch.
...
Turn off this advice by setting config variable advice.detachedHead to
false