Project

General

Profile

Actions

Bug #15771

closed

API: mirror_image_status_list does not work correctly which non-empty `start` argument

Added by Mykola Golub almost 8 years ago. Updated almost 8 years ago.

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

0%

Source:
other
Tags:
Backport:
jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

rbd_mirror_image_status_list function has `start` (`last_read`) argument used for reading large lists in chunks. It is not work as expected, because user sets it the last read image name, while internally image ID list is used. The consequence e.g. is incorrect behavior of `rbd mirror pool status` for pools with more than 1024 mirroring images.


Related issues 1 (0 open1 closed)

Copied to rbd - Backport #15814: jewel: API: mirror_image_status_list does not work correctly which non-empty `start` argumentResolvedJason DillamanActions
Actions #1

Updated by Mykola Golub almost 8 years ago

  • Status changed from New to In Progress

I don't see how to fix this without changing API. Even if `start` arg, passed by the user as image name, is converted internally to the image id, this image is most probably wont be the last in the previously obtained id list.

I see two possible ways to fix this:

1) change `const std::string &start` to `std::string &start` so it is set to the last read by the function internally (the user will not need to set it manually, just to pass the latest return to the next call).

2) change the function to always return status for all images in the pool (remove max_read limit). In this case there is no a way to control resources for large pools. Also for C API we will need to do all allocation inside the function (right know the arrays are pre-allocated by the caller).

I prefer (1), still I will not have problems if it is (2). What do others think?

Actions #2

Updated by Jason Dillaman almost 8 years ago

  • Backport set to jewel
Actions #3

Updated by Mykola Golub almost 8 years ago

  • Status changed from In Progress to Fix Under Review
Actions #4

Updated by Jason Dillaman almost 8 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #5

Updated by Jason Dillaman almost 8 years ago

  • Copied to Backport #15814: jewel: API: mirror_image_status_list does not work correctly which non-empty `start` argument added
Actions #6

Updated by Jason Dillaman almost 8 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF