Skip to content

Commit 5fa8f07

Browse files
authored
Merge pull request #27064 from hashicorp/release/1.11.0-rc.1-fixes
Release/1.11.0 rc.1 fixes
2 parents 4db03cc + 4ef827c commit 5fa8f07

File tree

9 files changed

+368
-231
lines changed

9 files changed

+368
-231
lines changed

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ require (
149149
cloud.google.com/go/longrunning v0.6.4 // indirect
150150
cloud.google.com/go/monitoring v1.23.0 // indirect
151151
cloud.google.com/go/storage v1.50.0 // indirect
152+
cyphar.com/go-pathrs v0.2.1 // indirect
152153
dario.cat/mergo v1.0.2 // indirect
153154
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
154155
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 // indirect
@@ -217,7 +218,7 @@ require (
217218
github.com/containerd/log v0.1.0 // indirect
218219
github.com/coreos/go-oidc/v3 v3.11.0 // indirect
219220
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
220-
github.com/cyphar/filepath-securejoin v0.5.1 // indirect
221+
github.com/cyphar/filepath-securejoin v0.6.0 // indirect
221222
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
222223
github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba // indirect
223224
github.com/digitalocean/godo v1.10.0 // indirect
@@ -294,7 +295,7 @@ require (
294295
github.com/nicolai86/scaleway-sdk v1.10.2-0.20180628010248-798f60e20bb2 // indirect
295296
github.com/oklog/run v1.1.0 // indirect
296297
github.com/opencontainers/go-digest v1.0.0 // indirect
297-
github.com/opencontainers/selinux v1.12.0 // indirect
298+
github.com/opencontainers/selinux v1.13.0 // indirect
298299
github.com/packethost/packngo v0.1.1-0.20180711074735-b9cb5096f54c // indirect
299300
github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect
300301
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect

go.sum

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ cloud.google.com/go/storage v1.50.0 h1:3TbVkzTooBvnZsk7WaAQfOsNrdoM8QHusXA1cpk6Q
2424
cloud.google.com/go/storage v1.50.0/go.mod h1:l7XeiD//vx5lfqE3RavfmU9yvk5Pp0Zhcv482poyafY=
2525
cloud.google.com/go/trace v1.11.3 h1:c+I4YFjxRQjvAhRmSsmjpASUKq88chOX854ied0K/pE=
2626
cloud.google.com/go/trace v1.11.3/go.mod h1:pt7zCYiDSQjC9Y2oqCsh9jF4GStB/hmjrYLsxRR27q8=
27+
cyphar.com/go-pathrs v0.2.1 h1:9nx1vOgwVvX1mNBWDu93+vaceedpbsDqo+XuBGL40b8=
28+
cyphar.com/go-pathrs v0.2.1/go.mod h1:y8f1EMG7r+hCuFf/rXsKqMJrJAUoADZGNh5/vZPKcGc=
2729
dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8=
2830
dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA=
2931
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU=
@@ -229,8 +231,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
229231
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
230232
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
231233
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
232-
github.com/cyphar/filepath-securejoin v0.5.1 h1:eYgfMq5yryL4fbWfkLpFFy2ukSELzaJOTaUTuh+oF48=
233-
github.com/cyphar/filepath-securejoin v0.5.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI=
234+
github.com/cyphar/filepath-securejoin v0.6.0 h1:BtGB77njd6SVO6VztOHfPxKitJvd/VPT+OFBFMOi1Is=
235+
github.com/cyphar/filepath-securejoin v0.6.0/go.mod h1:A8hd4EnAeyujCJRrICiOWqjS1AX0a9kM5XL+NwKoYSc=
234236
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
235237
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
236238
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
@@ -716,8 +718,8 @@ github.com/opencontainers/runc v1.2.8 h1:RnEICeDReapbZ5lZEgHvj7E9Q3Eex9toYmaGBsb
716718
github.com/opencontainers/runc v1.2.8/go.mod h1:cC0YkmZcuvr+rtBZ6T7NBoVbMGNAdLa/21vIElJDOzI=
717719
github.com/opencontainers/runtime-spec v1.2.1 h1:S4k4ryNgEpxW1dzyqffOmhI1BHYcjzU8lpJfSlR0xww=
718720
github.com/opencontainers/runtime-spec v1.2.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
719-
github.com/opencontainers/selinux v1.12.0 h1:6n5JV4Cf+4y0KNXW48TLj5DwfXpvWlxXplUkdTrmPb8=
720-
github.com/opencontainers/selinux v1.12.0/go.mod h1:BTPX+bjVbWGXw7ZZWUbdENt8w0htPSrlgOOysQaU62U=
721+
github.com/opencontainers/selinux v1.13.0 h1:Zza88GWezyT7RLql12URvoxsbLfjFx988+LGaWfbL84=
722+
github.com/opencontainers/selinux v1.13.0/go.mod h1:XxWTed+A/s5NNq4GmYScVy+9jzXhGBVEOAyucdRUY8s=
721723
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
722724
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
723725
github.com/packethost/packngo v0.1.1-0.20180711074735-b9cb5096f54c h1:vwpFWvAO8DeIZfFeqASzZfsxuWPno9ncAebBEP0N3uE=

scheduler/reconciler/reconcile_node.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ func (nr *NodeReconciler) computeForNode(
123123
deploymentFailed = nr.DeploymentCurrent.Status == structs.DeploymentStatusFailed
124124
}
125125

126-
// Track whether we're during a canary update
127-
isCanarying := map[string]bool{}
128-
129126
// Scan the existing updates
130127
existing := make(map[string]struct{}) // set of alloc names
131128
for _, alloc := range liveAllocs {
@@ -295,8 +292,9 @@ func (nr *NodeReconciler) computeForNode(
295292

296293
// If the definition is updated we need to update
297294
if job.JobModifyIndex != alloc.Job.JobModifyIndex {
295+
// If configured for canaries and not yet promoted, mark
296+
// alloc update as a canary
298297
if !tg.Update.IsEmpty() && tg.Update.Canary > 0 && dstate != nil && !dstate.Promoted {
299-
isCanarying[tg.Name] = true
300298
result.Update = append(result.Update, AllocTuple{
301299
Name: name,
302300
TaskGroup: tg,
@@ -387,11 +385,6 @@ func (nr *NodeReconciler) computeForNode(
387385
Alloc: termOnNode,
388386
}
389387

390-
// If the terminal allocation was a canary, mark it as such.
391-
if termOnNode != nil && termOnNode.DeploymentStatus != nil && termOnNode.DeploymentStatus.Canary {
392-
allocTuple.Canary = true
393-
}
394-
395388
// If the new allocation isn't annotated with a previous allocation
396389
// or if the previous allocation isn't from the same node then we
397390
// annotate the allocTuple with a new Allocation

scheduler/scheduler_sysbatch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ func (s *SysBatchScheduler) computeJobAllocs() error {
265265
updates := make([]reconciler.AllocTuple, 0, len(r.Update)+len(r.Reconnecting))
266266
updates = append(updates, r.Update...)
267267
updates = append(updates, r.Reconnecting...)
268-
destructiveUpdates, inplaceUpdates := inplaceUpdate(s.ctx, s.eval, s.job, s.stack, updates)
268+
destructiveUpdates, inplaceUpdates := inplaceUpdate(s.ctx, s.eval, s.job, s.stack, updates, "")
269269
r.Update = destructiveUpdates
270270

271271
for _, inplaceUpdate := range inplaceUpdates {

0 commit comments

Comments
 (0)