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!
Sage Weil [Wed, 10 Mar 2021 20:27:27 +0000 (14:27 -0600)]
Merge PR #39807 into pacific
* refs/pull/39807/head:
cephadm: split custom container args into argv
cephadm: fix escaping/quoting of stderr-prefix arg for ceph daemons
cephadm: set CEPH_USE_RANDOM_NONCE if using --init
msg/Messenger: use random nonce if CEPH_USE_RANDOM_NONCE or pid == 1
Revert "Merge PR #39482 into master"
cephadm: remove redundant `ERROR` during check-host
cephadm: remove unused imports
cephadm: `cephadm ls` broken for SUSE downstream alertmanager container
cephadm: `cephadm ls` broken for SUSE downstream alertmanager container
mgr/cephadm: add ok-to-stop functions for ceph client services
mgr/test_orchestrator: Refactor create_osds
mgr/volumes: adapt to now orch interface
doc/mgr/orchestrator_modules: adapt to now orch interface
mgr/selftest: adapt to now orch interface
mgr/dashboard: adapt to now orch interface
mgr/mds_autoscaler: Add to tox.ini
mgr/mds_autoscaler: adapt to now orch interface
mgr/test_orchestrator: adapt to now orch interface
mgr/rook: Adapt to new orch interface
mgr/cephadm: Adapt cephadm to new orch interface
mgr/orch: Remove old tests
mgr/orch: adapt orchestrator CLI to new interface
mgr/orch: replace Completion with OrchResult(Generic[T])
mgr/orchestrator: Fix ceph orch ls in Rook
doc/cephadm: rewrite "install cephadm"
doc/cephadm: rewrite "b.strap a new cluster"
cephadm: add docker.service dependency in systemd units
cephadm: add multi-digest test
mgr/orchestrator: validate config options at apply time
mgr/cephadm: disallow managed options in ServiceSpec config section
mgr/cephadm: add config section to ServiceSpec
doc/cephadm: s/togeter/together
cephadm: provide meta during bootstrap
mgr/cephadm: put service_name in unit.meta and use it when available
cephadm: accept arbitrary dict via --meta-json
mgr/cephadm: incorporte memory_{usage,request,limit} from 'ls'
cephadm: accept --memory-{request,limit}
cephadm: include memory_usage in 'ls' output
doc/cephadm: remove Orchestrator CLI from cephadm toc
doc/cephadm: move host labels to host mgmt
doc/cephadm: group MDS sections into one chapter
doc/cephadm: Add iscsi
doc/cephadm: group NFS sections into one chapter
doc/cephadm: rename monitoring chapter title
doc/cephadm: group MON sections into one chapter
doc/cephadm: make custom containers its own chapter
doc/cephadm: group RGW mgmt sections into one chapter
doc/cephadm: move scheduler topic to service mgmt
doc/cephadm: move unmanaged=true to service-mgmt.rst
doc/cephadm: group general service mgmt sections into one chapter
doc/cephadm: group OSD mgmt sections into one chapter
doc/cephadm: Move FQDN chapter to host mgmt.rst
doc/cephadm: Move SSH config from operations to host-mgmt.rst
doc/cephadm: group host mgmt sections into one chapter
cephadm: fix bug in orphan-initial-daemons logic
mgr/orch: drop __all__ from __init__.py
mgr/cephadm: add DaemonDescriptionStatus
cephadm: version command hide traceback when login is needed
doc/cephadm: troubleshooting: manually deploy MGR
cephadm: fix port_in_use when IPv6 is disabled
cephadm: Allow to use paths in all <_devices> drivegroup sections
mgr/cephadm: error if service action called with daemonless service
mgr/cephadm: fix up the strings reporting osd ids
mgr/cephadm: remove daemon before osd destroy/purge
mgr/cephadm: simplify OSD __str__ for drain
mgr/cephadm: make drain adjust crush weight if not replacing
mgr/cephadm: less log noise from osd drain code
mgr/cephadm: fix 'orch daemon add osd ...'
mgr/cephadm/upgrade: fix typo
mgr/cephadm: remove spec from CephadmDaemonDeploySpec
mgr/cephadm/upgrade: restart mgr after mons upgrade to pacific
mgr/cephadm: use get_foreign_ceph_option() instead of 'config get' mon command
Reviewed-by: Avan Thakkar <athakkar@redhat.com> Reviewed-by: Juan Miguel Olmo <jolmomar@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
Nizamudeen A [Tue, 2 Feb 2021 12:26:13 +0000 (17:56 +0530)]
mgr/dashboard: Host Maintenance Feature
In Cluster -> Hosts, I've added additional button to put the selected host on maintenance or exit out of the maintenance mode. Also for some hosts the ok-to-stop tests may trigger some warnings which requires a --force command to pass along with the maintenance enter command to enter a host into maintenance. In UI this is achieved using a confirmation Modal. In addition to this if the check error is It is NOT safe to stop the host then the host wont be able to put into maintenance mode.
Sage Weil [Sat, 27 Feb 2021 20:45:47 +0000 (15:45 -0500)]
msg/Messenger: use random nonce if CEPH_USE_RANDOM_NONCE or pid == 1
If we are in a container, then we do not have a unique pid, and need to
use a random nonce. We normally detect this if our pid is 1, but that
doesn't work when we have a init process--we'll (probably?) have a small
pid (in my tests, the OSDs were getting pid 7).
To be safe, also check for an environment variable set by cephadm.
This avoids problems that arise when we don't have a unique address.
Daniel-Pivonka [Thu, 14 Jan 2021 22:18:43 +0000 (17:18 -0500)]
mgr/cephadm: add ok-to-stop functions for ceph client services
Signed-off-by: Daniel-Pivonka <dpivonka@redhat.com> Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 674912bfed92537a97e625bb79397bf97f10b24b)
Fixes: https://tracker.ceph.com/issues/49411 Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
(cherry picked from commit d070caedb5971351de9521e3125d162838270c2b)
Zac Dover [Sun, 28 Feb 2021 12:13:39 +0000 (22:13 +1000)]
doc/cephadm: rewrite "install cephadm"
This PR breaks the "Deploying a New Ceph Cluster"
section into several sub-sections, so that each sub-section
pertains to only one subject. I've also added some explanatory
text that puts the instructions into context more than they were
before.
Zac Dover [Mon, 1 Mar 2021 14:01:05 +0000 (00:01 +1000)]
doc/cephadm: rewrite "b.strap a new cluster"
This PR rewrites the section "Bootstrap A New
Cluster" in the Cephadm Guide, in the Install
Chapter. I've broken this section up into what
seem to me to be the topics that the content
naturally divides into.
Daniel Pivonka [Thu, 28 Jan 2021 21:36:11 +0000 (16:36 -0500)]
mgr/cephadm: add DaemonDescriptionStatus
Signed-off-by: Daniel Pivonka <dpivonka@redhat.com> Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit ae83ffc7897a0912308001f55876fd51dd56ad40)
Sage Weil [Wed, 17 Feb 2021 16:28:05 +0000 (10:28 -0600)]
mgr/cephadm: make drain adjust crush weight if not replacing
If we are replacing an OSD, we should mark it out and then back in
again when a new device shows up. However, if we are going to
destroy an OSD, we should just weight it to 0 in crush, so that data
doesn't move again once the OSD is purged.
Kefu Chai [Sat, 6 Mar 2021 16:32:42 +0000 (00:32 +0800)]
.github: correct the regex in mileston workflow
also use pull_request_target event so the action is run in the
context of the base of the pull request. this helps us to overcome
the "Resource not accessible by integration" issue where the action
is run in the context of the pull request.