MAAS attempts creation of ZFS partition without sanity checking the partition table

Bug #1865866 reported by Jeff Lane 
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Alberto Donato

Bug Description

On a server I have a single block device. I opted to format that as a ZFS partition but forgot to
set the partition table. Because of this, deployment failed:
Traceback (most recent call last):
          File "/curtin/curtin/commands/main.py", line 202, in main
            ret = args.func(args)
          File "/curtin/curtin/log.py", line 97, in wrapper
            return log_time("TIMED %s: " % msg, func, *args, **kwargs)
          File "/curtin/curtin/log.py", line 79, in log_time
            return func(*args, **kwargs)
          File "/curtin/curtin/commands/block_meta.py", line 86, in block_meta
            return meta_custom(args)
          File "/curtin/curtin/commands/block_meta.py", line 1663, in meta_custom
            storage_config_dict = zfsroot_update_storage_config(storage_config_dict)
          File "/curtin/curtin/commands/block_meta.py", line 1566, in zfsroot_update_storage_config (bootdev.get('ptable'), bootdev.get('id')))
        ValueError: zfsroot requires bootdisk with GPT partition table found "msdos" on disk id="sda"
        zfsroot requires bootdisk with GPT partition table found "msdos" on disk id="sda"

Going back into the storage layout, MAAS allows me to create a partition, and set the format to zfs, but then forces the disk to use a MSDOS partition table and does not provide any way to change this to GPT.

Since this machine is not booting/commissioned in EFI mode, MAAS will not allow me to specify GPT parttion table for the disk, thus every time I attempt to configure the partition, MAAS sets the partition table type to MBR as the screen shot indicates.

Expected outcome:
MAAS should be automatically setting the partition table to GPT when ZFS is selected (or should, at this point, allow a default of GPT over MBR for all deployments)

Observed outcome:
Deployment failure because MAAS is creating an impossible scenario.

Related branches

Revision history for this message
Jeff Lane  (bladernr) wrote :
Alberto Donato (ack)
Changed in maas:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Alberto Donato (ack) wrote :

Hi, can you please confirm which MAAS version are you seeing this bug in?

Changed in maas:
milestone: none → 2.8.0b1
Alberto Donato (ack)
Changed in maas:
milestone: 2.8.0b1 → 2.8.0b2
Revision history for this message
Jeff Lane  (bladernr) wrote :

Hi, sorry ack, I didn't see the update until just now. I saw this originally on 2.6 from the maas/stable

Alberto Donato (ack)
Changed in maas:
milestone: 2.8.0b2 → 2.8.0rc1
Alberto Donato (ack)
Changed in maas:
milestone: 2.8.0b3 → 2.8.0rc1
Changed in maas:
assignee: nobody → Alberto Donato (ack)
Alberto Donato (ack)
Changed in maas:
status: Triaged → In Progress
Alberto Donato (ack)
Changed in maas:
milestone: 2.8.0b4 → 2.8.0rc1
Changed in maas:
status: In Progress → Fix Committed
Alberto Donato (ack)
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.