Bug #53426
closedrbd_directory (and some others) corrupted after update from 15.2.10 to 16.2.6
0%
Description
After an upgrade from 15.2.10 to 16.2.6, i noticed that some images were doing strange things ie, an image is appering in rbd ls
but doing an rbd info
on it return an ENOENT
$> rbd ls | grep scw-disk-47f0955d-ca3a-4d33-addb-f66c78c31ec4 scw-disk-47f0955d-ca3a-4d33-addb-f66c78c31ec4 $> rbd info scw-disk-47f0955d-ca3a-4d33-addb-f66c78c31ec4 2021-11-29T13:49:59.920+0000 7f9bf27fc700 -1 librbd::image::OpenRequest: failed to retrieve initial metadata: (2) No such file or directory rbd: error opening image scw-disk-47f0955d-ca3a-4d33-addb-f66c78c31ec4: (2) No such file or directory
Inspecting the omap value of rbd_directory, the keys related to this particular image seems strange (as they look prefixed by non printable characters):
key (34 bytes): 00000000 00 00 00 00 00 00 00 01 00 00 00 00 00 00 12 7d |...............}| 00000010 2e 69 64 5f 30 37 66 61 36 39 31 66 65 36 65 30 |.id_07fa691fe6e0| 00000020 35 33 |53| 00000022 value (49 bytes) : 00000000 2d 00 00 00 73 63 77 2d 64 69 73 6b 2d 61 62 34 |-...scw-disk-ab4| 00000010 34 34 65 64 37 2d 63 33 61 61 2d 34 39 35 34 2d |44ed7-c3aa-4954-| 00000020 38 62 37 30 2d 63 63 30 61 38 36 31 37 66 37 66 |8b70-cc0a8617f7f| 00000030 37 |7| 00000031 key (67 bytes): 00000000 00 00 00 00 00 00 00 01 00 00 00 00 00 00 12 7d |...............}| 00000010 2e 6e 61 6d 65 5f 73 63 77 2d 64 69 73 6b 2d 61 |.name_scw-disk-a| 00000020 62 34 34 34 65 64 37 2d 63 33 61 61 2d 34 39 35 |b444ed7-c3aa-495| 00000030 34 2d 38 62 37 30 2d 63 63 30 61 38 36 31 37 66 |4-8b70-cc0a8617f| 00000040 37 66 37 |7f7| 00000043 value (18 bytes) : 00000000 0e 00 00 00 30 37 66 61 36 39 31 66 65 36 65 30 |....07fa691fe6e0| 00000010 35 33 |53| 00000012
I left this image like that, but on another one, that exhibited the same issues, fixing the key to name_XXX
// id_YYY
fixed the rbd_info
Also, as far as i know snaptshot related stuff should be stored in rbd_children omap values, but :
$> rados -p rbd listomapvals rbd_children error getting omap keys rbd/rbd_children: (2) No such file or directory
I had also had a namespace that was not appearing in rbd namespace list
, but doing an rbd ls --namespace XXX
was working, readding the key in rbd_namespace
omapval did the trick tho.
Files