Skip to content

squid: qa/cephadm: fix test_set_mon_crush_locations test - #72455

Open
kginonredhat wants to merge 1 commit into
ceph:squidfrom
kginonredhat:wip-74523-squid
Open

kginonredhat wants to merge 1 commit into
ceph:squidfrom
kginonredhat:wip-74523-squid

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 (48ecc59c530 on squid) 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. Tentacle has the same mismatch after its own time_added backport (c5239a4c46d) and is updated in a separate PR.

Test plan

  • rados/cephadm workunit task/test_set_mon_crush_locations passes on squid
  • 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 squid milestone Oct 7, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ceph Release Engineering Audit Report

Automated Redmine Linkage Audit

The following tracking irregularities were found:

  • Orphaned Main PR: Could not find a Redmine tracker for main PR #67436. Please create a ticket, set its 'Pull Request ID', populate the 'Backport' field, and ensure it is in the 'Pending Backport' state.

Commit Parity Visualizer

BACKPORT PR #72455 SOURCE PR SOURCE STATUS
76c5913 qa/cephadm: fix test_set_mon_crush_locations test PR #67436 456eb5d qa/cephadm: fix test_set_mon_crush_locations test

🛟 Need Help?

If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.

📋 Component Lead / Release Manager

To override the audit failure, apply releng-audit-override label or comment /audit override.


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

View workflow run

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephadm releng-audit-fail Release engineering: failed backport verification audit. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants