Previously it was checked using blkid -t LABEL=config-2, but
this was not finding the partition, causing that images with a
pre-existing config-drive partition had an extra one created
Switched to using the 'lsblk' command and parsing the output of that to
get the information on the partition.
Support configdrive in iscsi deploy for whole disk images
This will work for UEFI only or BIOS only images. It will not
work for hybrid images; which are capable of boot from BIOS
and UEFI boot mode.
destroy_disk_metadata should destroy a bit more data than expected if we
want to be sure grub won't conflict with remaining bits of filesystem.
grub probes the hard drive to find remaining partition or filesystem. If
it find something, it will refuse to install itself on the disk.
By using wipefs instead of dd, we not only erase the MBR and partition
table but also all trace of filesystem, raid or partition-table signatures
(magic strings). This without extra Python code.
wipefs is part of util-linux which is available on all the Linux
Replace rootwrap_config and rootwrap_helper_cmd with root_helper
ironic-lib will use the command set in the new 'root_helper' conf parameter to execute
commands as root user. If this configuration paramter is not specified,
ironic-lib will execute commands with run_as_root=False. This configuration
is not set by default.
'rootwrap_config' and 'rootwrap_helper_cmd' configs are deleted, since
they are replaced by the new 'root_helper' config.
This fix also delivers a sample ironic-lib.filters file, which should be used
with rootwrap command.