squid: tools/cephfs: recover alternate_name of dentries from journal#58233
Merged
lxbsz merged 6 commits intoceph:squidfrom Jul 16, 2024
Merged
squid: tools/cephfs: recover alternate_name of dentries from journal#58233lxbsz merged 6 commits intoceph:squidfrom
lxbsz merged 6 commits intoceph:squidfrom
Conversation
It's never a good idea to put new fields in the middle of other encoded values unless you're willing to break all backwards-compatibility. Signed-off-by: Patrick Donnelly <pdonnell@redhat.com> (cherry picked from commit d27b115)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com> (cherry picked from commit a66e80a)
Looked like:
recover_dentries: updating root 0x0x1
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 7599d47)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com> (cherry picked from commit 4b4cb54)
Test without the fix:
2024-05-16T22:34:21.781 DEBUG:teuthology.orchestra.run.smithi044:> sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage timeout 300 ceph --cluster ceph --admin-daemon /var/run/ceph/ceph-mds.a.asok --format=json dump tree /dir 0
...
[
{
"accounted_rstat": {
"rbytes": 4096,
"rctime": "2024-05-16T22:34:15.251864+0000",
"rfiles": 1,
"rsnaps": 0,
"rsubdirs": 1,
"version": 0
},
"atime": "2024-05-16T22:34:14.498880+0000",
"auth_pins": 0,
"auth_state": {
"replicas": {}
},
"authlock": {},
"backtrace_version": 14,
"btime": "2024-05-16T22:34:14.498880+0000",
"change_attr": 3,
"client_caps": [
{
"client_id": 5184,
"issued": "pAsLsXsFsx",
"last_sent": 4,
"pending": "pAsLsXsFsx",
"wanted": "pAsLsXsFsxcral"
}
],
"client_ranges": [],
"ctime": "2024-05-16T22:34:15.249864+0000",
"damage_flags": 0,
"dir_layout": {
"dir_hash": 2,
"unused1": 0,
"unused2": 0,
"unused3": 0
},
"dirfrags": [
{
"auth_pins": 0,
"auth_state": {
"replicas": {}
},
"committed_version": "0",
"committing_version": "0",
"dentries": [
{
"alternate_name": "bUHUwH9E8uiVaf8xZ+zONcB1CToj53x5aUUnKdnNj5U37zbh28l1AaWwHhbOT3HyzqKjmSKKW1o4odQJc7nF9xrKIB8D3b4qqb2Cs6s7t2106hHhQk5/YV7DtpeNPZnorcTqxPM/hExtWHSS4P+S+Dpwj62hMyh/77sGhiW1Filvv1gQjV+sN/GozPNwHgfleadkUs1OkRkYtgWrCjbKP0MayRtiOLrVTRuYyOp/Qt3+XCIyiS87B9bUcOFjWratF+yR0kpJ0RYriix7NKVkBJ0kGWYSCY+PYjiLeMYJBMQcCxW/nwfVku+m6fgFJvb6pjEFxIk9zT5cunSImsjr",
"auth_pins": 0,
"auth_state": {
"replicas": {}
},
"inode": 1099511628283,
"is_auth": true,
"is_freezing": false,
"is_frozen": false,
"is_new": false,
"is_null": false,
"is_primary": true,
"is_remote": false,
"lock": {},
"nref": 2,
"path": "dir/bUHUwH9E8uiVaf8xZ+zONcB1CToj53x5aUUnKdnNj5U37zbh28l1AaWwHhbOT3HyzqKjmSKKW1o4odQJc7nF9xrKIB8D3b4qqb2Cs6s7t2106hHhQk5,YV7DtpeNPZnorcTqxPM,hExtWHSS4P+S+Dpwj62hMyh,77sGhiW1Filvv1gQjV+sN,GozPNwHgfleadkUuZ+PMLCaKQXhuid9WvmHanxJnaabYDLj4VEz+EX2WsG",
...
# fail + journal recovery
2024-05-16T22:35:31.077 DEBUG:teuthology.orchestra.run.smithi044:> sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage timeout 300 ceph --cluster ceph --admin-daemon /var/run/ceph/ceph-mds.a.asok --format=json dump tree /dir 0
...
[
{
"accounted_rstat": {
"rbytes": 4096,
"rctime": "2024-05-16T22:34:15.251864+0000",
"rfiles": 1,
"rsnaps": 0,
"rsubdirs": 1,
"version": 0
},
"atime": "2024-05-16T22:34:14.498880+0000",
"auth_pins": 0,
"auth_state": {
"replicas": {}
},
"authlock": {},
"backtrace_version": 14,
"btime": "2024-05-16T22:34:14.498880+0000",
"change_attr": 3,
"client_caps": [],
"client_ranges": [],
"ctime": "2024-05-16T22:34:15.249864+0000",
"damage_flags": 0,
"dir_layout": {
"dir_hash": 2,
"unused1": 0,
"unused2": 0,
"unused3": 0
},
"dirfrags": [
{
"auth_pins": 0,
"auth_state": {
"replicas": {}
},
"committed_version": "5",
"committing_version": "5",
"dentries": [
{
"alternate_name": "",
"auth_pins": 0,
"auth_state": {
"replicas": {}
},
"inode": 1099511628283,
"is_auth": true,
"is_freezing": false,
"is_frozen": false,
"is_new": false,
"is_null": false,
"is_primary": true,
"is_remote": false,
"lock": {},
"nref": 2,
"path": "dir/bUHUwH9E8uiVaf8xZ+zONcB1CToj53x5aUUnKdnNj5U37zbh28l1AaWwHhbOT3HyzqKjmSKKW1o4odQJc7nF9xrKIB8D3b4qqb2Cs6s7t2106hHhQk5,YV7DtpeNPZnorcTqxPM,hExtWHSS4P+S+Dpwj62hMyh,77sGhiW1Filvv1gQjV+sN,GozPNwHgfleadkUuZ+PMLCaKQXhuid9WvmHanxJnaabYDLj4VEz+EX2WsG",
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit ac092f6)
Right now the cephfs-journal-tool always uses the legacy encoding for dentries which will drop the alternate_name if ever set. Fixes: 39f3440 Fixes: https://tracker.ceph.com/issues/64602 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com> (cherry picked from commit bebec1f)
Member
|
This PR is under test in https://tracker.ceph.com/issues/66762. |
lxbsz
approved these changes
Jul 15, 2024
Member
lxbsz
left a comment
There was a problem hiding this comment.
Checked all the failures, they are all not related, please see 2024-07-09 in https://tracker.ceph.com/projects/cephfs/wiki/Squid.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/66593
backport of #55792
parent tracker: https://tracker.ceph.com/issues/64602
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh