Instance boot into incorrect root with identical partition UUID without cleaning
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic |
Invalid
|
Low
|
Unassigned | ||
ironic-python-agent |
Invalid
|
Low
|
Unassigned |
Bug Description
When deploying onto a node the UUID for the root filesystem is baked into the image. This UUID may then used to identify the root filesystem e.g.
[centos@t1 ~]$ cat /proc/cmdline
BOOT_IMAGE=
If the same node is then used a second time(without cleaning), this time using root device hints to select a different root device, we then get a partition with the same UUID written to a different disk. The result is a node with two disks with partitions using the same UUID
On boot either of them may be selected, causing a root device that changes on boot(based on some timing factors)
[centos@t1 ~]$ blkid
/dev/vda1: UUID="2018-
/dev/vda2: LABEL="img-rootfs" UUID="cee7ed05-
/dev/vdc1: UUID="2018-
/dev/vdc2: LABEL="img-rootfs" UUID="cee7ed05-
[centos@t1 ~]$ cat /proc/cmdline
BOOT_IMAGE=
[centos@t1 ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 80G 0 disk
├─vda1 252:1 0 1M 0 part
└─vda2 252:2 0 80G 0 part /
vdb 252:16 0 20G 0 disk
vdc 252:32 0 20G 0 disk
├─vdc1 252:33 0 1M 0 part
└─vdc2 252:34 0 20G 0 part
== reboot here ==
[centos@t1 ~]$ cat /proc/cmdline
BOOT_IMAGE=
[centos@t1 ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 80G 0 disk
├─vda1 252:1 0 1M 0 part
└─vda2 252:2 0 80G 0 part
vdb 252:16 0 20G 0 disk
vdc 252:32 0 20G 0 disk
├─vdc1 252:33 0 1M 0 part
└─vdc2 252:34 0 20G 0 part /
the / partition has moved to /dev/vdc2
Possible solutions here are the
a) assert that cleaning should be done
b) make IPA abort if it senses duplicate partition UUID's
c) make IPA clear duplicate partition UUID's during install