Error 500 on some machines: instance:get_bootorder() gets confused with network disks (ceph/rbd volumes)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 50/100
Research direction
Start in vrtManager/instance.py at get_bootorder(), where the traceback shows dev.find("mac").get("address") failing for a network disk in the machine XML. Review how the disk devices are handled, then verify that pages no longer return Error 500 when the XML contains type='network' RBD volumes.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- JavaScript
- Stars
- 1.9k
- Forks
- 398
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from retspen/webvirtcloud
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
retspen/webvirtcloud#393 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
retspen/webvirtcloud#683 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
retspen/webvirtcloud#682 ·
-
安装完成后打开控制头灰屏 Open
Difficulty 4/5 3-5 days Newbie friendliness 15/100
retspen/webvirtcloud#678 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
retspen/webvirtcloud#674 · 1 reaction ·
All issues in retspen/webvirtcloud
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·