Skip to content

Error 500 on some machines: instance:get_bootorder() gets confused with network disks (ceph/rbd volumes) #663

Description

@fangebee

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions