Partitions are not properly wiped
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ironic-lib |
Fix Released
|
High
|
Gonéri Le Bouder |
Bug Description
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 review Id59fa5a06b9115
References:
https:/
Changed in ironic: | |
assignee: | nobody → bin Yu (froyo-bin) |
status: | New → Confirmed |
status: | Confirmed → New |
summary: |
- no standard partition are not properly wiped + Partitions are not properly wiped |
Changed in ironic: | |
status: | New → Triaged |
importance: | Undecided → High |
affects: | ironic → ironic-lib |
Changed in ironic-lib: | |
assignee: | bin Yu (froyo-bin) → Gonéri Le Bouder (goneri) |
status: | Triaged → In Progress |
How to reproduce the issue:
# fallocate -l 5G test.img boot.ipxe. org/ipxe. iso > /dev/loop0
Dload Upload Total Spent Left Speed
# losetup -f test.img /dev/loop0
# curl http://
% Total % Received % Xferd Average Speed Time Time Time Current
100 672k 100 672k 0 0 359k 0 0:00:01 0:00:01 --:--:-- 359k
# sgdisk -Z /dev/loop0
Creating new GPT entries.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
# grub2-install /dev/loop0
Installing for i386-pc platform.
grub2-install: warning: File system ‘iso9660’ doesn't support embedding.
grub2-install: error: embedding is not possible, but this is required for cross-disk install.