swift/test/unit/cli
Matthew Oliver 4ce907a4ae relinker: Add /recon/relinker endpoint and drop progress stats
To further benefit the stats capturing for the relinker, drop partition
progress to a new relinker.recon recon cache and add a new recon endpoint:

  GET /recon/relinker

To gather get live relinking progress data:

  $ curl http://127.0.0.3:6030/recon/relinker |python -mjson.tool
  {
      "devices": {
          "sdb3": {
              "parts_done": 523,
              "policies": {
                  "1": {
                      "next_part_power": 11,
                      "start_time": 1618998724.845616,
                      "stats": {
                          "errors": 0,
                          "files": 1630,
                          "hash_dirs": 1630,
                          "linked": 1630,
                          "policies": 1,
                          "removed": 0
                      },
                      "timestamp": 1618998730.24672,
                      "total_parts": 1029,
                      "total_time": 5.400741815567017
                  }},
              "start_time": 1618998724.845946,
              "stats": {
                  "errors": 0,
                  "files": 836,
                  "hash_dirs": 836,
                  "linked": 836,
                  "removed": 0
              },
              "timestamp": 1618998730.24672,
              "total_parts": 523,
              "total_time": 5.400741815567017
          },
          "sdb7": {
              "parts_done": 506,
              "policies": {
                  "1": {
                      "next_part_power": 11,
                      "part_power": 10,
                      "parts_done": 506,
                      "start_time": 1618998724.845616,
                      "stats": {
                          "errors": 0,
                          "files": 794,
                          "hash_dirs": 794,
                          "linked": 794,
                          "removed": 0
                      },
                      "step": "relink",
                      "timestamp": 1618998730.166175,
                      "total_parts": 506,
                      "total_time": 5.320528984069824
                  }
              },
              "start_time": 1618998724.845616,
              "stats": {
                  "errors": 0,
                  "files": 794,
                  "hash_dirs": 794,
                  "linked": 794,
                  "removed": 0
              },
              "timestamp": 1618998730.166175,
              "total_parts": 506,
              "total_time": 5.320528984069824
          }
      },
      "workers": {
          "100": {
              "drives": ["sda1"],
              "return_code": 0,
              "timestamp": 1618998730.166175}
      }}

Also, add a constant DEFAULT_RECON_CACHE_PATH to help fix failing tests
by mocking recon_cache_path, so that errors are not logged due
to dump_recon_cache exceptions.

Mock recon_cache_path more widely and assert no error logs more
widely.

Change-Id: I625147dadd44f008a7c48eb5d6ac1c54c4c0ef05
2021-05-10 16:13:32 +01:00
..
__init__.py Add some tests for bin/swift-recon 2014-01-31 15:34:37 +00:00
test_container_deleter.py Fix __exit__ calls 2021-01-13 12:42:23 -08: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 Merge "swift-container-info: Show shard ranges summary" 2020-07-24 21:39:52 +00:00
test_ipv6_output.stub Add Composite Ring Functionality 2017-05-15 16:42:00 -07:00
test_manage_shard_ranges.py Consider tombstone count before shrinking a shard 2021-05-07 18:41:18 +01:00
test_recon.py Add sharding to swift-recon 2021-04-28 11:05:15 -07:00
test_relinker.py relinker: Add /recon/relinker endpoint and drop progress stats 2021-05-10 16:13:32 +01: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 Treat add/remove/rebalance during part-power increase as error 2020-07-23 17:00:16 -07:00
test_ringcomposer.py Py3: Port test/unit/test_ringcomposer.py 2018-12-01 03:28:52 +01:00