Repository navigation
tentacle: qa/cephadm: fix test_set_mon_crush_locations test - #72454
Merged
Merged
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)
rkachach
approved these changes
Oct 16, 2026
Contributor
|
This PR has been added to wip-yuri14-testing-20261021.151926-tentacle. |
Contributor
Contributor
|
This PR has been removed from wip-yuri14-testing-20261021.151926-tentacle. |
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(c5239a4c46don tentacle) 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. Squid has the same mismatch after its own
time_addedbackport (48ecc59c530) and is updated in a separate PR.Test plan
rados/cephadmworkunittask/test_set_mon_crush_locationspasses on tentacleceph mon dump --format jsonshowscrush_locationkeydatacenter/ valafor mon.a, and the rack entries for mon.b and mon.c