Skip to content

rbd-nbd: fix resize of images mapped using netlink#55287

Merged
idryomov merged 2 commits intoceph:mainfrom
ajarr:wip-64139
Jan 25, 2024
Merged

rbd-nbd: fix resize of images mapped using netlink#55287
idryomov merged 2 commits intoceph:mainfrom
ajarr:wip-64139

Conversation

@ajarr
Copy link
Contributor

@ajarr ajarr commented Jan 23, 2024

Include device identifier or cookie in the message sent to the kernel
to resize images mapped to NBD devices using netlink. Otherwise,
netlink_resize() fails and the size of the device isn't updated.

Fixes: https://tracker.ceph.com/issues/64139
Signed-off-by: Ramana Raja rraja@redhat.com

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@ajarr ajarr requested a review from a team as a code owner January 23, 2024 21:56
@github-actions github-actions bot added the rbd label Jan 23, 2024
@ajarr
Copy link
Contributor Author

ajarr commented Jan 23, 2024

This PR can be tested by adding #55234 and running rbd/nbd qa suite. The #55234 switches the default mapping interface to netlink, and the tests in rbd/nbd qa suite already test the resizing of image that have been mapped.

Copy link
Contributor

@idryomov idryomov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's tack on --options try-netlink in the resize test in qa/workunits/rbd/rbd-nbd.sh (would need to unmap after the previous test and map from scratch for that) so that this PR is testable in isolation, especially when backported.

@idryomov idryomov changed the title rbd_nbd: fix resize of images mapped to NBD devices using netlink rbd-nbd: fix resize of images mapped using netlink Jan 24, 2024
@github-actions github-actions bot added the tests label Jan 24, 2024
@ajarr
Copy link
Contributor Author

ajarr commented Jan 24, 2024

Let's tack on --options try-netlink in the resize test in qa/workunits/rbd/rbd-nbd.sh (would need to unmap after the previous test and map from scratch for that) so that this PR is testable in isolation, especially when backported.

Done.

Copy link
Contributor

@idryomov idryomov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM!

ajarr added 2 commits January 24, 2024 15:33
Include device identifier or cookie in the message sent to the kernel
to resize images mapped to NBD devices using netlink. Otherwise,
netlink_resize() fails and the size of the device isn't updated.

Fixes: https://tracker.ceph.com/issues/64139
Signed-off-by: Ramana Raja <rraja@redhat.com>
When using rbd CLI to map the images to NBD devices via netlink,
any errors that arose during image resizing in netlink_resize()
were not logged. Switching the error logging from using cerr to
derr helps log the errors from netlink_resize().

Signed-off-by: Ramana Raja <rraja@redhat.com>
@idryomov
Copy link
Contributor

jenkins test api

@idryomov
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants