ceph/qa/workunits/rbd
Ilya Dryomov 7fb4fdbed0 mgr/rbd_support: always rescan image mirror snapshots on refresh
Establishing a watch on rbd_mirroring object and skipping rescanning
image mirror snapshots on periodic refresh unless rbd_mirroring object
gets notified in the interim is flawed.  rbd_mirroring object is
notified when mirroring is enabled or disabled on some image (including
when the image is removed), but it is not notified when images are
promoted or demoted.  However, load_pool_images() discards images that
are not primary at the time of the scan.  If the image is promoted
later, no snapshots are created even if the schedule is in place.  This
happens regardless of whether the schedule is added before or after the
promotion.

This effectively reverts commit 69259c8d37 ("mgr/rbd_support: make
mirror_snapshot_schedule rescan only updated pools").  An alternative
fix could be to stop discarding non-primary images (i.e. drop

    if not info['primary']:
        continue

check added in commit d39eb283c5 ("mgr/rbd_support: mirror snapshot
schedule should skip non-primary images")), but that would clutter the
queue and therefore "rbd mirror snapshot schedule status" output with
bogus entries.  Performing a rescan roughly every 60 seconds should be
manageable: currently it amounts to a single mirror_image_status_list
request, followed by mirror_image_get, get_snapcontext and snapshot_get
requests for each snapshot-based mirroring enabled image and concluded
by a single dir_list request.  Among these, per-image get_snapcontext
and snapshot_get requests are necessary for determining primaryness.

Fixes: https://tracker.ceph.com/issues/53914
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-06-21 12:46:49 +02:00
..
cli_generic.sh mgr/rbd_support: always rescan image mirror snapshots on refresh 2022-06-21 12:46:49 +02:00
cli_migration.sh librbd: permit disabling QCOW migration format support 2021-02-23 07:19:43 -05:00
concurrent.sh
diff_continuous.sh
diff.sh
huge-tickets.sh
image_read.sh
import_export.sh
issue-20295.sh
journal.sh
kernel.sh
krbd_data_pool.sh
krbd_exclusive_option.sh
krbd_fallocate.sh
krbd_huge_osdmap.sh
krbd_latest_osdmap_on_map.sh
krbd_namespaces.sh
krbd_rxbounce.sh qa: krbd rxbounce test 2022-02-04 19:04:37 +01:00
krbd_stable_writes.sh
krbd_udev_enumerate.sh
krbd_udev_netlink_enobufs.sh
krbd_udev_netns.sh
krbd_udev_symlinks.sh
krbd_wac.sh
luks-encryption.sh qa/workunits/rbd: make luks-encryption test work on vstart cluster 2021-02-15 15:03:00 +00:00
map-snapshot-io.sh
map-unmap.sh
merge_diff.sh
notify_master.sh
notify_slave.sh
permissions.sh
qemu_dynamic_features.sh
qemu_rebuild_object_map.sh
qemu-iotests.sh workunits/rbd: remove lsb_release 2021-08-18 13:08:24 -04:00
qos.sh
rbd_groups.sh
rbd_mirror_bootstrap.sh qa/suites/rbd: test case for one-way snapshot-based mirroring 2021-09-24 12:30:14 +02:00
rbd_mirror_fsx_compare.sh
rbd_mirror_fsx_prepare.sh
rbd_mirror_ha.sh
rbd_mirror_helpers.sh qa/rbd-mirror: add OMAP cleanup checks 2021-08-18 18:50:44 +02:00
rbd_mirror_journal.sh rbd-mirror: add image_map cleanup in LoadRequest 2021-08-18 18:52:37 +02:00
rbd_mirror_snapshot.sh rbd-mirror: add image_map cleanup in LoadRequest 2021-08-18 18:52:37 +02:00
rbd_mirror_stress.sh qa/rbd-mirror: add OMAP cleanup checks 2021-08-18 18:50:44 +02:00
rbd-ggate.sh
rbd-nbd.sh qa/workunits/rbd: test map/attach with --show-cookie/--cookie options 2021-10-26 19:24:13 +05:30
read-flags.sh
simple_big.sh
test_admin_socket.sh
test_librbd_python.sh
test_librbd.sh
test_lock_fence.sh
test_rbd_mirror.sh
test_rbd_tasks.sh
test_rbdmap_RBDMAPFILE.sh
verify_pool.sh