Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

squid: librbd: make group and group snapshot IDs more random #57092

Merged
merged 1 commit into from May 8, 2024

Conversation

idryomov
Copy link
Contributor

Image IDs suffered from the same issue -- it was addressed in commit
be83736 ("librbd: block_name_prefix is not created randomly").
The code for generating group IDs is duplicated in api/Group.cc and
got missed.

Instead of cut-and-pasting the fix, just call generate_image_id()
directly and rename variables for more explicitness.

Before:

  $ rados -p rbd ls | grep rbd_group_header
  rbd_group_header.10256b8b4567
  rbd_group_header.10216b8b4567
  rbd_group_header.10236b8b4567
  rbd_group_header.101f6b8b4567

After:

  $ rados -p rbd ls | grep rbd_group_header
  rbd_group_header.10255f555a5
  rbd_group_header.1023f347eafb
  rbd_group_header.101f24c75111
  rbd_group_header.1021dda4e122

Fixes: https://tracker.ceph.com/issues/65573
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 76ed07d)
@idryomov idryomov added this to the squid milestone Apr 25, 2024
@idryomov idryomov requested a review from a team as a code owner April 25, 2024 12:05
@github-actions github-actions bot added the rbd label Apr 25, 2024
@idryomov
Copy link
Contributor Author

jenkins test make check

@idryomov
Copy link
Contributor Author

jenkins test api

@idryomov
Copy link
Contributor Author

jenkins test windows

@idryomov idryomov merged commit cd0c865 into ceph:squid May 8, 2024
12 checks passed
@idryomov idryomov deleted the wip-65573-squid branch May 8, 2024 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants