Skip to content

tentacle: qa/cephadm: fix test_set_mon_crush_locations test - #72454

Merged
batrick merged 1 commit into
ceph:tentaclefrom
kginonredhat:wip-74523-tentacle
Nov 25, 2026
Merged

batrick merged 1 commit into
ceph:tentaclefrom
kginonredhat:wip-74523-tentacle

Conversation

@kginonredhat

@kginonredhat kginonredhat commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

backport tracker: https://tracker.ceph.com/issues/74523


backport of #67436
parent tracker: https://tracker.ceph.com/issues/74523

Summary

task/test_set_mon_crush_locations fails because it still requires mon dump --format json to report crush_location as the string {datacenter=a}.

mon: add time_added to mon_info_t (c5239a4c46d on tentacle) switched MonMap::dump() over to mon_info_t::dump(). That encodes the crush-location map with encode_json, so JSON now looks like:

"crush_location": [{"key": "datacenter", "val": "a"}]

jq then compares that array to the string {datacenter=a} and exits 1, even when the location was applied. Plain ceph mon dump still prints {datacenter=a}. The sample in #67436 is a mon whose location was set correctly and would still fail the old check.

This is a clean git cherry-pick -x of 456eb5d. It only updates the workunit to look up crush_location[].key and .val. No daemon or mgr code changes.

Umbrella already contains 456eb5d. Squid has the same mismatch after its own time_added backport (48ecc59c530) and is updated in a separate PR.

Test plan

  • rados/cephadm workunit task/test_set_mon_crush_locations passes on tentacle
  • ceph mon dump --format json shows crush_location key datacenter / val a for mon.a, and the rack entries for mon.b and mon.c

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 <[email protected]>
(cherry picked from commit 456eb5d)
@kginonredhat
kginonredhat requested a review from a team as a code owner October 7, 2026 09:02
@github-actions github-actions Bot added this to the tentacle milestone Oct 7, 2026
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Oct 7, 2026
@yuriw

yuriw commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri14-testing-20261021.151926-tentacle.

@sseshasa

sseshasa commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

@yuriw yuriw added needs-merge QA-approved, awaiting merge window wip-yuri14-testing and removed wip-yuri14-testing needs-merge QA-approved, awaiting merge window labels Nov 11, 2026
@batrick batrick removed the releng-audit-fail Release engineering: failed backport verification audit. label Nov 25, 2026
@batrick batrick modified the milestones: tentacle, v20.2.6 Nov 25, 2026
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Nov 25, 2026
@batrick batrick added the releng-audit-queue Release engineering: queued for backport verification audit. label Nov 25, 2026
@github-actions github-actions Bot added releng-audit-pass Release engineering: passed backport verification audit. and removed releng-audit-queue Release engineering: queued for backport verification audit. releng-audit-fail Release engineering: failed backport verification audit. labels Nov 25, 2026
@batrick
batrick merged commit 00cde47 into ceph:tentacle Nov 25, 2026
27 of 29 checks passed
@yuriw

yuriw commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

This PR has been removed from wip-yuri14-testing-20261021.151926-tentacle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephadm needs-qa releng-audit-pass Release engineering: passed backport verification audit. tests wip-yuri14-testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants