Gonéri Le Bouder 0b1f01db94 iscsi: wipe part table before starting the target
If the local disk has already a partition table, it must be clean up
before the disk is exposed through iscsi. Otherwise this disk partition
can create a conflict during the grub installation.

How reproducible:

1. Inject an image on the root disk, like for example ipxe.usb or ipxe.iso
2. Try to deploy a system on the node using Ironic
3. The node is properly deployed but the grub installation has failed
   with the following error:
     attempting to install grub to a disk with multiple partition labels

A simple sgdisk -Z /dev/vdX is not enough because grub-install will
inspect the disk and will still detect a remaining partition.

This commit makes use of the ironic-lib to do the clean up of the disk.
The additional review Id59fa5a06b9115c0f9afc09aae95daaac97e2fac increase
the amount of data to wipe.

References:
https://bugzilla.redhat.com/show_bug.cgi?id=1310883

Partial-Bug: 1550604

Change-Id: Ie68cb6296c782e904d40f6e9de0faa52ab2af2bf
2016-03-22 13:28:21 -04:00
..
2014-04-14 15:09:12 -07:00
2015-03-24 08:43:35 +01:00