diff --git a/.changelog/25523.txt b/.changelog/25523.txt new file mode 100644 index 000000000..2734b8ba0 --- /dev/null +++ b/.changelog/25523.txt @@ -0,0 +1,3 @@ +```release-note:improvement +client: Fixed a bug where JSON formatted logs would not show the requested and overlapping cores when failing to reserve cores +``` diff --git a/client/lib/cgroupslib/partition_linux.go b/client/lib/cgroupslib/partition_linux.go index a3bfe294a..ff36c21b5 100644 --- a/client/lib/cgroupslib/partition_linux.go +++ b/client/lib/cgroupslib/partition_linux.go @@ -85,7 +85,7 @@ func (p *partition) Reserve(cores *idset.Set[hw.CoreID]) error { overlappingCores := p.reserve.Intersect(usableCores) if overlappingCores.Size() > 0 { // COMPAT: prior to Nomad 1.9.X this would silently happen, this should probably return an error instead - p.log.Warn("Unable to exclusively reserve the requested cores", "cores", cores, "overlapping_cores", overlappingCores) + p.log.Warn("Unable to exclusively reserve the requested cores", "cores", cores.Slice(), "overlapping_cores", overlappingCores.Slice()) } p.share.RemoveSet(cores)