swift/test/unit/cli
Matthew Oliver 52c80d652d cli: add --sync to db info to show syncs
When looking at containers and accounts it's sometimes nice to know who
they've been replicating with. This patch adds a `--sync|-s` option to
swift-{container|account}-info which will also dump the incoming and
outgoing sync tables:

  $ swift-container-info /srv/node3/sdb3/containers/294/624/49b9ff074c502ec5e429e7af99a30624/49b9ff074c502ec5e429e7af99a30624.db -s
  Path: /AUTH_test/new
    Account: AUTH_test
    Container: new
    Deleted: False
    Container Hash: 49b9ff074c502ec5e429e7af99a30624
  Metadata:
    Created at: 2022-02-16T05:34:05.988480 (1644989645.98848)
    Put Timestamp: 2022-02-16T05:34:05.981320 (1644989645.98132)
    Delete Timestamp: 1970-01-01T00:00:00.000000 (0)
    Status Timestamp: 2022-02-16T05:34:05.981320 (1644989645.98132)
    Object Count: 1
    Bytes Used: 7
    Storage Policy: default (0)
    Reported Put Timestamp: 1970-01-01T00:00:00.000000 (0)
    Reported Delete Timestamp: 1970-01-01T00:00:00.000000 (0)
    Reported Object Count: 0
    Reported Bytes Used: 0
    Chexor: 962368324c2ca023c56669d03ed92807
    UUID: f33184e7-56d5-4c74-9d2e-5417c187d722-sdb3
    X-Container-Sync-Point2: -1
    X-Container-Sync-Point1: -1
  No system metadata found in db file
  No user metadata found in db file
  Sharding Metadata:
    Type: root
    State: unsharded
  Incoming Syncs:
    Sync Point	Remote ID                                	Updated At
    1         	ce7268a1-f5d0-4b83-b993-af17b602a0ff-sdb1	2022-02-16T05:38:22.000000 (1644989902)
    1         	2af5abc0-7f70-4e2f-8f94-737aeaada7f4-sdb4	2022-02-16T05:38:22.000000 (1644989902)
  Outgoing Syncs:
    Sync Point	Remote ID	Updated At
  Partition	294
  Hash     	49b9ff074c502ec5e429e7af99a30624

As a follow up to the device in DB ID patch we can see that the replicas
at sdb1 and sdb4 have replicated with this node.

Change-Id: I23d786e82c6710bea7660a9acf8bbbd113b5b727
2024-01-16 08:19:08 -08:00
..
__init__.py Add some tests for bin/swift-recon 2014-01-31 15:34:37 +00:00
test_container_deleter.py Modify log_name in internal clients' pipeline configs 2022-01-12 11:07:25 +00:00
test_default_output_id_assigned.stub Add Composite Ring Functionality 2017-05-15 16:42:00 -07:00
test_default_output.stub Add Composite Ring Functionality 2017-05-15 16:42:00 -07:00
test_default_sorted_output.stub Order devices in the output of swift-ring-builder 2017-06-22 16:06:48 -07:00
test_dispersion_report.py Test placeholder for dispersion_report module 2017-09-13 16:49:00 -06:00
test_form_signature.py pep8: Turn on E305 2020-04-03 21:22:38 +02:00
test_info.py cli: add --sync to db info to show syncs 2024-01-16 08:19:08 -08:00
test_ipv6_output.stub ring-builder: Better format large weights 2022-08-02 14:29:16 -07:00
test_manage_shard_ranges.py Merge "sharder: update own_sr stats explicitly" 2022-12-09 22:13:44 +00:00
test_recon_cron.py Fix repeated unnecessarily 'os.makedirs()' in test_recon_cron.py 2023-09-23 23:32:09 +09:00
test_recon.py Add and pipe reconstructor stats through recon 2021-08-20 00:03:40 +00:00
test_relinker.py Remove support for --link-check-limit 2021-07-14 14:57:11 -07:00
test_reload.py Add a swift-reload command 2023-10-16 15:44:06 -07:00
test_ring_builder_analyzer.py Use more specific asserts in test/unit/cli tests 2016-08-03 12:19:40 +00:00
test_ringbuilder.py ring-builder: Better format large weights 2022-08-02 14:29:16 -07:00
test_ringcomposer.py Py3: Port test/unit/test_ringcomposer.py 2018-12-01 03:28:52 +01:00