Growpart fails on FreeBSD with MBR/Slices
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Undecided
|
Mina Galić |
Bug Description
A VM with slices and/or MBR will have a slice named /dev/da0s1a and makes growpart fail on its partition detection;
Traceback (most recent call last):
File "/usr/local/
ran, _r = cc.run(
File "/usr/local/
return self._runners.
File "/usr/local/
results = functor(*args)
File "/usr/local/
resized = util.log_time(
File "/usr/local/
ret = func(*args, **kwargs)
File "/usr/local/
(disk, ptnum) = device_
File "/usr/local/
return (m.group(1), m.group(2))
AttributeError: 'NoneType' object has no attribute 'group'
It seems the regex needs to be modified to support MBR disks, if we want to support them.
summary: |
- Growpart fails on FreeBSD with virtio-SCSI + Growpart fails on FreeBSD with MBR/Slices |
description: | updated |
description: | updated |
Changed in cloud-init: | |
status: | New → Incomplete |
Changed in cloud-init: | |
assignee: | nobody → Mina Galić (minagalic) |
Changed in cloud-init: | |
status: | Incomplete → Fix Committed |
Thanks, Tyler, for filing this bug.
It looks like fixing this issue involves figuring out what the resize invocation should look like.
On FreeBSD, if I understand correctly, gpart is used to resize the disk. I'm curious what that invocation should look like.
Maybe something like this?
gpart resize -i a /dev/da0s1
Could you please confirm that the above works, or provide an example command that works with MBR+slices?