Merge pull request #2397 from tedyu/helper-quota-error

Assign quota if the parsing doesn't encounter error
This commit is contained in:
David Ashpole 2020-02-24 12:57:55 -08:00 committed by GitHub
commit 9268b49cf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,8 +109,9 @@ func GetSpec(cgroupPaths map[string]string, machineInfoFactory info.MachineInfoF
val, err := strconv.ParseUint(quota, 10, 64) val, err := strconv.ParseUint(quota, 10, 64)
if err != nil { if err != nil {
klog.Errorf("GetSpec: Failed to parse CPUQuota from %q: %s", path.Join(cpuRoot, "cpu.cfs_quota_us"), err) 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
} }
} }
} }