<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/ironic-python-agent.git/ironic_python_agent/shell/write_image.sh, branch stable/ussuri</title>
<subtitle>opendev.org: openstack/ironic-python-agent.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/ironic-python-agent.git/'/>
<entry>
<title>Limit qemu-img execution arenas</title>
<updated>2021-06-01T19:33:23+00:00</updated>
<author>
<name>Julia Kreger</name>
<email>juliaashleykreger@gmail.com</email>
</author>
<published>2021-05-26T18:55:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/ironic-python-agent.git/commit/?id=bc849e2f68fd40fe76515293e4157e94ebd5bf7b'/>
<id>bc849e2f68fd40fe76515293e4157e94ebd5bf7b</id>
<content type='text'>
qemu-img attempts to launch multiple threads by default *and*
attempts to have multiple memory allocation arenas to operate
from. While multithreading can be good for performance, this
pattern and the memory footprint for process launch and
dependencies can turn the memory footprint for a cirros image
conversion (16MB) into 1.2GB of memory being asked for by the
qemu-img tool.

In order to limit this impact, as the default number of arenas
is governed by the number of CPUs times the number 8, it seems
reasonable to lower this to a more reasonable number which
also helps keep our possible memory footprint from being exceeded.

NOTE: This change is largely different than the original change
as an intermediate change converted write_image.sh to python.
As it is unlikely for us to backport the intermediate change,
it is logical for us to just modify the original script.
Otherwise the release note is ultimately what is backported for
release note tooling continutity.

Change-Id: I71a28ec59ec31c691205eb34d9fcab63a2ccb682
Story: 2008928
Task: 42528
(cherry picked from commit 9e4c7052a2fd9aac03858db696bf1ea9487f15e6)
(cherry picked from commit 9c20cca36284a2a17aa535bef92c828096c7d926)
(cherry picked from commit ee8118423b88f61ed58b0420356ceaed2fa53a40)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
qemu-img attempts to launch multiple threads by default *and*
attempts to have multiple memory allocation arenas to operate
from. While multithreading can be good for performance, this
pattern and the memory footprint for process launch and
dependencies can turn the memory footprint for a cirros image
conversion (16MB) into 1.2GB of memory being asked for by the
qemu-img tool.

In order to limit this impact, as the default number of arenas
is governed by the number of CPUs times the number 8, it seems
reasonable to lower this to a more reasonable number which
also helps keep our possible memory footprint from being exceeded.

NOTE: This change is largely different than the original change
as an intermediate change converted write_image.sh to python.
As it is unlikely for us to backport the intermediate change,
it is logical for us to just modify the original script.
Otherwise the release note is ultimately what is backported for
release note tooling continutity.

Change-Id: I71a28ec59ec31c691205eb34d9fcab63a2ccb682
Story: 2008928
Task: 42528
(cherry picked from commit 9e4c7052a2fd9aac03858db696bf1ea9487f15e6)
(cherry picked from commit 9c20cca36284a2a17aa535bef92c828096c7d926)
(cherry picked from commit ee8118423b88f61ed58b0420356ceaed2fa53a40)
</pre>
</div>
</content>
</entry>
<entry>
<title>Increase the memory limit for qemu-img</title>
<updated>2021-06-01T19:30:45+00:00</updated>
<author>
<name>Derek Higgins</name>
<email>derekh@redhat.com</email>
</author>
<published>2021-03-01T15:14:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/ironic-python-agent.git/commit/?id=d8c116aa7bd0e47199cc89ffdae4612915ab2447'/>
<id>d8c116aa7bd0e47199cc89ffdae4612915ab2447</id>
<content type='text'>
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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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)
</pre>
</div>
</content>
</entry>
<entry>
<title>Clear GPT and MBR headers with dd to avoid sgdisk CRC errors</title>
<updated>2018-08-08T16:40:22+00:00</updated>
<author>
<name>Giulio Fidente</name>
<email>gfidente@redhat.com</email>
</author>
<published>2018-08-08T10:16:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/ironic-python-agent.git/commit/?id=bc21b5b1404c269d000e1de6f9dce9c046f7d15d'/>
<id>bc21b5b1404c269d000e1de6f9dce9c046f7d15d</id>
<content type='text'>
This change adds a dd before the existing sgdisk -Z command to
workaround CRC verification errors.

