File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import (
3333 "errors"
3434 "fmt"
3535 "io"
36+ "math"
3637 "strconv"
3738 "strings"
3839 "sync"
@@ -1525,9 +1526,13 @@ func makeTaskForMesosResources(
15251526
15261527 if limits != nil && limits .Cpu > 0 {
15271528 mesosTaskInfo .Limits ["cpus" ] = * resources .NewCPUs (limits .Cpu ).Resource .Scalar
1529+ } else {
1530+ mesosTaskInfo .Limits ["cpus" ] = mesos.Value_Scalar {Value : math .Inf (1 )} // magic value for infinity
15281531 }
15291532 if limits != nil && limits .Memory > 0 {
15301533 mesosTaskInfo .Limits ["mem" ] = * resources .NewMemory (limits .Memory ).Resource .Scalar
1534+ } else {
1535+ mesosTaskInfo .Limits ["mem" ] = mesos.Value_Scalar {Value : math .Inf (1 )} // magic value for infinity
15311536 }
15321537
15331538 // We must run the executor with a special LD_LIBRARY_PATH because
You can’t perform that action at this time.
0 commit comments