Bug 2174361 - [RFE][RGW] [SyncPolicy] sync status doesn't reflect syncpolicy set [NEEDINFO]
Summary: [RFE][RGW] [SyncPolicy] sync status doesn't reflect syncpolicy set
Keywords:
Status: POST
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RGW-Multisite
Version: 6.0
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
: 6.1z2
Assignee: Soumya Koduri
QA Contact: Madhavi Kasturi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-01 09:35 UTC by Soumya Koduri
Modified: 2023-07-20 17:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:
mbenjamin: needinfo? (skoduri)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-6198 0 None None None 2023-03-01 09:37:02 UTC

Description Soumya Koduri 2023-03-01 09:35:33 UTC
Description of problem:

If only a subset of zones are allowed to sync among each other, ideally remaining zones should not be listed as source in "sync status" cmd output.

For eg., Out of zg1-1, zg1-2 , zg1-3 zones, if zonegroup policy is set to allow symmetrical sync between zg1-1 & zg1-3 zones only, 

- zg1-3 should not be listed as source in the sync status of zg1-1 & zg1-2 
- Likewise, zg1-1 & zg1-2 should not be listed as source for zg1-3

However all the zones are still listed in the 'sync status' output. It may not be easy to improve the cmd output here as  it should consider all the policies set (symmetrical/directional) for all the buckets across the zonegroup.

This bug is to check if its feasible to address it.


Note: 'bucket sync status' is updated as per the policy set. 

Version-Release number of selected component (if applicable):
6.0

How reproducible:
Always

Steps to Reproduce:
1. Create three zones (zg1-1, zg1-2, zg1-3) in a zonegroup zg1
2. Create a policy at zonegroup to allow sync among only two zones (zg1-1, zg1-2) 
3. Execute 'sync status' on zones zg1-1, zg1-2, zg1-3 & verify if the source-zones are updated accordingly



Actual results:

[root@localhost build]# ../src/mrun c1 radosgw-admin sync info
2023-03-01T15:00:39.834+0530 7fa30b168780 -1 WARNING: all dangerous and experimental features are enabled.
2023-03-01T15:00:39.840+0530 7fa30b168780 -1 WARNING: all dangerous and experimental features are enabled.
2023-03-01T15:00:39.841+0530 7fa30b168780 -1 WARNING: all dangerous and experimental features are enabled.
{
    "sources": [
        {
            "id": "pipe1",
            "source": {
                "zone": "zg1-2",
                "bucket": "*"
            },
            "dest": {
                "zone": "zg1-1",
                "bucket": "*"
            },
            "params": {
                "source": {
                    "filter": {
                        "tags": []
                    }
                },
                "dest": {},
                "priority": 0,
                "mode": "system",
                "user": ""
            }
        }
    ],
    "dests": [
        {
            "id": "pipe1",
            "source": {
                "zone": "zg1-1",
                "bucket": "*"
            },
            "dest": {
                "zone": "zg1-2",
                "bucket": "*"
            },
            "params": {
                "source": {
                    "filter": {
                        "tags": []
                    }
                },
                "dest": {},
                "priority": 0,
                "mode": "system",
                "user": ""
            }
        }
    ],
    "hints": {
        "sources": [],
        "dests": []
    },
    "resolved-hints-1": {
        "sources": [],
        "dests": []
    },
    "resolved-hints": {
        "sources": [],
        "dests": []
    }
}
[root@localhost build]# 


[root@localhost build]# ../src/mrun c2 radosgw-admin sync status 
2023-03-01T15:02:22.070+0530 7f442ae0f780 -1 WARNING: all dangerous and experimental features are enabled.
2023-03-01T15:02:22.082+0530 7f442ae0f780 -1 WARNING: all dangerous and experimental features are enabled.
2023-03-01T15:02:22.084+0530 7f442ae0f780 -1 WARNING: all dangerous and experimental features are enabled.
          realm 8723cec1-d662-4407-9c26-f33b6ca0d975 (earth)
      zonegroup 9d9091cf-ef86-45c5-b004-bbab0806148e (zg1)
           zone a91b66d1-11fc-4d3e-9da2-ab28bb70f926 (zg1-2)
   current time 2023-03-01T09:32:22Z
