Skip to content

Commit fe5572f

Browse files
authored
Merge pull request kata-containers#475 from devimc/topic/fixVcpuHotplugNested
agent: increase the number of tries to online vcpus
2 parents 58d7623 + 30bebf5 commit fe5572f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

grpc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ var emptyResp = &gpb.Empty{}
6868

6969
const onlineCPUMemWaitTime = 100 * time.Millisecond
7070

71-
const onlineCPUMaxTries = 10
71+
var onlineCPUMaxTries = uint32(100)
7272

7373
const cpusetMode = 0644
7474

grpc_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,12 @@ func TestOnlineCPUMem(t *testing.T) {
227227
sysfsCPUOnlinePath = "/xyz/123/rgb/abc"
228228
sysfsMemOnlinePath = "/xyz/123/rgb/abc"
229229

230+
oldOnlineCPUMaxTries := onlineCPUMaxTries
231+
onlineCPUMaxTries = 10
232+
defer func() {
233+
onlineCPUMaxTries = oldOnlineCPUMaxTries
234+
}()
235+
230236
_, err := a.OnlineCPUMem(context.TODO(), req)
231237
assert.Error(err, "sysfs paths do not exist")
232238

0 commit comments

Comments
 (0)