Project

General

Profile

Bug #56676

Updated by Ilya Dryomov almost 2 years ago

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: with the following error: 

 <pre> 
 $ 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 
 </pre> 

 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: 

 <pre> 
 $ 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 
 </pre> 

 For reference, local and remote mirror snapshots for this image: 

 <pre> 
 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) 
 </pre> 

 <pre> 
 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]) 
 </pre>

Back