Skip to content

squid: RADOS: Generalize stretch mode pg temp handling to be usable without stretch mode - #59084

Merged
kamoltat merged 4 commits into
ceph:squidfrom
kamoltat:wip-ksirivad-backport-squid-56233
Aug 29, 2024
Merged

kamoltat merged 4 commits into
ceph:squidfrom
kamoltat:wip-ksirivad-backport-squid-56233

Conversation

@kamoltat

@kamoltat kamoltat commented Aug 7, 2024

Copy link
Copy Markdown
Member

ATTENTION:

THIS PR SHOULD BE TESTED IN CONJUNCTION WITH #57381
Recommend merging #57381 before this PR.

In the command ceph osd pool stretch set

<pool> <peering_crush_bucket_count>
<peering_crush_bucket_target> <peering_crush_bucket_barrier> <crush_rule> <size> <min_size>

user has the option of setting the value of peering_crush_bucket_{count|target|barrier}.
This will then allow the utilization calc_replicated_acting_stretch,
since with peering_crush_bucket_count != 0
the pool is now a stretch_pool and we can handle pg_temp
better by setting barriers and limits to how much OSDs
should be in a pg_temp.

This will enable the specify pool to
handle pg_temp properly during create_acting, as a stretch pool
should.

Users can also use the command:
osd pool stretch show <pool>

to show all the stretch related information for the pool

pool: cephfs.a.data
pool_id: 3
is_stretch_pool: 1
peering_crush_bucket_count: 3
peering_crush_bucket_target: 3
peering_crush_bucket_barrier: 8
crush_rule: replicated_rule_custom
size: 3
min_size: 2

Users can also unset the stretch pool with the command:
osd pool stretch unset <pool>

However, the pool must be a stretch pool.

Backporting relevant commit(s) from main PR(s):

#56233

Fixes: https://tracker.ceph.com/issues/64802

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@kamoltat kamoltat self-assigned this Aug 7, 2024
@kamoltat
kamoltat requested review from a team as code owners August 7, 2024 15:20
@kamoltat kamoltat added this to the squid milestone Aug 7, 2024
@kamoltat

kamoltat commented Aug 22, 2024 •

Copy link
Copy Markdown
Member Author

I was running this PR + #59083 against the RADOS suite: https://pulpito.ceph.com/ksirivad-2024-08-20_21:44:57-rados-wip-ksirivad-59083-and-59084-distro-default-smithi/

Failed a netsplit test: https://pulpito.ceph.com/ksirivad-2024-08-20_21:44:57-rados-wip-ksirivad-59083-and-59084-distro-default-smithi/7864599/

Realized that it is because we rely on a change in this particular commit: 8060ea3
in this PR: #58669. Basically, instead of iptables DROP only TCP packets, we need to drop "ALL" packets

Therefore, will rebuild again with a new branch that will include all the commits in https://github.com/ceph/ceph/pull/58669/commits.

@kamoltat

kamoltat commented Aug 22, 2024 •

Copy link
Copy Markdown
Member Author

@kamoltat

Copy link
Copy Markdown
Member Author

[### RADOS Approved:

The branch wip-ksirivad-59083-and-59084-and-58669 includes PRs:
(we should merge these PRs in this order)

/a/ksirivad-2024-08-24_03:10:26-rados-wip-ksirivad-59083-and-59084-and-58669-distro-default-smithi

Failure, dead Unrelated:

@kamoltat

Copy link
Copy Markdown
Member Author

@gregsfortytwo need your approval for this backport

In the command `ceph osd pool stretch set`

<pool> <peering_crush_bucket_count>
<peering_crush_bucket_target> <peering_crush_bucket_barrier>
<crush_rule> <size> <min_size>

user has the option of setting the value of `peering_crush_bucket_{count|target|barrier}`.
This will then allow the utilization `calc_replicated_acting_stretch`,
since with `peering_crush_bucket_count != 0`
the pool is now a stretch_pool and we can handle pg_temp
better by settubg barriers and limits to how much OSDs
should be in a pg_temp.

This will enable the specify pool to
handle pg_temp properly during create_acting, as a stretch pool
should.

User can also use the command:
`osd pool stretch show <pool> `

to show all the stretch related information for the pool

pool: cephfs.a.data
pool_id: 3
is_stretch_pool: 1
peering_crush_bucket_count: 3
peering_crush_bucket_target: 3
peering_crush_bucket_barrier: 8
crush_rule: replicated_rule_custom
size: 3
min_size: 2

User can also unset the stretch pool wiith the commnad:
`osd pool stretch unset <pool>`
However, the pool must be a stretch pool.

Fixes: https://tracker.ceph.com/issues/64802

Signed-off-by: Kamoltat <[email protected]>
(cherry picked from commit 661e8e2)
Test the following new Ceph CLI commands:

`ceph osd pool stretch set`
`ceph osd pool stretch unset`
`ceph osd pool stretch show`

`qa/workunits/mon/mon-stretch-pool.sh`

will create the stretch cluster
while performing input validation for the CLI
Commands mentioned above.

`qa/tasks/stretch_cluster.py`

is in charge of
setting a pool to stretch cluster
and checks whether it prevents PGs
from the going active when there is not
enough buckets available in the acting
set of PGs to go active.

Also, test different MON fail over scenarios
after setting pool as stretch

`qa/suites/rados/singleton/all/mon-stretch-pool.yaml`

brings the scripts together.

Fixes: https://tracker.ceph.com/issues/64802

Signed-off-by: Kamoltat <[email protected]>
(cherry picked from commit 4ca1320)

Conflicts:
	- qa/tasks/ceph_test_case.py (trivial fix)
Test the case where 2 DC loses connection with each other
for a 3 AZ stretch cluster with stretch pool enabled.
Check if cluster is accessible and PGs are active+clean
after reconnected.

Signed-off-by: Kamoltat <[email protected]>
(cherry picked from commit 7b41aff)

Conflicts:
	- qa/tasks/ceph_test_case.py (trivial fix)
@kamoltat
kamoltat force-pushed the wip-ksirivad-backport-squid-56233 branch from a962582 to e7d18fa Compare August 28, 2024 18:55
@kamoltat

Copy link
Copy Markdown
Member Author

jenkins test api

@kamoltat

Copy link
Copy Markdown
Member Author

jenkins test make check

@kamoltat
kamoltat merged commit 7da3801 into ceph:squid Aug 29, 2024
afreen23 pushed a commit to rhcs-dashboard/ceph that referenced this pull request Jul 29, 2026
…id-56233

squid: RADOS: Generalize stretch mode pg temp handling to be usable without stretch mode
Reviewed-by: Samuel Just <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants