]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
qa/cephadm: fix test_set_mon_crush_locations test
authorAdam King <adking@redhat.com>
Thu, 19 Feb 2026 18:15:04 +0000 (13:15 -0500)
committerAdam King <adking@redhat.com>
Thu, 19 Feb 2026 19:18:48 +0000 (14:18 -0500)
commit456eb5d2f65cf68d651e1ec3d9be16a6811e9283
tree725c05ba57efd0ed3be237edaa7df25ea019f791
parent53f8441172c46e34523029ab88f9db7a45514e84
qa/cephadm: fix test_set_mon_crush_locations test

This test appears to have been expecting a now
outdated output from `ceph mon dump --format json`.

This commit modifies the test script to handle
the current format as of writing this on main

    {
      "rank": 1,
      "name": "b",
      "public_addrs": {
        "addrvec": [
          {
            "type": "v2",
            "addr": "10.20.193.146:3300",
            "nonce": 0
          },
          {
            "type": "v1",
            "addr": "10.20.193.146:6789",
            "nonce": 0
          }
        ]
      },
      "addr": "10.20.193.146:6789/0",
      "public_addr": "10.20.193.146:6789/0",
      "priority": 0,
      "weight": 0,
      "time_added": "2026-02-19T17:19:05:089735+0000",
      "crush_location": [
        {
          "key": "datacenter",
          "val": "b"
        },
        {
          "key": "rack",
          "val": "2"
        }
      ]
    },

indexed under the "mons" key in the json output. The old
format would just have k/v pairs as strings e.g. "datacenter=a"
as the command still does currently when a format flag is not
provided.

Signed-off-by: Adam King <adking@redhat.com>
qa/suites/orch/cephadm/workunits/task/test_set_mon_crush_locations.yaml