Repository navigation
squid: qa/cephadm: fix test_set_mon_crush_locations test - #72455
Open
kginonredhat wants to merge 1 commit into
Open
kginonredhat wants to merge 1 commit into
kginonredhat wants to merge 1 commit into
Conversation
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)
There was a problem hiding this comment.
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
mainPR #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.
When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_locationsfails because it still requiresmon dump --format jsonto reportcrush_locationas the string{datacenter=a}.mon: add time_added to mon_info_t(48ecc59c530on squid) switchedMonMap::dump()over tomon_info_t::dump(). That encodes the crush-location map withencode_json, so JSON now looks like:jqthen compares that array to the string{datacenter=a}and exits 1, even when the location was applied. Plainceph mon dumpstill 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 -xof 456eb5d. It only updates the workunit to look upcrush_location[].keyand.val. No daemon or mgr code changes.Umbrella already contains 456eb5d. Tentacle has the same mismatch after its own
time_addedbackport (c5239a4c46d) and is updated in a separate PR.Test plan
rados/cephadmworkunittask/test_set_mon_crush_locationspasses on squidceph mon dump --format jsonshowscrush_locationkeydatacenter/ valafor mon.a, and the rack entries for mon.b and mon.c