Skip to content

Commit

Permalink
fix realloc volumeChange calculation (#199)
Browse files Browse the repository at this point in the history
* fix realloc volumeChange calculation

* bump version: 20.04.04
  • Loading branch information
zc authored Apr 28, 2020
1 parent 1b24384 commit 15cce95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.04.03
20.04.04
6 changes: 3 additions & 3 deletions cluster/calcium/realloc.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,14 @@ func (c *Calcium) updateContainersResources(ctx context.Context, ch chan *types.
newResource.Volumes = append(newResource.Volumes, autoVbs.ToStringSlice(false, false)...)
}

newResource.SoftLimit = container.SoftLimit
newResource.Volumes = append(newResource.Volumes, hardVbsForContainer[container.ID].ToStringSlice(false, false)...)

newVbs, _ := types.MakeVolumeBindings(newResource.Volumes)
if !newVbs.IsEqual(container.Volumes) {
newResource.VolumeChanged = true
}

newResource.SoftLimit = container.SoftLimit
newResource.Volumes = hardVbsForContainer[container.ID].ToStringSlice(false, false)

ch <- &types.ReallocResourceMessage{
ContainerID: container.ID,
Error: c.updateResource(ctx, node, container, newResource),
Expand Down

0 comments on commit 15cce95

Please sign in to comment.