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

Bug 1097789

Summary: [engine-iso-uploader] engine-iso-uploader does not work with Local ISO domain
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-iso-uploaderAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED ERRATA QA Contact: Gonza <grafuls>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.4.0CC: cmestreg, dfediuck, didi, gklein, lveyde, rbalakri, Rhev-m-bugs, sbonazzo, stirabos, yeylon
Target Milestone: ovirt-3.6.0-rcKeywords: ZStream
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, users could not remotely upload an ISO file from local storage to a local ISO domain via SSH. This happened because engine-iso-uploader was unable to get the hostname for hosts with a local storage domain when starting from the storage domain name. This worked only if executed on the same host. With this fix, engine-iso-uploader can get a remote host's host address for a local ISO domain via the REST API. As a result, engine-iso-uploader can upload an ISO image to a local ISO storage domain, as well as from another host via SSH.
Story Points: ---
Clone Of:
: 1188326 (view as bug list) Environment:
Last Closed: 2016-03-09 19:14:58 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: 1187181    
Bug Blocks: 1188326, 1234840    

Description Jiri Belka 2014-05-14 14:24:06 UTC
Description of problem:

Whe ISO domain is on Local storage, and I'm trying to engine-iso-uploader to upload _remotely_ (yeah!) an iso file via ssh (as local ISO domain is not NFS), it does not work as code has hardcoded 'localhost' for ssh host.

engine-iso-uploader --conf-file=/tmp/isouploader.conf -v upload /usr/share/rhev-guest-tools-iso/RHEV-toolsSetup_3.4_4.el6ev.iso 
DEBUG: API Vendor(Red Hat)      API Version(3.4.0)
DEBUG: id=9ac7ede3-cb56-44de-95b0-2297033f9be4 address=localhost path=/mnt/iso
                                                       ^^^^^^^^^ - localhost?
Uploading, please wait...
INFO: Start uploading /usr/share/rhev-guest-tools-iso/RHEV-toolsSetup_3.4_4.el6ev.iso 
DEBUG: file (/usr/share/rhev-guest-tools-iso/RHEV-toolsSetup_3.4_4.el6ev.iso)
DEBUG: /usr/bin/ssh -p 22  root@localhost "/usr/bin/test -e /mnt/iso/9ac7ede3-cb56-44de-95b0-2297033f9be4/images/11111111-1111-1111-1111-111111111111/RHEV-toolsSetup_3.4_4.el6ev.iso"
                                ^^^^^^^^^ - localhost?

DEBUG: /usr/bin/ssh -p 22  root@localhost "/usr/bin/test -e /mnt/iso/9ac7ede3-cb56-44de-95b0-2297033f9be4/images/11111111-1111-1111-1111-111111111111/RHEV-toolsSetup_3.4_4.el6ev.iso"
DEBUG: _cmds(['/usr/bin/ssh', '-p', '22', 'root@localhost', '/usr/bin/test -e /mnt/iso/9ac7ede3-cb56-44de-95b0-2297033f9be4/images/11111111-1111-1111-1111-111111111111/RHEV-toolsSetup_3.4_4.el6ev.iso'])

# egrep -v '^#|^[[:blank:]]*$' /tmp/isouploader.conf 
[ISOUploader]
user=admin@internal
passwd=******
engine=vm-161-144.scl.lab.tlv.redhat.com:443
cert-file=/tmp/ca.crt
iso-domain=iso-local
ssh-user=root
ssh-port=22

# sed -n '629,634p;' `which engine-iso-uploader`
            if storage is not None:
                domain_type = storage.get_type()
                address = 'localhost'
                if domain_type not in ('localfs', ):
                    address = storage.get_address()
                path = storage.get_path()

So if storage type is localfs, address is always localhost. This is wrong. Admins want to upload their iso files from their clients.

Version-Release number of selected component (if applicable):
rhevm-iso-uploader-3.4.0-3.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. on remote client: rhevm-iso-uploader
2. local dc/cluster/host with iso domain (you must have RHEL now)
3. from remote client try to use above config (as template) and try iso upload

Actual results:
ssh is connecting always to localhost as code has hardcoded value

Expected results:
be clever, get host of storage even if it is localfs

Additional info:

Comment 1 Jiri Belka 2014-05-14 14:31:47 UTC
Please consider cloning this to engine-image-uploader even if right now Export domain seems not be possible to create on Local storage. (I would see good usage for Export domain on Local storage - live snapshot with memory -> export -> backup solution.)

Comment 2 Sandro Bonazzola 2014-05-14 14:53:16 UTC
- This has been introduced fixing bug #1065726.
- This is not a regression since localfs doesn't provide a host to be connected to.
- Workaround exists: just use scp / sftp instead of iso uploader.

Reducing severity to medium and targeting to 3.4.1.

Host may be probably found by checking the host with attached that local storage.

Comment 4 Sandro Bonazzola 2015-02-20 11:08:06 UTC
Automated message: can you please update doctext or set it as not required?

Comment 5 Gonza 2015-09-08 09:03:28 UTC
Verified with:
rhevm-iso-uploader-3.6.0-0.2.alpha.gitea4158a.el6ev.noarch

ISO uploaded successfully.

Comment 8 errata-xmlrpc 2016-03-09 19:14:58 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