Failed talking to pod: 'NoneType' object has no attribute 'id' error

Bug #1819018 reported by Teluka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Newell Jensen
2.5
Fix Released
Medium
Newell Jensen

Bug Description

I am seeing this error when trying to add new POD (virsh type) to MAAS 2.5.1

POD is running Xenial and following libvirt version.

root@maas-pods:~# dpkg -l | grep libvirt
ii libvirt-bin 1.3.1-1ubuntu10.24 amd64 programs for the libvirt library
ii libvirt0:amd64 1.3.1-1ubuntu10.24 amd64 library for interfacing with different virtualization systems
ii python-libvirt 1.3.1-1ubuntu1.1 amd64 libvirt Python bindings

I found that culprit here is one of the VM that has connected block storage that is not a part of libvirt pool.

root@maas-pods:~# virsh domblklist ubuntu18.04
Target Source
------------------------------------------------
vda /dev/libvirt/lvol0

Because /dev/libvirt/lvol0 was not a part of any defined libvirt pools MAAS is unable to add POD.

To solve this issue I have created (defined) libvirt pool that pointed to LVM volume group that held block device of running VM.

cat > /tmp/libvirt.xml <<EOL
<pool type='logical'>
  <name>libvirt</name>
  <uuid>d82c0b30-c0bf-45e6-9d0f-b1504f753ebc</uuid>
  <source>
    <device path='/dev/vdd'/>
    <name>libvirt</name>
    <format type='lvm2'/>
  </source>
  <target>
    <path>/dev/libvirt</path>
  </target>
</pool>
EOL

virsh pool-define /tmp/libvirt.xml
virsh pool-start libvirt

Once libvirt has been aware of existing LVM volume group I re-tried to add POD in MAAS UI and this time it was successful.

Related branches

Revision history for this message
Teluka (mateusz-p) wrote :
Changed in maas:
milestone: none → 2.5.3
no longer affects: maas/2.4
Changed in maas:
milestone: 2.5.3 → 2.6.0
importance: Undecided → High
importance: High → Medium
status: New → Triaged
assignee: nobody → Newell Jensen (newell-jensen)
Revision history for this message
Newell Jensen (newell-jensen) wrote :

Mateusz,

Can you provide a stacktrace from the maas logs for me?

The logs are kept in /var/log/maas/*.log

Thanks

Changed in maas:
status: Triaged → In Progress
Revision history for this message
Teluka (mateusz-p) wrote :

Newell,

Here is a copy of stack trace.

https://pastebin.ubuntu.com/p/tgPWNBMf7c/

Cheers.

Revision history for this message
Newell Jensen (newell-jensen) wrote :

Mateuz,

Can you test out the patch for the linked branch and let me know if that clears up the issue from you?

Cheers.

Revision history for this message
Teluka (mateusz-p) wrote :

Newell,

Yep, it works.

'else None' did the trick :)

Cheers.

Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 2.6.0 → 2.6.0alpha2
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.