Change-Id: Ia1ac4e1c0faf14ad4bb11c2a1c796c93ca8cb5e3
Closes-Bug: #1737556
Story: 1737556
Task: 11496
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change adds a dd before the existing sgdisk -Z command to
workaround CRC verification errors.

Change-Id: Ia1ac4e1c0faf14ad4bb11c2a1c796c93ca8cb5e3
Closes-Bug: #1737556
Story: 1737556
Task: 11496
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix for fatal error when GPT was used and only MBR was cleaned</title>
<updated>2018-05-17T10:51:55+00:00</updated>
<author>
<name>Olivier Bourdon</name>
<email>obourdon@opennext.io</email>
</author>
<published>2018-05-17T10:50:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/ironic-python-agent.git/commit/?id=5fcf3f066ccdbcc081ae35ab25f1c18737b94778'/>
<id>5fcf3f066ccdbcc081ae35ab25f1c18737b94778</id>
<content type='text'>
You can generate this error if after having provisioned a node
using GPT partitioning, you clean its MBR using say
dd if=/dev/zero bs=1024 count=1 of=/dev/sda
and then cleanup all Ironic/Bifrost informations to get it
reprovisioned.
In this case sgdisk -Z returns an error and last_error field
in Ironic contains:
Error writing image to device: Writing image to device
        /dev/sda failed with exit code 2
Caution: invalid main GPT header, but valid backup;
        regenerating main header\nfrom backup!\n
        \nInvalid partition data!\

Change-Id: Ib617737fff5e40cb376edda0232e0726d9c71231
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
You can generate this error if after having provisioned a node
using GPT partitioning, you clean its MBR using say
dd if=/dev/zero bs=1024 count=1 of=/dev/sda
and then cleanup all Ironic/Bifrost informations to get it
reprovisioned.
In this case sgdisk -Z returns an error and last_error field
in Ironic contains:
Error writing image to device: Writing image to device
        /dev/sda failed with exit code 2
Caution: invalid main GPT header, but valid backup;
        regenerating main header\nfrom backup!\n
        \nInvalid partition data!\

