> I assume curtin only does the wipefs when the bcache devices are
attached, correct?

Yes; curtin probes the disks that are present and activates them as
needed.  Bcache is activated by the kernel itself if the metadata header
is present on any block device.

If the disk is not attached to the endpoint when curtin is running, then
it cannot clear them.

However, I'm not sure that's what we're seeing.

Unless somehow the bcache disks are not present during the initial
portion of curtin which wipes devices but the disk was somehow delayed
(like hotplugged?) curtin should see that there is a bcache device on
top of the raided partitions and it will stop and wipe the bcache
device.

The error message you see happens after wiping is complete and curtin
expects that a /dev/bcache0 should NOT already exist when it's
attempting to create a new bcache.  Curtin validates that /dev/bcacheN
is composed of the devices in its configuration and when it encounters a
bcache backing device before it issues the creation command it fails
with a Runtime error.

The only way I can think this would occur is if the devices are not yet
available at the time we start clearing the devices.

If the raid array were damaged and not yet complete, it's possible that
the bcache metadata is not yet restored, so initially we only have the
raid arrays; when they finish rebuilding then the bcache layer may get
activated at that point and we would not have wiped the bcache metadata.

However, I do not think that curtin would allow this as it would have
stopped the raid arrays and wiped contents of the composed device
(/dev/md0, etc) as well as the underlying devices.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1778704

Title:
  redeployment of node with bcache fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/curtin/+bug/1778704/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to