Comment 13 for bug 1796292

Revision history for this message
Ryan Harper (raharper) wrote :

@jhobbs

I see that now; I missed the curtin section since the log had more than just the single curtin install boot.

I think I see something; but since I've never been able to reproduce this in our integration harness it's been hard to diagnose.

The Shutdown Plan for cleaning devices shows that it has detected bcache0p1 as a 'bcache' device, when it's really a 'partition' which should only trigger a wipe of the partition, the actual bcache device is the parent (bcache0).

Shutdown Plan:
{'level': 3, 'dev_type': 'bcache', 'device': '/sys/class/block/bcache0/bcache0p1'}
{'level': 2, 'dev_type': 'bcache', 'device': '/sys/class/block/bcache1'}
{'level': 2, 'dev_type': 'bcache', 'device': '/sys/class/block/bcache0'}
{'level': 1, 'dev_type': 'partition', 'device': '/sys/class/block/nvme0n1/nvme0n1p2'}
{'level': 1, 'dev_type': 'partition', 'device': '/sys/class/block/sda/sda1'}
{'level': 1, 'dev_type': 'partition', 'device': '/sys/class/block/sda/sda2'}
{'level': 1, 'dev_type': 'partition', 'device': '/sys/class/block/nvme0n1/nvme0n1p1'}
{'level': 1, 'dev_type': 'partition', 'device': '/sys/class/block/sda/sda3'}
{'level': 0, 'dev_type': 'disk', 'device': '/sys/class/block/sda'}
{'level': 0, 'dev_type': 'disk', 'device': '/sys/class/block/nvme0n1'}
{'level': 0, 'dev_type': 'disk', 'device': '/sys/class/block/sdb'}

Then this leads us to attempt to write to bcache0/bcache0p1/bcache, which does not exist (it's a partition, not a bcache device).

Error writing to bcache stop file /sys/class/block/bcache0/bcache0p1/bcache/stop, device removed: [Errno 1] Operation not permitted: '/sys/class/block/bcache0/bcache0p1/bcache'
waiting for /sys/class/block/bcache0/bcache0p1 to be removed
sleeping 0.2

We repeat and fail each time.

With that in mind, I've updated the fix for bcache-partitions with a change that prevents partitions on top of bcache devices from being classified as 'bcache' devices. This will fix the issue that you produced, but it's not the original issue (which didn't involve bcache devices with partitions).

So, with the updated curtin (18.2-0ubuntu10~clear-holders-bcache-partitions-lp1811117-ppa10) in the ppa:raharper/bugfixes, please attempt to reproduce.