I've done some deep investigation of this issue, many thanks to xor for the feedback. It is 100% reproducible by degrading a RAID1 array on a VM and simply rebooting. Booting with 'quiet' removed, however, changes the race, and so, it doesn't manifest.
I believe the problem is that wait-for-root does not wait long enough for the MD devices to actually be ready. There's a second problem which is that because wait-for-root doesn't detect the degraded array, so our "boot degraded" option is ignored. I'll open a second task against mdadm as well.
I've done some deep investigation of this issue, many thanks to xor for the feedback. It is 100% reproducible by degrading a RAID1 array on a VM and simply rebooting. Booting with 'quiet' removed, however, changes the race, and so, it doesn't manifest.
I believe the problem is that wait-for-root does not wait long enough for the MD devices to actually be ready. There's a second problem which is that because wait-for-root doesn't detect the degraded array, so our "boot degraded" option is ignored. I'll open a second task against mdadm as well.