Project

General

Profile

Actions

Bug #64063

closed

rbd-nbd: incorrect device size immediately after mapping images using ioctl

Added by Ramana Raja about 2 years ago. Updated 9 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Backport:
reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
backport_processed
Fixed In:
v19.0.0-896-g2b11aa38eaf
Released In:
v19.2.0~850
Upkeep Timestamp:
2025-07-11T16:43:48+00:00

Description

Mapped rbd images/snapshots to nbd devices using ioctl method, which is currently the default method of mapping using rbd-nbd. Checked the device size and the MD5 checksum of the device immediately after the mapping. The device size and the MD5 checksum were zero bytes and d41d8cd98f00b204e9800998ecf8427e (MD5 checksum of a zero byte file) respectively. After sleeping for a few seconds, the correct device size and MD5 checksum were reported. It seems like the command to map a rbd image to a nbd device using ioctl method returns before waiting for the device to be ready for use.

However, no such issues were observed when mapping a rbd image to a nbd device using the netlink method.


Related issues 3 (0 open3 closed)

Related to Ceph QA - QA Run #69414: wip-yuri4-testing-2025-01-07-1424-reef (wip-yuri4-testing-2025-01-02-1314-reef)QA ClosedYuri WeinsteinActions
Related to Ceph QA - QA Run #70319: wip-yuri5-testing-2025-03-05-0756-reefQA ClosedYuri WeinsteinActions
Copied to rbd - Backport #70364: reef: rbd-nbd: incorrect device size immediately after mapping images using ioctl ResolvedIlya DryomovActions
Actions #1

Updated by Ilya Dryomov about 2 years ago

Unclear if it's worth working around this by waiting internally at this point. I think the action here is to use the netlink method by default, keeping the legacy ioctl method with all of its issues only as a fallback.

Actions #2

Updated by Ramana Raja about 2 years ago

  • Description updated (diff)
Actions #3

Updated by Ramana Raja about 2 years ago

  • Status changed from New to In Progress
  • Assignee set to Ramana Raja
Actions #4

Updated by Ramana Raja about 2 years ago

  • Pull request ID set to 55234
Actions #5

Updated by Ilya Dryomov about 2 years ago

  • Status changed from In Progress to Resolved
Actions #6

Updated by Ilya Dryomov about 1 year ago

  • Related to QA Run #69414: wip-yuri4-testing-2025-01-07-1424-reef (wip-yuri4-testing-2025-01-02-1314-reef) added
Actions #7

Updated by Ilya Dryomov about 1 year ago

  • Related to QA Run #70319: wip-yuri5-testing-2025-03-05-0756-reef added
Actions #8

Updated by Ilya Dryomov about 1 year ago

  • Status changed from Resolved to Pending Backport
  • Backport set to reef

We didn't backport this originally due to a general desire to change defaults only in major releases, but this has gotten out of hand completely on CentOS Stream 9. qa/workunits/rbd/luks-encryption.sh workunit which maps and unmaps an rbd-nbd device a couple dozen times fails 10 out of 10 times now, so a backport is in order IMO.

Actions #9

Updated by Upkeep Bot about 1 year ago

  • Copied to Backport #70364: reef: rbd-nbd: incorrect device size immediately after mapping images using ioctl added
Actions #10

Updated by Upkeep Bot about 1 year ago

  • Tags (freeform) set to backport_processed
Actions #11

Updated by Upkeep Bot about 1 year ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions #12

Updated by Upkeep Bot 9 months ago

  • Merge Commit set to 2b11aa38eaf6572a4d2f56e9ca63d41b1ed77d80
  • Fixed In set to v19.0.0-896-g2b11aa38eaf
  • Released In set to v19.2.0~850
  • Upkeep Timestamp set to 2025-07-11T16:43:48+00:00
Actions

Also available in: Atom PDF