Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1183095

Summary: Uploading to nfs domain fails with UnboundLocalError
Product: Red Hat Enterprise Virtualization Manager Reporter: wdaniel
Component: ovirt-iso-uploaderAssignee: Yedidyah Bar David <didi>
Status: CLOSED ERRATA QA Contact: Jiri Belka <jbelka>
Severity: medium Docs Contact:
Priority: high    
Version: 3.4.4CC: amureini, benglish, didi, iheim, lsurette, pbrilla, rbalakri, Rhev-m-bugs, sbonazzo, yeylon, ykaul, ylavi
Target Milestone: ovirt-3.6.0-rcKeywords: ZStream
Target Release: 3.6.0Flags: ylavi: Triaged+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1184123 (view as bug list) Environment:
Last Closed: 2016-03-09 19:15:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1184123, 1234840    

Description wdaniel 2015-01-16 16:37:58 UTC
Description of problem:

engine-iso-uploader fails with following error:

engine-iso-uploader -v --nfs-server=ip_address:/vol/ISO upload /data/rhel-server-7.0-x86_64-dvd.iso 
Uploading, please wait...
ERROR: local variable 'domain_type' referenced before assignment
INFO: Use the -h option to see usage.
DEBUG: Configuration:
DEBUG: command: upload
DEBUG: Traceback (most recent call last):
DEBUG:   File "/usr/bin/engine-iso-uploader", line 1436, in <module>
DEBUG:     isoup = ISOUploader(conf)
DEBUG:   File "/usr/bin/engine-iso-uploader", line 455, in __init__
DEBUG:     self.upload_to_storage_domain()
DEBUG:   File "/usr/bin/engine-iso-uploader", line 1085, in upload_to_storage_domain
DEBUG:     elif domain_type in ('localfs', ):
DEBUG: UnboundLocalError: local variable 'domain_type' referenced before assignment

Version-Release number of selected component (if applicable):

rhevm-iso-uploader-3.4.4-1.el6ev.noarch


How reproducible:

Very

Steps to Reproduce:
1. Attempt upload of iso to NFS domain
2.
3.

Actual results:

Fails to upload due to improper variable assignment

Expected results:

Uploads the iso successfully

Additional info:

Comment 1 Allon Mureinik 2015-01-17 10:44:23 UTC
Didi, IIUC, your patch 24f679c0eb09f8d7545303fb6c0099424b7a73e3 address this issue, doesn't it?

Comment 2 Yedidyah Bar David 2015-01-18 07:37:33 UTC
(In reply to Allon Mureinik from comment #1)
> Didi, IIUC, your patch 24f679c0eb09f8d7545303fb6c0099424b7a73e3 address this
> issue, doesn't it?

Indeed...

Comment 3 Yedidyah Bar David 2015-01-18 07:44:50 UTC
Workaround: Copy your iso file manually to /path-to-iso-domain/SOME-UUID/images/11111111-1111-1111-1111-111111111111/ and set ownership/permissions to vdsm:kvm 644.

Comment 4 Yaniv Lavi 2015-01-18 13:32:20 UTC
Small fix and we got a customer ticket on this.
Please try to get it in to 3.5.0 GA build.

Comment 5 Yedidyah Bar David 2015-01-19 08:13:44 UTC
The bug is in the code handling the option --nfs-server.

Comment 12 Jiri Belka 2015-05-06 13:48:25 UTC
ok, ovirt-iso-uploader-3.6.0-0.0.master.20150410142241.git1a680f9.el6.noarch

Comment 16 errata-xmlrpc 2016-03-09 19:15:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-0391.html