Error creating pool: local variable 'srcname' referenced before assignment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
virt-manager |
Won't Fix
|
Undecided
|
|||
virt-manager (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
I was trying to add an existing LVM volume group as a storage pool in virt-manager. I filled in the volume group name, then got to the dialog with source and target path entries, didn't know what to put there[*], so left them blank and hit Finish. I then got a popup with this Python traceback in it:
Traceback (most recent call last):
File "/usr/share/
File "/usr/share/
poolobj = self._pool.
File "/usr/share/
xml = self.get_
File "/usr/share/
return self._do_
File "/usr/share/
File "/usr/share/
return self._do_
File "/usr/share/
File "/usr/share/
candefault, val = self._default_
File "/usr/share/
return (True, self._default_
File "/usr/share/
return srcname
UnboundLoca
--
[*] eventually I figured out I was supposed to put /dev/vgname in the target path field, which worked fine.
ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: virt-manager 1:1.3.2-3ubuntu4
ProcVersionSign
Uname: Linux 4.10.0-28-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.4-0ubuntu4.5
Architecture: amd64
CurrentDesktop: GNOME
Date: Tue Jul 25 13:51:39 2017
InstallationDate: Installed on 2016-09-10 (318 days ago)
InstallationMedia: Ubuntu-GNOME 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160720)
PackageArchitec
SourcePackage: virt-manager
UpgradeStatus: Upgraded to zesty on 2017-04-14 (102 days ago)
Changed in virt-manager: | |
importance: | Unknown → Undecided |
status: | Unknown → Won't Fix |
Description of problem:
I was trying to add an existing LVM volume group as a storage pool in virt-manager. I filled in the volume group name, then got to the dialog with source and target path entries, didn't know what to put there (see bug 1316977), so left them blank and hit Finish. I then got a popup with this error.
Version-Release number of selected component (if applicable):
1.3.2
How reproducible:
Always
Steps to Reproduce:
1. Connect to KVM
2. Select Connection Details
3. Go to the Storage tab
4. Hit the + icon at the bottom left
5. Enter a name
6. Select Type: "logical: LVM Volume Group"
7. Hit Next
8. Leave Target Path and Source Path blank
9. Hit Finish
Actual results:
New popup shows up saying "Error creating pool: local variable 'srcname' referenced before assignment", with this traceback in the Details expander:
Traceback (most recent call last): virt-manager/ virtManager/ asyncjob. py", line 90, in cb_wrapper asyncjob, *args, **kwargs) virt-manager/ virtManager/ createpool. py", line 446, in _async_pool_create install( create= True, meter=meter, build=build) virt-manager/ virtinst/ storage. py", line 496, in install xml_config( ) virt-manager/ virtinst/ xmlbuilder. py", line 834, in get_xml_config get_xml_ config( ) virt-manager/ virtinst/ xmlbuilder. py", line 1043, in _do_get_xml_config _add_parse_ bits(node) virt-manager/ virtinst/ xmlbuilder. py", line 1066, in _add_parse_bits add_parse_ bits(node) virt-manager/ virtinst/ xmlbuilder. py", line 1077, in _do_add_parse_bits _set_default( self) virt-manager/ virtinst/ xmlbuilder. py", line 506, in _set_default get_value( xmlbuilder) virt-manager/ virtinst/ xmlbuilder. py", line 494, in _default_get_value cb(xmlbuilder) ) virt-manager/ virtinst/ storage. py", line 366, in _default_ source_ name
File "/usr/share/
callback(
File "/usr/share/
poolobj = self._pool.
File "/usr/share/
xml = self.get_
File "/usr/share/
return self._do_
File "/usr/share/
self.
File "/usr/share/
return self._do_
File "/usr/share/
prop.
File "/usr/share/
candefault, val = self._default_
File "/usr/share/
return (True, self._default_
File "/usr/share/
return srcname
UnboundLocalError: local variable 'srcname' referenced before assignment
Expected results:
The Finish button is disabled until I enter a target path. Ideally there's some placeholder text in the Target Path that mentions "/dev/vgname", assuming GTK+ supports placeholder text.
Additional info:
Originally filed at https:/ /bugs.launchpad .net/ubuntu/ +source/ virt-manager/ +bug/1706313