瀏覽代碼

Merge pull request #33731 from runcom/rt-fix-update

container: update real-time resources
Yong Tang 7 年之前
父節點
當前提交
dfe2c023a3
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      container/container_unix.go

+ 6 - 0
container/container_unix.go

@@ -332,6 +332,12 @@ func (container *Container) UpdateContainer(hostConfig *containertypes.HostConfi
 	if resources.KernelMemory != 0 {
 		cResources.KernelMemory = resources.KernelMemory
 	}
+	if resources.CPURealtimePeriod != 0 {
+		cResources.CPURealtimePeriod = resources.CPURealtimePeriod
+	}
+	if resources.CPURealtimeRuntime != 0 {
+		cResources.CPURealtimeRuntime = resources.CPURealtimeRuntime
+	}
 
 	// update HostConfig of container
 	if hostConfig.RestartPolicy.Name != "" {