Signed-off-by: Lei Jitang <leijitang@huawei.com>
Lei Jitang authored on 2016/02/03 18:31:00... | ... |
@@ -208,10 +208,12 @@ func (daemon *Daemon) populateCommand(c *container.Container, env []string) erro |
208 | 208 |
BlkioThrottleWriteBpsDevice: writeBpsDevice, |
209 | 209 |
BlkioThrottleReadIOpsDevice: readIOpsDevice, |
210 | 210 |
BlkioThrottleWriteIOpsDevice: writeIOpsDevice, |
211 |
- OomKillDisable: *c.HostConfig.OomKillDisable, |
|
212 | 211 |
MemorySwappiness: -1, |
213 | 212 |
} |
214 | 213 |
|
214 |
+ if c.HostConfig.OomKillDisable != nil { |
|
215 |
+ resources.OomKillDisable = *c.HostConfig.OomKillDisable |
|
216 |
+ } |
|
215 | 217 |
if c.HostConfig.MemorySwappiness != nil { |
216 | 218 |
resources.MemorySwappiness = *c.HostConfig.MemorySwappiness |
217 | 219 |
} |