maas overestimates size of raid device, can cause deployment failure

Bug #1779980 reported by Michael Hudson-Doyle
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Blake Rouse
2.3
Fix Committed
High
Blake Rouse
2.4
Fix Committed
High
Blake Rouse

Bug Description

If you configure a RAID array and add a partition that takes up the whole array, deployment fails with a message like:

        An error occured handling 'md0-part1': ProcessExecutionError - Unexpected error while running command.
        Command: ['sgdisk', '--new', '1:2048:2231420927', '--typecode=1:8300', '/dev/md0']
        Exit code: 4
        Reason: -
        Stdout: Creating new GPT entries.

        Stderr: Could not create partition 1 from 2048 to 2231420927
                Could not change partition 1's type code to 8300!
                Error encountered; not saving changes.

        finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: configuring partition: md0-part1

(full log at https://paste.ubuntu.com/p/qk8r3HRW8z/)

I think the problem is that the calculation of the RAID size that MAAS does does not allow for any overhead for the md metadata and alignment requirements. I've spent far too long trying to work out what the md metadata and alignments are in detail (for subiquity) and failed, but they're definitely not zero!

Related branches

Changed in maas:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.5.x
Changed in maas:
milestone: 2.5.x → 2.5.0alpha2
tags: added: track
Changed in maas:
status: Triaged → In Progress
status: In Progress → Triaged
Changed in maas:
status: Triaged → In Progress
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
status: Fix Released → Triaged
Changed in maas:
status: Triaged → Fix Released
status: Fix Released → Triaged
Changed in maas:
milestone: 2.5.0alpha2 → 2.5.0beta1
Changed in maas:
assignee: nobody → Blake Rouse (blake-rouse)
Changed in maas:
milestone: 2.5.0beta1 → 2.5.0beta2
Changed in maas:
status: Triaged → In Progress
tags: added: sprint
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
Xav Paice (xavpaice)
tags: added: canonical-bootstack
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

Remote bug watches

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