[Bug 1921658] [NEW] Can't compose kvm host with lvm storage on maas 2.8.4

Launchpad Bug Tracker 1921658 at bugs.launchpad.net
Fri Aug 13 06:15:35 UTC 2021


You have been subscribed to a public bug by Seyeong Kim (seyeongkim):

I can't compose kvm host on maas 2.8.4 ( bionic)

I upgraded twisted and related component with pip but the symptom is the
same.

MaaS 2.9.x in Focal works fine.

in 2.8.x, pexpect virsh vol-path should return [2] but returns [3]

[2]
/dev/maas_data_vg/8d4e8b04-4031-4a1b-b5f2-a8306192db11
[3]
2021-03-17 20:43:34 stderr: [error] Message: 'this is the result...\n'
2021-03-17 20:43:34 stderr: [error] Arguments: ([' ', '<3ef-46ca-87c8-19171950592f --pool maas_guest_lvm_vg', "error: command 'attach-disk' doesn't support option --pool"],)

sometimes it fails in

    def get_volume_path(self, pool, volume):
        """Return the path to the file from `pool` and `volume`."""
        output = self.run(["vol-path", volume, "--pool", pool])
        return output.strip()

sometimes failes in

    def get_machine_xml(self, machine):
        # Check if we have a cached version of the XML.
        # This is a short-lived object, so we don't need to worry about
        # expiring objects in the cache.
        if machine in self.xml:
            return self.xml[machine]

        # Grab the XML from virsh if we don't have it already.
        output = self.run(["dumpxml", machine]).strip()
        if output.startswith("error:"):
            maaslog.error("%s: Failed to get XML for machine", machine)
            return None

        # Cache the XML, since we'll need it later to reconfigure the VM.
        self.xml[machine] = output
        return output

I assume that run function has issue.

Command line virsh vol-path and simple pepect python code works fine.


Any advice for this issue?

Thanks.

Reproducer is below.[1]

[1]

1) Create file to be used as loopback device

sudo dd if=/dev/zero of=lvm bs=16000 count=1M

2) sudo losetup /dev/loop39 lvm

3) sudo pvcreate /dev/loop39

4) sudo vgcreate maas_data_vg /dev/loop39

5) Save below xml:
<pool type='logical'>
<name>maas_guest_lvm_vg</name>
<source>
<name>maas_data_vg</name>
<format type='lvm2'/>
</source>
<target>
<path>/dev/maas_data_vg</path>
</target>
</pool>

6) virsh pool-create maas_guest_lvm_vg.xml

7) Add KVM host in MaaS

8) Attempt to compose a POD using storage pool maas_guest_lvm_vg

9) GUI will fail with:

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)

** Affects: maas
     Importance: Medium
         Status: Triaged

** Affects: readline (Ubuntu)
     Importance: Undecided
         Status: Fix Released

** Affects: readline (Ubuntu Bionic)
     Importance: Undecided
     Assignee: Seyeong Kim (seyeongkim)
         Status: In Progress


** Tags: sts
-- 
Can't compose kvm host with lvm storage on maas 2.8.4 
https://bugs.launchpad.net/bugs/1921658
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list