| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
(cherry picked from commit 5fcf3f066ccdbcc081ae35ab25f1c18737b94778)
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Currently a reboot bash script file is used to call reboot and
poweroff operation. Deleting this file and moving the code to
python file using utils.execute()
Partial-Bug: #1557542
Change-Id: Iad9cd9d15417e9a954d108d2759e6303452fca27
Author: Bharath kumar <shettybharath4@gmail.com>
Co-Authored-By: Annie Lezil <annie.lezil@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Shell script to create config drive being replaced with python
code in ironic-lib.
Closes-Bug: #1493328
Change-Id: I31108f1173db3fb585386b2949ec880a95305fb6
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the deployment happens on a GPT disk with config drive, writing
it to disk fails. Three reasons for that:
* parted should be used instead of partprobe to determine the type of
the disk;
* gdisk -l sorts the partitions by their number, sort them by start
sector instead;
* after sgdisk completion, the configdrive device is not immediately
visible in the /dev folder, udevadm settle needed here too.
Closes-Bug: #1633063
Change-Id: Ifed89e343f9db4cf303baf7f8823342f6041f202
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The script splits 'sfdisk' output wrongly in blank spaces leading to
failures when partition id is greater than 10, e.g.:
"/dev/sda10: start= ...".
This fix splits the output on ":" and trims trailing space when
partition id is less than 10, e.g.: "/dev/sda1 : start= ...".
Change-Id: I23f4b747fc0a86713cb912afc5d193398e6a597b
Closes-Bug: 1581699
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is modifying the shutdown.sh script to not use SYSRQ when
performing power actions. SYSRQ has a similar effect to a hardware reset
button/power switch, which can be problematic after copying an image to
the disk (data loss) therefore, this patch is changing the script to use
soft power action via the poweroff and reboot commands.
SYSRQ was required before because the ironic-python-agent service was
running inside a docker container, but since we've moved it to run into
a chroot (when built with coreos) or on the ramdisk's OS (when built
with DIB) the SYSRQ actions are not needed anymore.
In many parts of Ironic we were considering the standby.{power_off,
reboot} methods of IPA to be soft actions, which they are not at
present. This patch is also fixing that assumption.
Change-Id: Ibe3a3f61a4a0e98b2c2501ad95154839933b4d7a
Closes-Bug: #1557450
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
TinyCoreLinux is a small 10mb base linux distribution which can easily
be built into a ramdisk for PXE and ISO booting. This patch adds scripts
and other required files to build a TinyCore based ramdisk which runs
the Ironic Python Agent.
Change-Id: I79fbec75de19b3d6feb19f87a3a0f662eae42bf3
|
| |
|
|
|
|
|
|
|
|
|
| |
Currently there is a problem on partition creation for MBR
case. If disk exceeds 2TB, partition creation fails because
we are hitting max msdos limit. Detect total disk size, and if
it exceeds that limit, create the partition at the end of legal
limits.
Fixes-Bug: #1517077
Change-Id: I11dd3f11eaa6af764151b442768d10289ced6d3f
|
| |
|
|
|
|
|
|
|
|
|
| |
This fix enables creation of config drive for UEFI only whole disk
images.
It will not work with the hybrid images that support booting in BIOS
and UEFI boot mode.
Change-Id: Ib4dd8c082a50e1dbaf0df91477b062716cb780ff
Closes-Bug: #1486887
Depends-On: I81400305f166d62aa4612aab54602abb8178b64c
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit adds a new command power_off to
standby extension which runs shutdown -h now
on the system. This commit also adds mappings
for /proc and /sys in cloud-config.yml for the
agent service spawned.
Partial-Bug: #1451310
Change-Id: I2a5f984af26bbbe03002bb8c367c8c6af8d91434
|
| |
|
|
|
|
|
|
| |
This commit echoes '1' to >/proc/sys/kernel/sysrq to
make sure that sysrq functions are enabled before
invoking them.
Change-Id: I88697efbc1bd0dec5ed4cbcd8d89b0b5d0734bdd
|
| |
|
|
|
|
|
|
|
|
|
|
| |
partx -u $DEVICE doesn't work in some cases, but partprobe $DEVICE fails
in virtual environments (like devstack). For now, run both commands and
ignore partprobe failures.
Moving forward, this shell should be factored into python and share code
with the other partition-modifying code added this cycle.
Change-Id: I7e4c010e260be2a23dcc894bc0c1b30aea949084
Partial-bug: 1433812
|
| |
|
|
|
|
|
|
| |
partprobe does not appear to work in virtual machines. Let's find out if
`partx -u` does the same thing and also works on virt.
Change-Id: I4467299a82e728930ac8f99a0ba16d3ea7c6755c
Closes-Bug: #1418833
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
When we have just written out a whole disk image, if we do not run
partprobe none of the new partitions show up in blkid, therefore even
images with a built-in configdrive partition will have one created
Change-Id: I6ec98dc237b42bfe94ce79cf84d155332335c9f6
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using set -e, if you have a command fail, even when setting a
variable, it causes the node to fail. I have removed set -e and checked
error state where unexpected everywhere. I also added additional
logging.
Closes-Bug: #1326326
Change-Id: I7d2568c3693b9c486672e4322c7f01622aeba875
|
| |/
|
|
|
|
|
| |
Logging statement says it's 'imaging' to RAW, when in reality it's a
conversion.
Change-Id: I80d112062f51a6ccc932aeb71ec05042edb09884
|
| |
|
|
|
|
|
|
|
|
| |
This adds support for copying configdrives to disks that already have
partitions enabled and labeled for configdrives. This is neccessary for
supporting configdrives on partitioning schemes we don't support yet
(like GPT) or for some future agent iteration where we create partitions
separately.
Change-Id: Iee5b87d82be08febc495aaef3272ced4f2f32235
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parameters sent to `prepare_image` changed in
https://review.openstack.org/#/c/86490/
This patch brings `prepare_image` up to date with that change.
It also changes the way configdrive is written to disk, to match
that Ironic is now allowing Nova to build an ISO partition and
send the raw image to the agent.
This patch also swaps out subprocess.call for processutils.execute
in the standby module, since the commands were being changed anyway.
Lastly, this patch changes the expected `hashes` dict to be a
string parameter called `checksum`, to match what glance returns.
Change-Id: Id8af9be920ba51e7e1ce60f4ffd1477e413582c9
|
| |
|
|
|
|
|
| |
Reformats copyright messages to be comments rather than
docstring-style blocks.
Change-Id: I4d863f53b67bb49d03bda0952b9e6179b6d23c59
|
| | |
|
| |
|