block-meta custom failed on kvm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I used MAAS 2.4 and maas server is Ubuntu 18.04. I'm deploying ubuntu 16.04 on vm created on kvm. There are 4 disks on vm, vda (boot disk)...vdd. At some time the disk partition fix messed up by application deployer, the vm failed to deploy.
Curtin debug log sections:
```
Running command ['lsblk', '--noheadings', '--bytes', '--pairs', '--output=
Checking if /dev/vdc2 is a swap device
finish: cmd-install/
finish: cmd-install/
Traceback (most recent call last):
File "/curtin/
ret = args.func(args)
File "/curtin/
File "/curtin/
File "/curtin/
File "/curtin/
if is_swap_
File "/curtin/
File "/curtin/
OSError: [Errno 22] Invalid argument
[Errno 22] Invalid argument
Stderr: ''
```
I got partition informations after using rescuing mode in MAAS:
```
$ sudo fdisk -l
Disk /dev/loop0: 158 MiB, 165711872 bytes, 323656 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/vda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4c8357c6
Device Boot Start End Sectors Size Id Type
/dev/vda1 2048 41943006 41940959 20G 83 Linux
Disk /dev/vdb: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8F0B48D2-
Device Start End Sectors Size Type
/dev/vdb1 2048 206847 204800 100M Ceph OSD
/dev/vdb2 206848 209715166 209508319 99.9G unknown
Disk /dev/vdc: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: BE4B2B10-
Device Start End Sectors Size Type
/dev/vdc1 2048 20973567 20971520 10G unknown
/dev/vdc2 20973568 20973568 1 512B unknown
/dev/vdc3 20975616 41947135 20971520 10G unknown
/dev/vdc4 41947136 44044287 2097152 1G unknown
/dev/vdc5 44044288 44249087 204800 100M Ceph OSD
/dev/vdc6 44249088 209715166 165466079 78.9G unknown
Disk /dev/vdd: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: AFEA47AA-
Device Start End Sectors Size Type
/dev/vdd1 2048 20973567 20971520 10G unknown
```
After I manually deleted 6 partions on /dev/vdc, redeploy will success.
Related branches
- Server Team CI bot: Approve (continuous-integration)
- curtin developers: Pending requested
-
Diff: 3184 lines (+1417/-240)59 files modifiedcurtin/__init__.py (+1/-1)
curtin/commands/apt_config.py (+22/-6)
curtin/commands/block_meta.py (+157/-49)
curtin/swap.py (+9/-3)
curtin/udev.py (+37/-0)
debian/changelog (+27/-0)
doc/topics/apt_source.rst (+57/-0)
doc/topics/storage.rst (+45/-2)
examples/tests/basic.yaml (+9/-0)
examples/tests/basic_scsi.yaml (+27/-0)
examples/tests/multipath.yaml (+1/-0)
examples/tests/nvme.yaml (+2/-2)
examples/tests/nvme_bcache.yaml (+1/-1)
examples/tests/simple-storage.yaml (+48/-0)
helpers/common (+50/-5)
tests/unittests/helpers.py (+7/-0)
tests/unittests/test_apt_custom_sources_list.py (+61/-29)
tests/unittests/test_commands_block_meta.py (+4/-3)
tests/unittests/test_commands_extract.py (+2/-1)
tests/unittests/test_make_dname.py (+172/-30)
tests/unittests/test_swap.py (+42/-28)
tests/unittests/test_udev.py (+68/-0)
tests/vmtests/__init__.py (+124/-20)
tests/vmtests/releases.py (+6/-0)
tests/vmtests/test_apt_config_cmd.py (+11/-2)
tests/vmtests/test_apt_source.py (+7/-2)
tests/vmtests/test_basic.py (+61/-8)
tests/vmtests/test_bcache_basic.py (+6/-0)
tests/vmtests/test_bcache_bug1718699.py (+4/-0)
tests/vmtests/test_fs_battery.py (+5/-0)
tests/vmtests/test_iscsi.py (+6/-0)
tests/vmtests/test_journald_reporter.py (+4/-0)
tests/vmtests/test_lvm.py (+5/-0)
tests/vmtests/test_lvm_iscsi.py (+13/-7)
tests/vmtests/test_lvm_raid.py (+16/-8)
tests/vmtests/test_lvm_root.py (+2/-0)
tests/vmtests/test_mdadm_bcache.py (+42/-0)
tests/vmtests/test_mdadm_iscsi.py (+13/-6)
tests/vmtests/test_multipath.py (+31/-0)
tests/vmtests/test_network.py (+6/-0)
tests/vmtests/test_network_alias.py (+6/-0)
tests/vmtests/test_network_bonding.py (+6/-0)
tests/vmtests/test_network_bridging.py (+7/-0)
tests/vmtests/test_network_ipv6.py (+8/-0)
tests/vmtests/test_network_ipv6_static.py (+4/-0)
tests/vmtests/test_network_ipv6_vlan.py (+4/-0)
tests/vmtests/test_network_mtu.py (+9/-0)
tests/vmtests/test_network_static.py (+4/-0)
tests/vmtests/test_network_static_routes.py (+5/-0)
tests/vmtests/test_network_vlan.py (+6/-0)
tests/vmtests/test_nvme.py (+17/-4)
tests/vmtests/test_old_apt_features.py (+7/-2)
tests/vmtests/test_pollinate_useragent.py (+6/-0)
tests/vmtests/test_raid5_bcache.py (+15/-7)
tests/vmtests/test_simple.py (+67/-1)
tests/vmtests/test_ubuntu_core.py (+2/-0)
tests/vmtests/test_uefi_basic.py (+17/-7)
tests/vmtests/test_zfsroot.py (+10/-0)
tools/jenkins-runner (+6/-6)
- Ryan Harper (community): Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 109 lines (+51/-31)2 files modifiedcurtin/swap.py (+9/-3)
tests/unittests/test_swap.py (+42/-28)
There is a fix in the linked branch.
The bug was exposed because you had a partition of length 512.
Which is valid, just odd.
/dev/vdc2 20973568 20973568 1 512B unknown