Fail to deploy with Bcache when using cache multiple times
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
Critical
|
Unassigned | ||
curtin |
Fix Released
|
Critical
|
Unassigned |
Bug Description
Hello, wanting to try out some of the new bcache love and got this error:
UUID: 0819d505-
Set UUID: b080425e-
version: 0
nbuckets: 488390
block_size: 1
bucket_size: 1024
nr_in_set: 1
nr_this_dev: 0
first_bucket: 1
UUID: 311421db-
Set UUID: b080425e-
version: 1
block_size: 1
data_offset: 16
Error: /dev/bcache0: unrecognised disk label
Error: /dev/bcache0: unrecognised disk label
Can't open dev /dev/sdd1: Device or resource busy
An error occured handling 'bcache1': ProcessExecutio
Command: ['make-bcache', '-B', '/dev/sda2', '-C', '/dev/sdd1']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
Unexpected error while running command.
Command: ['make-bcache', '-B', '/dev/sda2', '-C', '/dev/sdd1']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
Stderr: ''
I was trying to do a /boot partition as sda1 and then have / as a 1TB bcache0 made of sda2, with bcache1 made of 2TB sda3, bcache2 out of 3TB sdb, and bcache3 out of 3TB sdc.
Related branches
- Scott Moser: Pending requested
-
Diff: 266 lines (+134/-23)4 files modifiedcurtin/commands/block_meta.py (+73/-13)
curtin/commands/curthooks.py (+4/-0)
examples/tests/mdadm_bcache.yaml (+18/-0)
tests/vmtests/test_mdadm_bcache.py (+39/-10)
- Ryan Harper (community): Needs Fixing
-
Diff: 1440 lines (+840/-156)19 files modifiedbin/curtin (+16/-14)
curtin/commands/block_meta.py (+78/-33)
curtin/commands/curthooks.py (+19/-0)
curtin/commands/main.py (+78/-16)
curtin/deps/__init__.py (+162/-0)
curtin/deps/check.py (+52/-24)
curtin/deps/install.py (+23/-27)
curtin/pack.py (+26/-22)
curtin/util.py (+27/-0)
debian/control (+9/-1)
examples/tests/mdadm_bcache.yaml (+18/-0)
examples/tests/raid5bcache.yaml (+97/-0)
tests/unittests/test_util.py (+40/-0)
tests/vmtests/__init__.py (+9/-1)
tests/vmtests/test_basic.py (+18/-2)
tests/vmtests/test_mdadm_bcache.py (+39/-10)
tests/vmtests/test_raid5_bcache.py (+85/-0)
tools/launch (+43/-4)
tools/write-curtin (+1/-2)
Changed in maas: | |
importance: | Undecided → Critical |
milestone: | none → 1.9.0 |
Changed in maas: | |
status: | Triaged → Invalid |
summary: |
- bcache setup fails in gmaas + Fail to deploy with Bcache when using cache multiple times |
Changed in curtin: | |
status: | Fix Committed → New |
Changed in curtin: | |
status: | New → Fix Committed |
Changed in maas: | |
milestone: | 1.9.0 → none |
The issue here is that curtin is not handling the ability for bcache to use the same cache device multiple times.
The command "make-bcache -B /dev/sda2 -C /dev/sdd1" failed because "/dev/sdd1" was already made a cache device. Curtin should check to see if "/dev/sdd1" was already made a cache device in a previous call. If so then it should not add the "-C /dev/sdd1" to the command.
Then curtin needs to take the created bcache device and attach it to the already created bcache cache set for that device.