[GH-ISSUE #663] Error 500 on some machines: instance:get_bootorder() gets confused with network disks (ceph/rbd volumes) #383

Open
opened 2026-02-27 15:58:28 +03:00 by kerem · 0 comments
Owner

Originally created by @fangebee on GitHub (Mar 13, 2025).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/663

Hi there,

some pages return Error 500 with the following trace in webvirtcloud.log:

    value = self._resolve_lookup(context)
  File "/srv/webvirtcloud/venv/lib/python3.9/site-packages/django/template/base.py", line 890, in _resolve_lookup
    current = getattr(current, bit)
  File "/srv/webvirtcloud/venv/lib/python3.9/site-packages/django/utils/functional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/srv/webvirtcloud/instances/models.py", line 74, in boot_order
    return self.proxy.get_bootorder()
  File "/srv/webvirtcloud/vrtManager/instance.py", line 638, in get_bootorder
    dev_mac = dev.find("mac").get("address")
AttributeError: 'NoneType' object has no attribute 'get'

Here is an excerpt of the XML definition of the machine:

 <devices>
    ...
    <disk type='network' device='disk'>
      ...
      <source protocol='rbd' name='libvirt-pool/xxxxx'>
        <host name='1.2.3.4' port='6789'/>
        <host name='1.2.3.5' port='6789'/>
        <host name='1.2.3.6' port='6789'/>
      </source>
      <target dev='vda' bus='virtio'/>
      <boot order='1'/>
      ...
    </disk>
    ...
  </devices>

The problem comes from the type='network' attribute.

Originally created by @fangebee on GitHub (Mar 13, 2025). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/663 Hi there, some pages return Error 500 with the following trace in webvirtcloud.log: ``` value = self._resolve_lookup(context) File "/srv/webvirtcloud/venv/lib/python3.9/site-packages/django/template/base.py", line 890, in _resolve_lookup current = getattr(current, bit) File "/srv/webvirtcloud/venv/lib/python3.9/site-packages/django/utils/functional.py", line 57, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "/srv/webvirtcloud/instances/models.py", line 74, in boot_order return self.proxy.get_bootorder() File "/srv/webvirtcloud/vrtManager/instance.py", line 638, in get_bootorder dev_mac = dev.find("mac").get("address") AttributeError: 'NoneType' object has no attribute 'get' ``` Here is an excerpt of the XML definition of the machine: ``` <devices> ... <disk type='network' device='disk'> ... <source protocol='rbd' name='libvirt-pool/xxxxx'> <host name='1.2.3.4' port='6789'/> <host name='1.2.3.5' port='6789'/> <host name='1.2.3.6' port='6789'/> </source> <target dev='vda' bus='virtio'/> <boot order='1'/> ... </disk> ... </devices> ``` The problem comes from the `type='network'` attribute.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#383
No description provided.