Skip to content

Commit

Permalink
Merge pull request kata-containers#475 from devimc/topic/fixVcpuHotpl…
Browse files Browse the repository at this point in the history
…ugNested

agent: increase the number of tries to online vcpus
  • Loading branch information
amshinde authored Mar 12, 2019
2 parents 58d7623 + 30bebf5 commit fe5572f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var emptyResp = &gpb.Empty{}

const onlineCPUMemWaitTime = 100 * time.Millisecond

const onlineCPUMaxTries = 10
var onlineCPUMaxTries = uint32(100)

const cpusetMode = 0644

Expand Down
6 changes: 6 additions & 0 deletions grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ func TestOnlineCPUMem(t *testing.T) {
sysfsCPUOnlinePath = "/xyz/123/rgb/abc"
sysfsMemOnlinePath = "/xyz/123/rgb/abc"

oldOnlineCPUMaxTries := onlineCPUMaxTries
onlineCPUMaxTries = 10
defer func() {
onlineCPUMaxTries = oldOnlineCPUMaxTries
}()

_, err := a.OnlineCPUMem(context.TODO(), req)
assert.Error(err, "sysfs paths do not exist")

Expand Down

0 comments on commit fe5572f

Please sign in to comment.