Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix data race in node upsert #24127

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/24127.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
state: Fixed a bug where compatibility updates for node topology for nodes older than 1.7.0 were not being correctly applied
```
8 changes: 4 additions & 4 deletions nomad/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2251,7 +2251,7 @@ func (n *Node) Canonicalize() {
n.SchedulingEligibility = NodeSchedulingEligible
}

// COMPAT remove in 1.9+
// COMPAT remove in 1.10+
// In v1.7 we introduce Topology into the NodeResources struct which the client
// will fingerprint. Since the upgrade path must cover servers that get upgraded
// before clients which will send the old struct, we synthesize a pseudo topology
Expand Down Expand Up @@ -3262,9 +3262,9 @@ func (n *NodeResources) Copy() *NodeResources {
}
}

// COMPAT remove in 1.9+
// COMPAT remove in 1.10+
// apply compatibility fixups covering node topology
n.Compatibility()
newN.Compatibility()

return newN
}
Expand Down Expand Up @@ -3326,7 +3326,7 @@ func (n *NodeResources) Merge(o *NodeResources) {
}
}

// COMPAT remove in 1.9+
// COMPAT remove in 1.10+
// apply compatibility fixups covering node topology
n.Compatibility()
}
Expand Down