I have tested autoinstall alot lately with packer building vmware templates.
All the basic stuff getting a template installed and running went smooth.
However as soon as I try to partition differently it just does not do what asked. For instance single disk with a /boot partition as ext4 and a / partition as xfs is not possible at the moment.
I have tried with this config in autoinstall (extracted from curtin-install-cfg.yaml and modified to add xfs as fstype):
storage:
layout:
name: direct
config:
- grub_device: true
id: disk-sda
name: ''
path: /dev/sda
preserve: false
ptable: gpt
type: disk
wipe: superblock-recursive
- device: disk-sda
flag: bios_grub
id: partition-0
number: 1
preserve: false
size: 1048576
type: partition
- device: disk-sda
flag: ''
id: partition-1
number: 2
preserve: false
size: 34356592640
type: partition
wipe: superblock
- fstype: ext4
id: format-0
preserve: false
type: format
volume: partition-0
- device: format-0
id: mount-0
path: /boot
type: mount
- fstype: xfs
id: format-1
preserve: false
type: format
volume: partition-1
- device: format-1
id: mount-1
path: /
type: mount
This seems to work at first:
2020-11-05 21:41:31,210 DEBUG root:39 start: subiquity/Filesystem/load_autoinstall_data:
2020-11-05 21:41:31,210 DEBUG subiquitycore.controller.filesystem:93 load_autoinstall_data {'config': [{'grub_device': True, 'id': 'disk-sda', 'name': '', 'path': '/dev/sda', 'preserve': False, 'ptable': 'gpt', 'type': 'disk', 'wipe': 'superblock-recursive'}, {'device': 'disk-sda', 'flag': 'bios_grub', 'id': 'partition-0', 'number': 1, 'preserve': False, 'size': 1048576, 'type': 'partition'}, {'device': 'disk-sda', 'flag': '', 'id': 'partition-1', 'number': 2, 'preserve': False, 'size': 34356592640, 'type': 'partition', 'wipe': 'superblock'}, {'fstype': 'ext4', 'id': 'format-0', 'preserve': False, 'type': 'format', 'volume': 'partition-0'}, {'device': 'format-0', 'id': 'mount-0', 'path': '/boot', 'type': 'mount'}, {'fstype': 'xfs', 'id': 'format-1', 'preserve': False, 'type': 'format', 'volume': 'partition-1'}, {'device': 'format-1', 'id': 'mount-1', 'path': '/', 'type': 'mount'}], 'layout': {'name': 'direct'}}
2020-11-05 21:41:31,211 DEBUG subiquitycore.controller.filesystem:103 self.ai_data = {'config': [{'grub_device': True, 'id': 'disk-sda', 'name': '', 'path': '/dev/sda', 'preserve': False, 'ptable': 'gpt', 'type': 'disk', 'wipe': 'superblock-recursive'}, {'device': 'disk-sda', 'flag': 'bios_grub', 'id': 'partition-0', 'number': 1, 'preserve': False, 'size': 1048576, 'type': 'partition'}, {'device': 'disk-sda', 'flag': '', 'id': 'partition-1', 'number': 2, 'preserve': False, 'size': 34356592640, 'type': 'partition', 'wipe': 'superblock'}, {'fstype': 'ext4', 'id': 'format-0', 'preserve': False, 'type': 'format', 'volume': 'partition-0'}, {'device': 'format-0', 'id': 'mount-0', 'path': '/boot', 'type': 'mount'}, {'fstype': 'xfs', 'id': 'format-1', 'preserve': False, 'type': 'format', 'volume': 'partition-1'}, {'device': 'format-1', 'id': 'mount-1', 'path': '/', 'type': 'mount'}], 'layout': {'name': 'direct'}}
2020-11-05 21:41:31,211 DEBUG root:39 finish: subiquity/Filesystem/load_autoinstall_data: SUCCESS:
However a bit later in the log:
2020-11-05 21:41:33,563 DEBUG root:39 start: subiquity/Filesystem/apply_autoinstall_config:
2020-11-05 21:41:33,564 DEBUG root:39 start: subiquity/Filesystem/apply_autoinstall_config/convert_autoinstall_config:
2020-11-05 21:41:33,564 DEBUG subiquitycore.controller.filesystem:171 self.ai_data = {'config': [{'grub_device': True, 'id': 'disk-sda', 'name': '', 'path': '/dev/sda', 'preserve': False, 'ptable': 'gpt', 'type': 'disk', 'wipe': 'superblock-recursive'}, {'device': 'disk-sda', 'flag': 'bios_grub', 'id': 'partition-0', 'number': 1, 'preserve': False, 'size': 1048576, 'type': 'partition'}, {'device': 'disk-sda', 'flag': '', 'id': 'partition-1', 'number': 2, 'preserve': False, 'size': 34356592640, 'type': 'partition', 'wipe': 'superblock'}, {'fstype': 'ext4', 'id': 'format-0', 'preserve': False, 'type': 'format', 'volume': 'partition-0'}, {'device': 'format-0', 'id': 'mount-0', 'path': '/boot', 'type': 'mount'}, {'fstype': 'xfs', 'id': 'format-1', 'preserve': False, 'type': 'format', 'volume': 'partition-1'}, {'device': 'format-1', 'id': 'mount-1', 'path': '/', 'type': 'mount'}], 'layout': {'name': 'direct'}}
2020-11-05 21:41:33,564 DEBUG subiquitycore.controller.filesystem:549 partition_disk_handler: Disk(path='/dev/sda', wipe='superblock', type='disk', id='disk-sda') None {'size': 34357641216, 'fstype': 'ext4', 'mount': '/'}
2020-11-05 21:41:33,564 DEBUG subiquitycore.controller.filesystem:550 disk.freespace: 34357641216
2020-11-05 21:41:33,564 DEBUG subiquitycore.controller.filesystem:567 model needs a bootloader partition? True
2020-11-05 21:41:33,565 DEBUG subiquitycore.controller.filesystem:467 _create_boot_partition - adding bios_grub partition
2020-11-05 21:41:33,565 DEBUG subiquity.models.filesystem:1690 add_partition: rounded size from 1048576 to 1048576
2020-11-05 21:41:33,565 DEBUG subiquitycore.controller.filesystem:577 Adjusting request down: 34357641216 - 1048576 = 34356592640
2020-11-05 21:41:33,565 DEBUG subiquity.models.filesystem:1690 add_partition: rounded size from 34356592640 to 34356592640
2020-11-05 21:41:33,565 DEBUG subiquity.models.filesystem:1759 adding ext4 to Partition(device=disk-sda, size=34356592640, wipe='superblock', flag='', grub_device=None, id='partition-1')
2020-11-05 21:41:33,565 DEBUG subiquitycore.controller.filesystem:582 Successfully added partition
2020-11-05 21:41:33,565 DEBUG root:39 finish: subiquity/Filesystem/apply_autoinstall_config/convert_autoinstall_config: SUCCESS:
So I end up with 2 partitions on the disk, however it is only one partition that is formatted as ext4 and used as root-partition. It still creates 2 partitions and marks the first one as bios_grub, but no filesystem created on that.
I dont know if this is a bug and if so if it is in curtin or subiquity. Documentation is vague about this kind of config. Next lvl for us would be to split into separate disks and use full disks instead of partitions, but right now it looks impossible to get to that. (This is possible when done manually).