Logical volume size is required

Bug #1882633 reported by José Pekkarinen
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Low
Jack Lloyd-Walters

Bug Description

Hi,

I'm defining the config of a machine through fce using the following
bucketsconfig.yaml for disks section:

            - id: vda
              disk: 0
              type: disk
              ptable: gpt
            - id: vda-vg
              name: vgroot
              type: lvm_volgroup
              devices:
              - vda-part2

            - id: vda-part1
              name: efi
              device: vda
              size: 100M
              type: partition
              number: 2
            - id: vda-part1-format
              volume: vda-part1
              label: boot
              type: format
              fstype: vfat
            - id: vda-part1-mount
              device: vda-part1-format
              path: /boot/efi
              type: mount

            - id: vda-part2
              name: lvm
              device: vda
              type: partition
              number: 3
            - id: vda-part2-lvm1
              name: lvroot
              type: lvm_partition
              volgroup: vgroot
            - id: vda-part2-lvm1-format
              volume: vda-part2-lvm1
              label: root
              type: format
              fstype: ext4
            - id: vda-part2-lvm1-mount
              device: vda-part2-lvm1-format
              path: /
              type: mount

So in summary I just create an efi partition, a vg, and I want only
a root lv of the size I can afford. Generating the partition would
work, generating the lv will output the following:

2020-06-09-04:54:32 root ERROR [localhost] Command failed: maas admin volume-group create-logical-volume pkwcmn 15 name=lvroot
2020-06-09-04:54:32 root ERROR [localhost] STDOUT follows:
{"size": ["This field is required."]}

This is based in maas 2.7.1 (8262-g.9a49af7df-0ubuntu1~18.04.1)

Thanks!

Jose.

Related branches

Revision history for this message
Alberto Donato (ack) wrote :

Confirmed that the size is currently required in the form.
We could make it optional and just use self.volume_group.get_lvm_free_space() if not provided

Changed in maas:
status: New → Triaged
importance: Undecided → Medium
milestone: none → next
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

MAAS currently requires explicitly setting the size for LVM volumes, and this behavior could be changed by adding a small feature to MAAS.

Changed in maas:
importance: Medium → Low
milestone: next → none
tags: added: papercut trivial
Changed in maas:
assignee: nobody → Jack Lloyd-Walters (lloydwaltersj)
status: Triaged → In Progress
Changed in maas:
milestone: none → 3.3.0
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 3.3.0 → 3.3.0-beta1
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.

Other bug subscribers

Remote bug watches

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