Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 467228 - "UnboundLocalError: local variable 'verr' referenced before assign" when "--disk='path=/dev/VGMain/TestTmp'"
Summary: "UnboundLocalError: local variable 'verr' referenced before assign" when "--d...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-virtinst
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 467354 467491 467548 467896 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-16 14:17 UTC by Jan Hutař
Modified: 2008-10-21 21:48 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-20 14:20:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2008-10-16 14:17:14 UTC
Description of problem:
Traceback when installing on "--disk='path=/dev/VGMain/TestTmp'"


Version-Release number of selected component (if applicable):
python-virtinst-0.400.0-2.fc10.noarch


How reproducible:
always


Steps to Reproduce:
1. # virt-install --name test --ram=300 --os-type=linux --os-variant=rhel5 --accelerate --hvm --cdrom=some-image.iso --disk='path=/dev/VGMain/TestTmp' --vnc --extra-args='ks=http://mysystem.example.com/ks.cfg'


Actual results:
# virt-install --name test --ram=300 --os-type=linux --os-variant=rhel5 --accelerate --hvm --cdrom=some-image.iso --disk='path=/dev/VGMain/TestTmp' --vnc --extra-args='ks=http://mysystem.example.com/ks.cfg'
ERROR    local variable 'verr' referenced before assignment
Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 693, in <module>
    main()
  File "/usr/sbin/virt-install", line 571, in main
    options.sparse, options.nodisks, guest, hvm, conn)
  File "/usr/sbin/virt-install", line 240, in get_disks
    is_file_path), disk, size)
  File "/usr/sbin/virt-install", line 240, in <lambda>
    is_file_path), disk, size)
  File "/usr/sbin/virt-install", line 192, in get_disk
    conn=guest.conn)
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 135, in __init__
    self.__validate_params()
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 369, in __validate_params
    self.__check_if_path_managed()
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 348, in __check_if_path_managed
    "connection: %s" % (self.path, verr))
UnboundLocalError: local variable 'verr' referenced before assign


Expected results:
Installation starts


Additional info:
This "helped" me to workaround the issue:
--- /usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py.orig	2008-10-16 16:15:35.000000000 +0200
+++ /usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py	2008-10-16 16:15:38.000000000 +0200
@@ -344,8 +344,9 @@
                 raise ValueError(_("'%s' is not managed on remote "
                                    "host: %s" % (self.path, verr)))
             else:
-                logging.debug("Didn't find path '%s' managed on "
-                              "connection: %s" % (self.path, verr))
+                #logging.debug("Didn't find path '%s' managed on "
+                #              "connection: %s" % (self.path, verr))
+                pass
         else:
             self._set_vol_object(vol, validate=False)

Comment 1 Cole Robinson 2008-10-17 19:10:02 UTC
*** Bug 467491 has been marked as a duplicate of this bug. ***

Comment 2 Cole Robinson 2008-10-17 19:10:54 UTC
Fix is already upstream:

http://hg.et.redhat.com/virt/applications/virtinst--devel?cs=d920fb2662c1

I'll pull this in for rawhide.

Comment 3 Cole Robinson 2008-10-17 19:11:51 UTC
FYI, in Comment #1, that isn't the correct syntax for --disk. You want:

--disk path=/foo/bar

Doesn't make the bug any less valid though.

Comment 4 James Laska 2008-10-17 19:27:58 UTC
crobinso: I was just using the virt-manager gui ... should it be using a different format behind the scenes?

Comment 5 Cole Robinson 2008-10-17 20:31:47 UTC
jlaska: we are using the virtinst API directly in virt-manager, so comment #1 doesn't apply in that case. bug is still the same though.

Comment 6 Jens Petersen 2008-10-20 07:00:45 UTC
*** Bug 467354 has been marked as a duplicate of this bug. ***

Comment 7 Cole Robinson 2008-10-20 14:02:37 UTC
*** Bug 467548 has been marked as a duplicate of this bug. ***

Comment 8 Cole Robinson 2008-10-20 14:20:00 UTC
Sorry about this, this was a stupid bug. Built in latest package:

$ koji latest-pkg dist-f10 python-virtinst
Build                                     Tag                   Built by
----------------------------------------  --------------------  ----------------
python-virtinst-0.400.0-3.fc10            dist-f10              crobinso

Closing as RAWHIDE, please reopen if anyone still sees this issue after updating.

Comment 9 Cole Robinson 2008-10-21 19:17:20 UTC
*** Bug 467896 has been marked as a duplicate of this bug. ***

Comment 10 David Bensimon 2008-10-21 20:33:40 UTC
Running Fedora release 9.92 (Rawhide) it seems that python-virtinst-0.400.0-2.fc10 is the latest version. Even if I try to update I cannot get 
python-virtinst-0.400.0-3.fc10. Instructions to do this world be helpful.

Comment 11 Sven Lankes 2008-10-21 21:18:25 UTC
The latest rawhide compose failed so you can either wait longer or get the rpm from koji: http://koji.fedoraproject.org/koji/buildinfo?buildID=66849

Comment 12 David Bensimon 2008-10-21 21:48:52 UTC
Thanks for your help, I actually got it working. I tried the following command which confirmed the newest version but did not download/install.

$ koji latest-pkg dist-f10 python-virtinst

So, I added the software sources:
Fedora - Rawhide - Debug
Fedora - Rawhide - Source

As well as what I had active:
Fedora - Rawhide - Development packages for the next Fedora release

Then I ran:
$ yum install python-virtinst

This updated to python-virtinst-0.400.0-3.fc10
--

Now to crush Bug # 464829 which is still an issue.


Note You need to log in before you can comment on or make changes to this bug.