Bug 888938

Summary: ISO uploader: on upgrade, change the default port for 'rhevm' in /etc/ovirt-engine/isouploader.conf to localhost:8443 (and not the default 443)
Product: Red Hat Enterprise Virtualization Manager Reporter: Idith Tal-Kohen <italkohe>
Component: ovirt-engine-setupAssignee: Kiril Nesenko <knesenko>
Status: CLOSED ERRATA QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.0CC: bazulay, cpelland, dfediuck, dyasny, iheim, knesenko, lyarwood, mgoldboi, ngupta, Rhev-m-bugs, sgordon, sgrinber, ykaul
Target Milestone: ---Keywords: ZStream
Target Release: 3.1.1   
Hardware: x86_64   
OS: Linux   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously the rhevm-upgrade script would set the URL of the Manager to localhost:443 in the /etc/ovirt-engine/isouploader.conf file. As a result the ISO uploader would fail on installations that were upgraded from Red Hat Enterprise Virtualization 3.0 where the default HTTPS port for the Manager is 8443. The rhevm-upgrade script has been updated to maintain the port configuration from 3.0.
Story Points: ---
Clone Of: 887741 Environment:
Last Closed: 2013-01-15 15:15:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 887741    
Bug Blocks:    

Description Idith Tal-Kohen 2012-12-19 20:24:36 UTC
+++ This bug was initially created as a clone of Bug #887741 +++

Description of problem:
The default setting for 'rhevm' under /etc/ovirt-engine/isouploader.conf is localhost:443. On upgrade from 3.0, it should be changed to localhost:8443.

Version-Release number of selected component (if applicable):
SI24 (rhevm-3.1.0-32.el6ev.noarch)

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

--- Additional comment from Yaniv Kaul on 2012-12-17 02:35:40 EST ---

I assume similar bugs should be filed for log collector and image uploader:
[root@rhevm-3 ovirt-engine]# grep -R 443 *
imageuploader.conf:#rhevm=localhost:443
isouploader.conf:rhevm=localhost:8443
logcollector.conf:#rhevm=localhost:443

--- Additional comment from Nikhil Gupta on 2012-12-17 05:01:46 EST ---

It appears that the rhevm-iso-uploader is trying to connect to the REST API on port 443. Changing the port in /etc/ovirt-engine/isouploader.conf to 8443 fixes the problem.

This needs to be addressed in documentation or a patch to change the default port needs to be created.

Example error:

[root@rhevm ~]# rhevm-iso-uploader -v -i rhev-isos upload -u xyz.com /usr/share/rhev-guest-tools-iso/RHEV-toolsSetup_3.1_9.iso
Please provide the REST API password for the xyz.com RHEV-M user (CTRL+D to abort): 
ERROR: Problem connecting to the REST API.  Is the service available and does the CA certificate exist?
ERROR: 'NoneType' object is not iterable
INFO: Use the -h option to see usage.
DEBUG: Configuration:
DEBUG: command: upload
DEBUG: Traceback (most recent call last):
DEBUG:   File "/usr/bin/rhevm-iso-uploader", line 955, in <module>
DEBUG:     isoup = ISOUploader(conf)
DEBUG:   File "/usr/bin/rhevm-iso-uploader", line 333, in __init__
DEBUG:     self.upload_to_storage_domain()
DEBUG:   File "/usr/bin/rhevm-iso-uploader", line 689, in upload_to_storage_domain
DEBUG:     (id, address, path) = self.get_host_and_path_from_ISO_domain(self.configuration.get('iso_domain'))
DEBUG: TypeError: 'NoneType' object is not iterable

Fix:
--> /etc/ovirt-engine/isouploader.conf
## hostname or IP address of the RHEV-M
#rhevm=localhost:443
rhevm=localhost:8443

Fixed output:

[root@rhevm ovirt-engine]# rhevm-iso-uploader -v -i rhev-isos upload -u xyz.com /usr/share/rhev-guest-tools-iso/RHEV-toolsSetup_3.1_9.iso
Please provide the REST API password for the xyz.com RHEV-M user (CTRL+D to abort): 
DEBUG: API Vendor(Red Hat)	API Version(3.1.0)
DEBUG: id=9ab8be51-02b6-41af-8952-3f67155120f7 address=abc-util-01.abc.example.com path=/rhev-isos
DEBUG: local NFS mount point is /tmp/tmpxmCPiZ
DEBUG: NFS mount command (/bin/mount -t nfs -o rw,sync,soft abc-util-01.abc.example.com:/rhev-isos /tmp/tmpxmCPiZ)
DEBUG: /bin/mount -t nfs -o rw,sync,soft abc-util-01.abc.example.com:/rhev-isos /tmp/tmpxmCPiZ
DEBUG: _cmds(['/bin/mount', '-t', 'nfs', '-o', 'rw,sync,soft', 'abc-util-01.abc.example.com:/rhev-isos', '/tmp/tmpxmCPiZ'])
DEBUG: returncode(0)
DEBUG: STDOUT()
DEBUG: STDERR()
DEBUG: Size of /usr/share/rhev-guest-tools-iso/RHEV-toolsSetup_3.1_9.iso:	220809216 bytes	215634.0 1K-blocks	210.0 MB
DEBUG: Available space in /tmp/tmpxmCPiZ/9ab8be51-02b6-41af-8952-3f67155120f7/images/11111111-1111-1111-1111-111111111111:	8033140736 bytes	7844864.0 1K-blocks	7661.0 MB
DEBUG: euid(0) egid(0)
DEBUG: euid(0) egid(0)
INFO: /usr/share/rhev-guest-tools-iso/RHEV-toolsSetup_3.1_9.iso uploaded successfully
DEBUG: /bin/umount -t nfs -f  /tmp/tmpxmCPiZ
DEBUG: /bin/umount -t nfs -f  /tmp/tmpxmCPiZ
DEBUG: _cmds(['/bin/umount', '-t', 'nfs', '-f', '/tmp/tmpxmCPiZ'])
DEBUG: returncode(0)
DEBUG: STDOUT()
DEBUG: STDERR()


Versions:
rhevm-restapi-3.1.0-32.el6ev.noarch
rhevm-iso-uploader-3.1.0-8.el6ev.noarch
rhevm-backend-3.1.0-32.el6ev.noarch
rhevm-genericapi-3.1.0-32.el6ev.noarch

--- Additional comment from Kiril Nesenko on 2012-12-19 06:58:33 EST ---

Patch posted for review: https://gerrit.eng.lab.tlv.redhat.com/#/c/3829/

Comment 6 errata-xmlrpc 2013-01-15 15:15:33 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.

http://rhn.redhat.com/errata/RHBA-2013-0003.html