]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/rbd: explain why "primary" isn't exposed in mirror_image_status_list() 42471/head
authorIlya Dryomov <idryomov@gmail.com>
Tue, 27 Jul 2021 16:45:20 +0000 (18:45 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 27 Jul 2021 19:32:16 +0000 (21:32 +0200)
"primary" is part of mirror image info (rbd_mirror_image_info_t) and
is exposed in mirror_image_get_status().  mirror_image_status_list(),
even though it is often thought of as an equivalent of repeated calls
to mirror_image_get_status(), doesn't actually fetch the mirror image
info.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/pybind/rbd/rbd.pyx

index fa9197a5f99c6eea11c910a165391f34ae4e665b..16014f1409cfb52f691b1ba05fb260e0bc59645a 100644 (file)
@@ -2278,6 +2278,8 @@ cdef class MirrorImageStatusIterator(object):
                     'info'        : {
                         'global_id' : decode_cstr(self.images[i].info.global_id),
                         'state'     : self.images[i].info.state,
+                        # primary isn't added here because it is unknown (always
+                        # false, see XXX in Mirror::image_global_status_list())
                         },
                     'remote_statuses': site_statuses,
                     }