Skip to content

Commit

Permalink
Merge pull request #2397 from tedyu/helper-quota-error
Browse files Browse the repository at this point in the history
Assign quota if the parsing doesn't encounter error
  • Loading branch information
dashpole authored Feb 24, 2020
2 parents 4066d8b + 21dc5c3 commit 9268b49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion container/common/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ func GetSpec(cgroupPaths map[string]string, machineInfoFactory info.MachineInfoF
val, err := strconv.ParseUint(quota, 10, 64)
if err != nil {
klog.Errorf("GetSpec: Failed to parse CPUQuota from %q: %s", path.Join(cpuRoot, "cpu.cfs_quota_us"), err)
} else {
spec.Cpu.Quota = val
}
spec.Cpu.Quota = val
}
}
}
Expand Down

0 comments on commit 9268b49

Please sign in to comment.