Project

General

Profile

Bug #56676

[rbd-mirror] misleading "image is still primary within a remote cluster" error message

Added by Ilya Dryomov over 1 year ago. Updated about 1 year ago.

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

0%

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

Description

If the local image is far behind and the remote image is demoted, upon attempting to orderly promote the local image, "rbd mirror image promote" fails as follows:

$ rbd mirror image promote set_2_image_20
2022-07-22T12:10:45.488+0000 7fc6c2ffd700 -1 librbd::mirror::PromoteRequest: 0x5620dcb559e0 handle_get_info: image is still primary within a remote cluster
rbd: error promoting image to primary
2022-07-22T12:10:45.488+0000 7fc6d969e380 -1 librbd::api::Mirror: image_promote: failed to promote image

As the images aren't in sync, "rbd mirror image promote" refusing promotion in this case is correct. However "image is still primary within a remote cluster" error message is misleading, because, after being demoted, the remote image is no longer primary. Among other places, this is visible in "rbd mirror image status" output:

$ rbd mirror image status set_2_image_20
set_2_image_20:
  global_id:   19e83f00-9bf7-4c0d-9972-3d836d306462
  state:       up+unknown
  description: remote image demoted
  service:     admin on foobar
  last_update: 2022-07-22 11:49:16
  peer_sites:
    name: site-b
    state: up+unknown
    description: remote image is not primary
    last_update: 2022-07-22 11:49:24

Local and remote mirror snapshots for this image:

SNAPID  NAME                                                                                           SIZE     PROTECTED  TIMESTAMP                 NAMESPACE                                                                           
898449  .mirror.non_primary.19e83f00-9bf7-4c0d-9972-3d836d306462.b04bb9b3-f680-43b6-b13b-1e2bf889ad3a  120 GiB             Tue Jul 12 15:20:23 2022  mirror (non-primary peer_uuids:[] 47a427fd-c33b-4eb1-af14-1842ae9977f1:78435 copied)
SNAPID   NAME                                                                                       SIZE     PROTECTED  TIMESTAMP                 NAMESPACE                                                        
  78435  .mirror.primary.19e83f00-9bf7-4c0d-9972-3d836d306462.6cd32a39-1ad4-4254-9570-ccb1b6407d3c  120 GiB             Wed Jul  6 12:24:13 2022  mirror (primary peer_uuids:[b56cf146-fd95-49b9-8bac-d96b8e7b48ec])
  78586  .mirror.primary.19e83f00-9bf7-4c0d-9972-3d836d306462.cbe71831-37cc-4239-b659-077bd4c8a919  120 GiB             Wed Jul  6 12:26:40 2022  mirror (primary peer_uuids:[b56cf146-fd95-49b9-8bac-d96b8e7b48ec])
  78681  .mirror.primary.19e83f00-9bf7-4c0d-9972-3d836d306462.b200b9f3-f94f-4b23-9b9b-77231327990b  120 GiB             Wed Jul  6 12:28:12 2022  mirror (primary peer_uuids:[b56cf146-fd95-49b9-8bac-d96b8e7b48ec])
  78826  .mirror.primary.19e83f00-9bf7-4c0d-9972-3d836d306462.b6b12ae0-e0be-41d5-ba45-b9f6ce23eeef  120 GiB             Wed Jul  6 12:30:16 2022  mirror (primary peer_uuids:[b56cf146-fd95-49b9-8bac-d96b8e7b48ec])
1274495  .mirror.primary.19e83f00-9bf7-4c0d-9972-3d836d306462.bb119526-41f3-45e6-937c-8f70ea022e2a  120 GiB             Fri Jul 22 11:40:04 2022  mirror (primary peer_uuids:[b56cf146-fd95-49b9-8bac-d96b8e7b48ec])
1274554  .mirror.primary.19e83f00-9bf7-4c0d-9972-3d836d306462.064b232d-b4a2-484a-a8ac-b2cd4e796c52  120 GiB             Fri Jul 22 11:40:44 2022  mirror (demoted peer_uuids:[b56cf146-fd95-49b9-8bac-d96b8e7b48ec])
1274880  .mirror.primary.19e83f00-9bf7-4c0d-9972-3d836d306462.b0119c98-38f5-480e-b33a-5e58d656e21f  120 GiB             Fri Jul 22 11:46:40 2022  mirror (primary peer_uuids:[b56cf146-fd95-49b9-8bac-d96b8e7b48ec])
1274901  .mirror.primary.19e83f00-9bf7-4c0d-9972-3d836d306462.c82b2653-ead3-4ac1-9c3e-bff6cf69730e  120 GiB             Fri Jul 22 11:48:00 2022  mirror (primary peer_uuids:[b56cf146-fd95-49b9-8bac-d96b8e7b48ec])
1274913  .mirror.primary.19e83f00-9bf7-4c0d-9972-3d836d306462.4a47727d-143e-4302-8a45-168ba5d2d44a  120 GiB             Fri Jul 22 11:48:46 2022  mirror (demoted peer_uuids:[b56cf146-fd95-49b9-8bac-d96b8e7b48ec])

Related issues

Copied to rbd - Backport #56679: quincy: [rbd-mirror] misleading "image is still primary within a remote cluster" error message Resolved
Copied to rbd - Backport #56680: pacific: [rbd-mirror] misleading "image is still primary within a remote cluster" error message Resolved

History

#1 Updated by Ilya Dryomov over 1 year ago

  • Description updated (diff)

#2 Updated by Ilya Dryomov over 1 year ago

  • Description updated (diff)

#3 Updated by Ilya Dryomov over 1 year ago

  • Description updated (diff)
  • Backport set to pacific,quincy

#4 Updated by Ilya Dryomov over 1 year ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 47242

#5 Updated by Ilya Dryomov over 1 year ago

  • Status changed from Fix Under Review to Pending Backport

#6 Updated by Backport Bot over 1 year ago

  • Copied to Backport #56679: quincy: [rbd-mirror] misleading "image is still primary within a remote cluster" error message added

#7 Updated by Backport Bot over 1 year ago

  • Copied to Backport #56680: pacific: [rbd-mirror] misleading "image is still primary within a remote cluster" error message added

#8 Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed

#9 Updated by Backport Bot about 1 year ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Also available in: Atom PDF