Skip to content

mon/OSDMonitor: resize oversized Lec::epoch_by_pg, after PG merging, preventing osdmap trimming#42136

Merged
tchaikov merged 1 commit intoceph:masterfrom
dvanders:dvanders_lec_merging
Jul 7, 2021
Merged

mon/OSDMonitor: resize oversized Lec::epoch_by_pg, after PG merging, preventing osdmap trimming#42136
tchaikov merged 1 commit intoceph:masterfrom
dvanders:dvanders_lec_merging

Conversation

@dvanders
Copy link
Copy Markdown
Contributor

@dvanders dvanders commented Jul 1, 2021

After a pool has merged PGs the epoch_by_pg accounting needs to
forget about the deleted PGs. Without this, we can never advance
l_e_c beyond that of the now deleted PGs, and osdmaps won't trim.

Fixes: https://tracker.ceph.com/issues/48212
Signed-off-by: Dan van der Ster daniel.vanderster@cern.ch

@dvanders dvanders force-pushed the dvanders_lec_merging branch 2 times, most recently from 3163ddc to b8cadf0 Compare July 1, 2021 15:42
@dvanders dvanders changed the title wip: mon/OSDMonitor: resize oversized Lec::epoch_by_pg mon/OSDMonitor: resize oversized Lec::epoch_by_pg Jul 1, 2021
@dvanders dvanders changed the title mon/OSDMonitor: resize oversized Lec::epoch_by_pg mon/OSDMonitor: resize oversized Lec::epoch_by_pg, after PG merging, preventing osdmap trimming Jul 1, 2021
Copy link
Copy Markdown
Member

@liewegas liewegas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks right to me

Copy link
Copy Markdown
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a couple nits, LGTM

@dvanders dvanders force-pushed the dvanders_lec_merging branch from b8cadf0 to aa1a61c Compare July 6, 2021 07:58
@tchaikov
Copy link
Copy Markdown
Contributor

tchaikov commented Jul 7, 2021

Copy link
Copy Markdown
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dvanders i think your fix does work! could you squash these two commits into a single one?

@dvanders dvanders force-pushed the dvanders_lec_merging branch from f343001 to 381ea94 Compare July 7, 2021 11:23
After a pool has merged PGs, the epoch_by_pg accounting will refer
to osdmap epochs of PGs that no longer exist. We'll never again get
OSD beacons for these PGs, so the min epoch in epoch_by_pg will not
advance until the mon leader has restarted. The effect of this is
that osdmaps are not trimmed after a pool has undergone PG merging,
until the mon leader restarts. To fix, we unconditionally resize
epoch_by_pg to the pg_num of the pool during each beacon report.

Fixes: https://tracker.ceph.com/issues/48212
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
@dvanders dvanders force-pushed the dvanders_lec_merging branch from 381ea94 to cf5ea22 Compare July 7, 2021 11:24
@dvanders
Copy link
Copy Markdown
Contributor Author

dvanders commented Jul 7, 2021

@dvanders i think your fix does work! could you squash these two commits into a single one?

thanks for the testing, @tchaikov !

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.

3 participants