From 9a3a60844d9e2fe42e042cb2b24541450035dca6 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Sun, 21 Feb 2016 18:00:46 -0800 Subject: [PATCH] nomad: alloc update_alloc endpoint to take multiple allocations --- nomad/node_endpoint.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nomad/node_endpoint.go b/nomad/node_endpoint.go index a56d842f3..c94ba7a3e 100644 --- a/nomad/node_endpoint.go +++ b/nomad/node_endpoint.go @@ -452,8 +452,8 @@ func (n *Node) UpdateAlloc(args *structs.AllocUpdateRequest, reply *structs.Gene defer metrics.MeasureSince([]string{"nomad", "client", "update_alloc"}, time.Now()) // Ensure only a single alloc - if len(args.Alloc) != 1 { - return fmt.Errorf("must update a single allocation") + if len(args.Alloc) == 0 { + return fmt.Errorf("must update at least one allocation") } // Commit this update via Raft