nomad: alloc update_alloc endpoint to take multiple allocations

This commit is contained in:
Armon Dadgar 2016-02-21 18:00:46 -08:00
parent 6e8d6e61fc
commit 06425211ab
1 changed files with 2 additions and 2 deletions

View File

@ -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