summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Higgins <derekh@redhat.com>2021-03-01 15:14:46 +0000
committerJulia Kreger <juliaashleykreger@gmail.com>2021-06-01 19:31:13 +0000
commit68157a4bfa09e1a977c6e40909dcc0141e7dbf96 (patch)
tree09575bb536b805c345a60889fa12f82c839ba401
parente3da25329df5ade4f30da562f1b196ecae437636 (diff)
downloadironic-python-agent-68157a4bfa09e1a977c6e40909dcc0141e7dbf96.tar.gz
Increase the memory limit for qemu-img
We appear to be bumping up against this limit when deploying RHCOS images(currently 977MB). Curiously the problem isn't happening all the time but increasing the limit eliminates it. This limit was intruduced to guard against a malicious image allocating an arbitrary amount of memory. Nothing else runs on hosts when IPA is running so we should be ok bumping up the limit. Story: #2008667 Task: #41955 Change-Id: I9405995915a874b00b7177c9642c5469d05d66a8 (cherry picked from commit 5492ad7da59571581e9f70fd054efafb39e12593) (cherry picked from commit de1e75126a09db9d27bfb4d77a3d2eab99c66c0c)
-rwxr-xr-xironic_python_agent/shell/write_image.sh4
-rw-r--r--releasenotes/notes/up-qemuimg-mem-1536183a02b3a235.yaml7
2 files changed, 9 insertions, 2 deletions
diff --git a/ironic_python_agent/shell/write_image.sh b/ironic_python_agent/shell/write_image.sh
index 0a780490..a89c68df 100755
--- a/ironic_python_agent/shell/write_image.sh
+++ b/ironic_python_agent/shell/write_image.sh
@@ -46,8 +46,8 @@ sgdisk -Z $DEVICE
log "Imaging $IMAGEFILE to $DEVICE"
-# limit the memory usage for qemu-img to 1 GiB
-ulimit -v 1048576
+# limit the memory usage for qemu-img to 2 GiB
+ulimit -v 2097152
qemu-img convert -t directsync -O host_device $IMAGEFILE $DEVICE
sync
diff --git a/releasenotes/notes/up-qemuimg-mem-1536183a02b3a235.yaml b/releasenotes/notes/up-qemuimg-mem-1536183a02b3a235.yaml
new file mode 100644
index 00000000..149c80c9
--- /dev/null
+++ b/releasenotes/notes/up-qemuimg-mem-1536183a02b3a235.yaml
@@ -0,0 +1,7 @@
+---
+fixes:
+ - |
+ Increase memory usage limit for ``qemu-img convert`` command to 2 GiB.
+ See `Story 2008667
+ <https://storyboard.openstack.org/#!/story/2008667>`_
+ for details.