9 Commits

Author SHA1 Message Date
Lucas Alvares Gomes
449cda4fed Limit memory usage when running qemu-img convert
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
2017-01-19 18:01:30 +00:00
OpenStack Proposal Bot
c40575e4e0 Add bash scripts style checking for IPA
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
2016-11-09 14:14:40 -08:00
Shivanand Tendulker
8f5ed3e2f1 Clear GPT and MBR data structures on disk before imaging
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
2016-02-09 09:13:07 -08:00
Mathieu Mitchell
63851b72ee Use host_device mode for qemu-img
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
2015-06-18 16:00:25 -04:00
Mathieu Mitchell
e53e297a5e Write image directly to disk
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
2014-10-20 10:27:02 -04:00
Jay Faulkner
b43c8c4c4e Fix comments to reflect reality
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
2014-06-20 15:39:12 -07:00
Jay Faulkner
6d9e9e8ba7 Fix incorrect log statement
Logging statement says it's 'imaging' to RAW, when in reality it's a
conversion.

Change-Id: I80d112062f51a6ccc932aeb71ec05042edb09884
2014-06-12 09:21:05 -07:00
Jim Rollenhagen
3c1d52cbb1 Use # instead of """ for copyright blocks
Reformats copyright messages to be comments rather than
docstring-style blocks.

Change-Id: I4d863f53b67bb49d03bda0952b9e6179b6d23c59
2014-04-10 07:14:06 -07:00
Josh Gachnang
b30d345c2e Renaming to IPA 2014-03-19 15:50:43 -07:00