min cpu shares is 2

This commit is contained in:
Girish Ramakrishnan
2020-01-28 22:38:54 -08:00
parent 4ba9f80d44
commit b8cddf559a
+1 -1
View File
@@ -253,7 +253,7 @@ function validateMemoryLimit(manifest, memoryLimit) {
function validateCpuShares(cpuShares) {
assert.strictEqual(typeof cpuShares, 'number');
if (cpuShares <= 0 || cpuShares > 1024) return new BoxError(BoxError.BAD_FIELD, 'cpuShares has to be between 0 and 1024');
if (cpuShares < 2 || cpuShares > 1024) return new BoxError(BoxError.BAD_FIELD, 'cpuShares has to be between 2 and 1024');
return null;
}