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

Dariusz Gadomski 1921658 at bugs.launchpad.net
Tue Aug 24 08:48:12 UTC 2021


@seyeongkim hi, I'm working on sponsoring your patch right now.
I had to do some minor fixes in it:
1. Since we're adding delta in relation to Debian we should change version number to reflect that (e.g. 7.0-4ubuntu1).
2. The launchpad bug number has to follow the convention for the automation to correctly pick it up and close the bug automatically afterwards (i.e. LP: #1921658 and not "Closes: #1921658).
3. The patch header did not need the "+" signs in the beginning of the line.
4. There was a descriptive commit for one of the lines you backported (static int *local_prompt_newlines;) which you skipped. I think it should also be part of the backport as it explains why the variable is there in the first place.

I'll update this bug if needed.

Thanks for the patch Seyeong!

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1921658

Title:
  Can't compose kvm host with lvm storage on maas 2.8.4

Status in MAAS:
  Triaged
Status in readline package in Ubuntu:
  Fix Released
Status in readline source package in Bionic:
  In Progress

Bug description:
  [Impact]

  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.

  [Test Plan]

  0) deploy Bionic and MAAS 2.8

  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)

  [Where problems could occer]

  This patch is small peice of huge commit.
  I tested by compiling test pkg with this patch. but actually it is kind of underlying library ( libreadline ), so It could affect to any application using libreadline.
  e.g running command inside application by code can be affected.

  
  [Other Info]

To manage notifications about this bug go to:
https://bugs.launchpad.net/maas/+bug/1921658/+subscriptions




More information about the Ubuntu-sponsors mailing list