zonegroup features enabled: resharding
  metadata sync syncing
                full sync: 0/64 shards
                incremental sync: 64/64 shards
                metadata is caught up with master
      data sync source: a25d088f-a0a8-4cdd-b7ba-e40821b494e6
                        syncing
                        full sync: 0/128 shards
                        incremental sync: 128/128 shards
                        data is caught up with source
                source: d64bd094-4d7f-4431-a2c9-1e8e21a532bc
                        syncing
                        full sync: 0/128 shards
                        incremental sync: 128/128 shards
                        data is caught up with source
[root@localhost build]# ../src/mrun c3 radosgw-admin sync status 
2023-03-01T15:02:28.049+0530 7f781b17b780 -1 WARNING: all dangerous and experimental features are enabled.
2023-03-01T15:02:28.058+0530 7f781b17b780 -1 WARNING: all dangerous and experimental features are enabled.
2023-03-01T15:02:28.059+0530 7f781b17b780 -1 WARNING: all dangerous and experimental features are enabled.
          realm 8723cec1-d662-4407-9c26-f33b6ca0d975 (earth)
      zonegroup 9d9091cf-ef86-45c5-b004-bbab0806148e (zg1)
           zone a25d088f-a0a8-4cdd-b7ba-e40821b494e6 (zg1-3)
   current time 2023-03-01T09:32:28Z
zonegroup features enabled: resharding
  metadata sync syncing
                full sync: 0/64 shards
                incremental sync: 64/64 shards
                metadata is caught up with master
      data sync source: a91b66d1-11fc-4d3e-9da2-ab28bb70f926
                        syncing
                        full sync: 0/128 shards
                        incremental sync: 128/128 shards
                        data is caught up with source
                source: d64bd094-4d7f-4431-a2c9-1e8e21a532bc
                        syncing
                        full sync: 0/128 shards
                        incremental sync: 128/128 shards
                        data is caught up with source
[root@localhost build]# 


[root@localhost build]# ../src/mrun c1 radosgw-admin bucket sync status --bucket=bucket1
2023-03-01T15:04:57.666+0530 7f2a5997e780 -1 WARNING: all dangerous and experimental features are enabled.
2023-03-01T15:04:57.673+0530 7f2a5997e780 -1 WARNING: all dangerous and experimental features are enabled.
2023-03-01T15:04:57.673+0530 7f2a5997e780 -1 WARNING: all dangerous and experimental features are enabled.
          realm 8723cec1-d662-4407-9c26-f33b6ca0d975 (earth)
      zonegroup 9d9091cf-ef86-45c5-b004-bbab0806148e (zg1)
           zone d64bd094-4d7f-4431-a2c9-1e8e21a532bc (zg1-1)
         bucket :bucket1[d64bd094-4d7f-4431-a2c9-1e8e21a532bc.4184.1])
   current time 2023-03-01T09:34:57Z

    source zone a91b66d1-11fc-4d3e-9da2-ab28bb70f926 (zg1-2)
  source bucket :bucket1[d64bd094-4d7f-4431-a2c9-1e8e21a532bc.4184.1])
                incremental sync on 11 shards
                bucket is caught up with source
[root@localhost build]# 
[root@localhost build]# ../src/mrun c3 radosgw-admin bucket sync status --bucket=bucket1
2023-03-01T15:05:02.659+0530 7fd0aa1c3780 -1 WARNING: all dangerous and experimental features are enabled.
2023-03-01T15:05:02.667+0530 7fd0aa1c3780 -1 WARNING: all dangerous and experimental features are enabled.
2023-03-01T15:05:02.668+0530 7fd0aa1c3780 -1 WARNING: all dangerous and experimental features are enabled.
          realm 8723cec1-d662-4407-9c26-f33b6ca0d975 (earth)
      zonegroup 9d9091cf-ef86-45c5-b004-bbab0806148e (zg1)
           zone a25d088f-a0a8-4cdd-b7ba-e40821b494e6 (zg1-3)
         bucket :bucket1[d64bd094-4d7f-4431-a2c9-1e8e21a532bc.4184.1])
   current time 2023-03-01T09:35:02Z

Sync is disabled for bucket bucket1 or bucket has no sync sources
[root@localhost build]# 


Expected results:


Additional info:

Comment 1 Soumya Koduri 2023-07-14 06:16:22 UTC
Fix posted for review: https://github.com/ceph/ceph/pull/52445


Note You need to log in before you can comment on or make changes to this bug.