Change-Id: Ib617737fff5e40cb376edda0232e0726d9c71231
</pre>
</div>
</content>
</entry>
<entry>
<title>Limit memory usage when running qemu-img convert</title>
<updated>2017-01-19T18:01:30+00:00</updated>
<author>
<name>Lucas Alvares Gomes</name>
<email>lucasagomes@gmail.com</email>
</author>
<published>2017-01-19T17:16:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/ironic-python-agent.git/commit/?id=449cda4fed51250992446c83a4b50bc45fd10c6d'/>
<id>449cda4fed51250992446c83a4b50bc45fd10c6d</id>
<content type='text'>
This patch is limiting the memory address space to 1 GiB when invoking
qemu-img convert. The qemu-img command can be exploited so we better
play on the safe side (See: bug #1449062).

Change-Id: I2088f74b32d1392310c569cfaa7fd368cb737421
Closes-Bug: #1657808
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is limiting the memory address space to 1 GiB when invoking
qemu-img convert. The qemu-img command can be exploited so we better
play on the safe side (See: bug #1449062).

Change-Id: I2088f74b32d1392310c569cfaa7fd368cb737421
Closes-Bug: #1657808
</pre>
</div>
</content>
</entry>
<entry>
<title>Add bash scripts style checking for IPA</title>
<updated>2016-11-09T22:14:40+00:00</updated>
<author>
<name>OpenStack Proposal Bot</name>
<email>openstack-infra@lists.openstack.org</email>
</author>
<published>2016-11-04T14:08:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/ironic-python-agent.git/commit/?id=c40575e4e046904d5dbd28826bf5308915093f15'/>
<id>c40575e4e046904d5dbd28826bf5308915093f15</id>
<content type='text'>
Updated file tox.ini allows to check code style in all ".sh" files
included in Ironic Python Agent. Checking can be invoked by calling either
"tox" or "tox -e pep8".

Change-Id: Ie76605737c7db10a064f2aebfda388372a4c0591
Closes-Bug: #1625215
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Updated file tox.ini allows to check code style in all ".sh" files
included in Ironic Python Agent. Checking can be invoked by calling either
"tox" or "tox -e pep8".

Change-Id: Ie76605737c7db10a064f2aebfda388372a4c0591
Closes-Bug: #1625215
</pre>
</div>
</content>
</entry>
<entry>
<title>Clear GPT and MBR data structures on disk before imaging</title>
<updated>2016-02-09T17:13:07+00:00</updated>
<author>
<name>Shivanand Tendulker</name>
<email>stendulker@gmail.com</email>
</author>
<published>2016-02-09T16:35:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/ironic-python-agent.git/commit/?id=8f5ed3e2f16cd401b41b2c27617251e8d9894cf2'/>
<id>8f5ed3e2f16cd401b41b2c27617251e8d9894cf2</id>
<content type='text'>
This patch clears all GPT and MBR data structures on the disk.
GPT maintains its data structures at start and at end of the
disk.

Change-Id: I8d0b367755b568cb44f02f62b873659b4bea0f14
Closes-Bug: #1543339
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch clears all GPT and MBR data structures on the disk.
GPT maintains its data structures at start and at end of the
disk.

Change-Id: I8d0b367755b568cb44f02f62b873659b4bea0f14
Closes-Bug: #1543339
</pre>
</div>
</content>
</entry>
<entry>
<title>Use host_device mode for qemu-img</title>
<updated>2015-06-18T20:00:25+00:00</updated>
<author>
<name>Mathieu Mitchell</name>
<email>mmitchell@iweb.com</email>
</author>
<published>2015-06-18T19:57:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/ironic-python-agent.git/commit/?id=63851b72ee74dc51b521e68a910025941661d805'/>
<id>63851b72ee74dc51b521e68a910025941661d805</id>
<content type='text'>
When writing to a host device, possibly one that does not support holes,
it is preferable to use host_device instead of the raw mode. Not doing so
means holes are simply skipped and the deployed image is invalid.

Change-Id: I24f8b4daf099af8bb03c3a4f6417b6c87bd49021
Closes-Bug: #1466632
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When writing to a host device, possibly one that does not support holes,
it is preferable to use host_device instead of the raw mode. Not doing so
means holes are simply skipped and the deployed image is invalid.

Change-Id: I24f8b4daf099af8bb03c3a4f6417b6c87bd49021
Closes-Bug: #1466632
</pre>
</div>
</content>
</entry>
<entry>
<title>Write image directly to disk</title>
<updated>2014-10-20T14:27:02+00:00</updated>
<author>
<name>Mathieu Mitchell</name>
<email>mmitchell@iweb.com</email>
</author>
<published>2014-10-16T20:51:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/ironic-python-agent.git/commit/?id=e53e297a5e920ca4621acfca6c4896a51ba4754d'/>
<id>e53e297a5e920ca4621acfca6c4896a51ba4754d</id>
<content type='text'>
Write image directly to disk by telling qemu-img that the output
file is the disk. Still uses O_DIRECT directly within qemu-img.

This avoids the need to have a huge amount of system memory to be
able to deploy an image that contains a huge disk.

The only feature left behind by that commit is the 64K block size.

Change-Id: If60bcd82581b2ea76c4acbc3eaa3f317d2ee6590
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Write image directly to disk by telling qemu-img that the output
file is the disk. Still uses O_DIRECT directly within qemu-img.

This avoids the need to have a huge amount of system memory to be
able to deploy an image that contains a huge disk.

The only feature left behind by that commit is the 64K block size.

Change-Id: If60bcd82581b2ea76c4acbc3eaa3f317d2ee6590
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix comments to reflect reality</title>
<updated>2014-06-20T22:39:12+00:00</updated>
<author>
<name>Jay Faulkner</name>
<email>jay@jvf.cc</email>
</author>
<published>2014-06-20T22:36:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/ironic-python-agent.git/commit/?id=b43c8c4c4e419abcd412707ac46f827f69fedf90'/>
<id>b43c8c4c4e419abcd412707ac46f827f69fedf90</id>
<content type='text'>
These comments were left in write_image.sh from the 'teeth-agent' days
when these were split into two scripts. I moved the comment into the
correct script and clarified what it means.

Change-Id: Iccdcd925be5c94d993d8125534264f496de4594f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These comments were left in write_image.sh from the 'teeth-agent' days
when these were split into two scripts. I moved the comment into the
correct script and clarified what it means.

Change-Id: Iccdcd925be5c94d993d8125534264f496de4594f
</pre>
</div>
</content>
</entry>
</feed>
