Actions
Bug #52810
closedRefreshRequest can fail with ENOENT if raced with "rbd flatten"
% Done:
0%
Source:
Tags:
backport_processed
Backport:
pacific,quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Description
This appears to be fairly easy to hit when combined with auto-deletion of trashed snapshots:
$ rbd snap create a@snap Creating snap: 100% complete...done. $ rbd clone --rbd-default-clone-format 2 a@snap b $ rbd snap rm a@snap Removing snap: 100% complete...done. $ rbd flatten b
$ rbd info b rbd image 'b': size 1 GiB in 256 objects order 22 (4 MiB objects) snapshot_count: 0 id: 47904bf44ef0 block_name_prefix: rbd_data.47904bf44ef0 format: 2 features: layering, deep-flatten, operations op_features: clone-child flags: create_timestamp: Thu Sep 30 07:28:38 2021 access_timestamp: Thu Sep 30 07:28:38 2021 modify_timestamp: Thu Sep 30 07:28:38 2021 parent: rbd/a@5272fce1-e70c-44f9-a7b5-ba52828ab6e7 overlap: 1 GiB $ rbd info b 2021-09-30T07:28:45.707-0400 7f9709aa4700 -1 librbd::image::OpenRequest: failed to set image snapshot: (2) No such file or directory 2021-09-30T07:28:45.711-0400 7f970a2a5700 -1 librbd::image::RefreshParentRequest: failed to open parent image: (2) No such file or directory 2021-09-30T07:28:45.711-0400 7f970a2a5700 -1 librbd::image::RefreshRequest: failed to refresh parent image: (2) No such file or directory 2021-09-30T07:28:45.711-0400 7f970a2a5700 -1 librbd::image::OpenRequest: failed to refresh image: (2) No such file or directory rbd: error opening image b: (2) No such file or directory $ rbd info b rbd image 'b': size 1 GiB in 256 objects order 22 (4 MiB objects) snapshot_count: 0 id: 47904bf44ef0 block_name_prefix: rbd_data.47904bf44ef0 format: 2 features: layering, deep-flatten op_features: flags: create_timestamp: Thu Sep 30 07:28:38 2021 access_timestamp: Thu Sep 30 07:28:38 2021 modify_timestamp: Thu Sep 30 07:28:38 2021
ceph-csi calls "rbd info" in a number of places and sporadic ErrImageNotFound failures result in stale images being left behind (i.e. a slowly-growing space leak).
Actions