Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pacific: osd/OSD: introduce reset_purged_snaps_last #53970

Merged
merged 2 commits into from Nov 5, 2023

Conversation

Matan-B
Copy link
Contributor

@Matan-B Matan-B commented Oct 11, 2023

backport tracker: https://tracker.ceph.com/issues/63179


backport of #53579
parent tracker: https://tracker.ceph.com/issues/62981

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh

@Matan-B Matan-B requested a review from a team as a code owner October 11, 2023 16:28
@Matan-B Matan-B added this to the pacific milestone Oct 11, 2023
@Matan-B Matan-B added the core label Oct 11, 2023
@github-actions github-actions bot added the tests label Oct 11, 2023
@yuriw
Copy link
Contributor

yuriw commented Oct 24, 2023

@Matan-B I suspect this PR is breaking the build:

[ 63%] Building CXX object src/librbd/CMakeFiles/rbd_internal.dir/journal/DemoteRequest.cc.o
/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/16.2.14-106-g6e5b7fb8/rpm/el8/BUILD/ceph-16.2.14-106-g6e5b7fb8/src/osd/OSD.cc: In member function ‘void OSD::asok_command(std::string_view, const cmdmap_t&, ceph::Formatter*, const bufferlist&, std::function<void(int, const std::__cxx11::basic_string&, ceph::buffer::v15_2_0::list&)>)’:
/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/16.2.14-106-g6e5b7fb8/rpm/el8/BUILD/ceph-16.2.14-106-g6e5b7fb8/src/osd/OSD.cc:3039:40: error: no matching function for call to ‘OSD::write_superblock(ceph::common::CephContext*&, OSDSuperblock&, ObjectStore::Transaction&)’
write_superblock(cct, superblock, t);

https://jenkins.ceph.com/job/ceph-dev-new-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=centos8,DIST=centos8,MACHINE_SIZE=gigantic/73541//consoleFull

Pls take a look

When the OSD preboots it sends a MMonGetPurgedSnaps message to
the monitor (`_get_purged_snaps`).
The monitor will reply with all the purged snapshots that their purged_epoch_ is in the
range of superblock.purged_snaps_last + 1 up to the last superblock.current_epoch + 1.
When the OSD will handle the reply from the mon (`handle_get_purged_snaps_reply`)
it will call `record_purged_snaps` to write those purged snapshots in the
OSD store as well (PSN_ keys).

Once purged_snaps_last is reset, in the following OSD reboot, the snapshots that were marked as
purged (purged_snaps_ keys) in the mon's store will be also marked,
correspondingly, in the OSD store.
That way `scrub_purged_snaps` will be able to re-trim the snapshots that weren't
marked as purged in the OSD side (for some reason)

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

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 120ed0f)
Manual conflict fixes: 'scrubdebug' command was removed since it's
                       not part of the original commit.

                       write_superblock() parameters were changed
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 680e088)
@Matan-B
Copy link
Contributor Author

Matan-B commented Oct 24, 2023

@Matan-B I suspect this PR is breaking the build:
Pls take a look

@yuriw fixed, thank you.

@Matan-B
Copy link
Contributor Author

Matan-B commented Oct 24, 2023

jenkins test make check

@ljflores
Copy link
Contributor

ljflores commented Nov 2, 2023

@yuriw we need to include this in a new batch.

@ljflores
Copy link
Contributor

ljflores commented Nov 2, 2023

@yuriw we need to include this in a new batch.

Ignore this- I thought the PR was dropped from the batch. But it was retested.

Rados approved: https://tracker.ceph.com/projects/rados/wiki/PACIFIC#httpstrellocomcXxBiaEyT1874-wip-yuri5-testing-2023-10-24-0737-pacific-old-wip-yuri5-testing-2023-10-23-1158-pacific

@Matan-B Matan-B merged commit c61b354 into ceph:pacific Nov 5, 2023
8 checks passed
@batrick batrick modified the milestones: pacific, v16.2.15 Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants