Fix null check for memory swappiness and CPU shares
This commit is contained in:
parent
1f03499fc5
commit
3198999746
@ -35,7 +35,7 @@ public function submit()
|
|||||||
if (!$this->resource->limits_memory_swap) {
|
if (!$this->resource->limits_memory_swap) {
|
||||||
$this->resource->limits_memory_swap = "0";
|
$this->resource->limits_memory_swap = "0";
|
||||||
}
|
}
|
||||||
if (!$this->resource->limits_memory_swappiness) {
|
if (is_null($this->resource->limits_memory_swappiness)) {
|
||||||
$this->resource->limits_memory_swappiness = "60";
|
$this->resource->limits_memory_swappiness = "60";
|
||||||
}
|
}
|
||||||
if (!$this->resource->limits_memory_reservation) {
|
if (!$this->resource->limits_memory_reservation) {
|
||||||
@ -47,7 +47,7 @@ public function submit()
|
|||||||
if ($this->resource->limits_cpuset === "") {
|
if ($this->resource->limits_cpuset === "") {
|
||||||
$this->resource->limits_cpuset = null;
|
$this->resource->limits_cpuset = null;
|
||||||
}
|
}
|
||||||
if (!$this->resource->limits_cpu_shares) {
|
if (is_null($this->resource->limits_cpu_shares)) {
|
||||||
$this->resource->limits_cpu_shares = 1024;
|
$this->resource->limits_cpu_shares = 1024;
|
||||||
}
|
}
|
||||||
$this->validate();
|
$this->validate();
|
||||||
|
Loading…
Reference in New Issue
Block a user