Fails to compose KVM machine with storage from disk pool

Bug #1869300 reported by Brett Milford
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Alberto Donato
3.0
Fix Released
Medium
Alberto Donato

Bug Description

When composing a VM which contains storage from a virsh 'disk' pool Maas fails with the following:

(/var/snap/maas/common/log/regiond.log
2020-03-27 04:29:43 maasserver.websockets.protocol: [critical] Error on request (40) pod.compose: Pod unable to compose machine: Unable to compose machine because: Failed talking to pod: Start t
ag expected, '<' not found, line 1, column 1 (<string>, line 1)
        Traceback (most recent call last):
          File "/snap/maas/5177/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1442, in gotResult
            _inlineCallbacks(r, g, deferred)
          File "/snap/maas/5177/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1432, in _inlineCallbacks
            deferred.errback()
          File "/snap/maas/5177/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 500, in errback
            self._startRunCallbacks(fail)
          File "/snap/maas/5177/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
            self._runCallbacks()
        --- <exception caught here> ---
          File "/snap/maas/5177/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 653, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/snap/maas/5177/lib/python3.6/site-packages/maasserver/websockets/handlers/pod.py", line 384, in wrap_errors
            "Pod unable to compose machine: %s" % str(failure.value)
        maasserver.exceptions.PodProblem: Pod unable to compose machine: Unable to compose machine because: Failed talking to pod: Start tag expected, '<' not found, line 1, column 1 (<string>,
line 1)

Happens with Maas version 2.7 snap and ppa packaged versions.

Steps to recreate:
1) setup Maas with a kvm pod.
2) define a diskpool on the hypervisor
cat <<EOF> sdb-pool.xml
<pool type="disk">
  <name>sdb</name>
  <source>
    <device path='/dev/sdb'/>
    <format type='gpt' />
  </source>
  <target>
    <path>/dev</path>
  </target>
</pool>
EOF
virsh pool-define sdb-pool.xml
virsh pool-start sdb

3) Compose a VM with storage from the sdb pool.

Tags: seg

Related branches

Revision history for this message
Brett Milford (brettmilford) wrote :

Same error occurs when using a zfs pool.

tags: added: seg
Changed in maas:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Alberto Donato (ack) wrote :

With a similar configuration, this is the error I get from virsh when composing the VM from MAAS:

        provisioningserver.drivers.pod.virsh.VirshError: Virsh command ['vol-create-as', 'loop29', '15f71b1f-76b3-47f7-adbb-d87852d22f77', '1000000000', '--allocation', '0', '--format', 'raw'] failed: Failed to create vol 15f71b1f-76b3-47f7-adbb-d87852d22f77
        error: unsupported configuration: unknown volume format type raw

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

note that currently "disk"-backed pools are not supported in MAAS.

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

@Brett the zfs issue is likely different, if you can reproduce it consistently could you please open a separate bug with details on how to do it?

Alberto Donato (ack)
Changed in maas:
milestone: none → 3.0.1
milestone: 3.0.1 → none
assignee: nobody → Alberto Donato (ack)
status: Triaged → In Progress
Alberto Donato (ack)
Changed in maas:
milestone: none → 3.0.1
Changed in maas:
status: In Progress → Fix Committed
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

Please refer to https://bugs.launchpad.net/maas/+bug/1921658 as well

pexpect cmd and result.. for FYI

May 31 07:53:14 xtrusia sh[27020]: 2021-05-31 07:53:14 stdout: [info] Seyeong pexpect.send() : b'vol-path 9d2217b0-4433-48a7-9be9-32dc8552c498 --pool maas_guest_lvm_vg
' 41
May 31 07:53:14 xtrusia maas.drivers.pod.virsh: [info] Seyeong run : [' ', '<433-48a7-9be9-32dc8552c498 --pool maas_guest_lvm_vg', '/dev/maas_data_vg/9d2217b0-4433-48a7-9be9-32dc8552c498', '']

pexpect should return only /dev/maas_data_vg/9d2217b0-4433-48a7-9be9-32dc8552c498 but it includes part of command as well

I built python 3.6.12 3.7.10 3.8.10 as well and run maas, but there are the same issue.

Revision history for this message
Seyeong Kim (seyeongkim) wrote :

I tested later version of python (below) with maas 2.8.4

1. Python 3.6.12
2. Python 3.7.10
3. Python 3.8.10

but the symptom is the same

Alberto Donato (ack)
Changed in maas:
milestone: 3.0.1 → next
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

I tested anther thing.

I changed libreadline from 7 to 8 ( in addition to this, I needed to add libtinfo.so.6 as well, as a dependent lib )

I'm able to compose kvm host.

I'll confirm this again

Bill Wear (billwear)
Changed in maas:
milestone: next → 3.1.0-beta1
Bill Wear (billwear)
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.