[PR #288] [MERGED] rbd: ensure dev_file and dev_bus are never referenced before they are se... #605

Closed
opened 2026-02-27 16:39:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/retspen/webvirtmgr/pull/288
Author: @EmbeddedAndroid
Created: 4/22/2014
Status: Merged
Merged: 4/23/2014
Merged by: @retspen

Base: masterHead: master


📝 Commits (1)

  • 66e3c07 rbd: ensure dev_file and dev_bus are never referenced before they are set

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 vrtManager/instance.py (+4 -1)

📄 Description

When using rbd with qemu: elm.tag('file') and elm('dev') will not return true. So the variables dev_file and dev_bus will be referenced before they are assigned. This results is the instance graphing view stops functioning.

<disk type='network' device='disk'>
  <driver name='qemu' type='raw'/>
  <auth username='libvirt'>
    <secret type='ceph' usage='client.libvirt secret'/>
  </auth>
  <source protocol='rbd' name='data/storage'>
    <host name='compute01' port='6789'/>
    <host name='192.168.1.2' port='6789'/>
  </source>
  <target dev='vdz' bus='virtio'/>
  <alias name='virtio-disk25'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>

This patch will initialize the variables and check that dev_file and dev_bus are set to a value other than None before they are used.

This fixes this issue:

https://github.com/retspen/webvirtmgr/issues/281


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/retspen/webvirtmgr/pull/288 **Author:** [@EmbeddedAndroid](https://github.com/EmbeddedAndroid) **Created:** 4/22/2014 **Status:** ✅ Merged **Merged:** 4/23/2014 **Merged by:** [@retspen](https://github.com/retspen) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`66e3c07`](https://github.com/retspen/webvirtmgr/commit/66e3c07e96ca71df3b1c52c12a74779d437da564) rbd: ensure dev_file and dev_bus are never referenced before they are set ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `vrtManager/instance.py` (+4 -1) </details> ### 📄 Description When using rbd with qemu: elm.tag('file') and elm('dev') will not return true. So the variables dev_file and dev_bus will be referenced before they are assigned. This results is the instance graphing view stops functioning. ``` <disk type='network' device='disk'> <driver name='qemu' type='raw'/> <auth username='libvirt'> <secret type='ceph' usage='client.libvirt secret'/> </auth> <source protocol='rbd' name='data/storage'> <host name='compute01' port='6789'/> <host name='192.168.1.2' port='6789'/> </source> <target dev='vdz' bus='virtio'/> <alias name='virtio-disk25'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> ``` This patch will initialize the variables and check that dev_file and dev_bus are set to a value other than None before they are used. This fixes this issue: https://github.com/retspen/webvirtmgr/issues/281 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 16:39:52 +03:00
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/webvirtmgr#605
No description provided.