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

Bug 1100825

Summary: option nossl does not work
Product: Red Hat Enterprise Virtualization Manager Reporter: Petr Beňas <pbenas>
Component: ovirt-engine-iso-uploaderAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED ERRATA QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: high    
Version: 3.4.0CC: dfediuck, didi, gklein, iheim, juan.hernandez, juwu, lveyde, pstehlik, rbalakri, Rhev-m-bugs, sbonazzo, sherold, stirabos, yeylon
Target Milestone: ---Keywords: Regression, ZStream
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: ovirt-3.5.0-beta1.1 Doc Type: Bug Fix
Doc Text:
Previously, using the ISO uploader with the --nossl option to upload an ISO domain failed because HTTP isn't supported. Since the Rest API doesn't support plain HTTP connections, the --nossl option has been removed.
Story Points: ---
Clone Of:
: 1117370 (view as bug list) Environment:
Last Closed: 2015-02-11 17:48:44 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:    
Bug Blocks: 1117370, 1142923, 1156165    

Description Petr Beňas 2014-05-23 14:14:56 UTC
Description of problem:
[root@pb-rh34 11111111-1111-1111-1111-111111111111]# engine-iso-uploader -i ISO_DOMAIN upload /tmp/foo.iso 
Uploading, please wait...
INFO: Start uploading /tmp/foo.iso 
INFO: /tmp/foo.iso uploaded successfully
[root@pb-rh34 11111111-1111-1111-1111-111111111111]# rm -f *.iso
[root@pb-rh34 11111111-1111-1111-1111-111111111111]# engine-iso-uploader -i ISO_DOMAIN upload --nossl /tmp/foo.iso 
ERROR: Unable to connect to REST API.  Message: [ERROR]::Server reply is in inappropriate format.
ERROR: 'NoneType' object is not iterable
INFO: Use the -h option to see usage.

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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Sandro Bonazzola 2014-05-23 14:31:27 UTC
juan, any change in SDK that may have caused this?

Comment 3 Juan Hernández 2014-05-23 15:13:29 UTC
If I understand correctly providing the --nossl option means that the ISO uploader will try to connect to the HTTP port, instead to the HTTPS port. The RESTAPI isn't available in the HTTP port, so this will never work. In this case the server will send a redirect to the HTTPs port:

  HTTP/1.1 302 Moved Temporarily
  Location: https://whatever/api

The Python SDK doesn't understand these redirects, so it will just fail. This hasn't changed recently.

If you want to debug this further you will need to add the "debug=True" parameter to the constructor of the API:

diff --git a/src/__main__.py b/src/__main__.py
index 1c4c93a..c19d4e5 100644
--- a/src/__main__.py
+++ b/src/__main__.py
@@ -498,6 +498,7 @@ class ISOUploader(object):
                     password=self.configuration.get("passwd"),
                     ca_file=self.configuration.get("cert_file"),
                     validate_cert_chain=not self.configuration.get("insecure"),
+                    debug=True,
                 )
 
                 pi = self.api.get_product_info()

Then capture the output.

A dump of the traffic between the ISO uploader and the engine can also help.

Comment 4 Simone Tiraboschi 2014-07-08 13:30:26 UTC
Rest APIs doesn't support plain http connection so nossl options doesn't make sense. Removing it.

Comment 5 Sandro Bonazzola 2014-07-08 13:47:21 UTC
please verify if image-uploader and log-collector are affected too.

Comment 7 Petr Beňas 2014-08-07 15:41:35 UTC
[root@pb-rh35 ~]# cd /var/lib/exports/iso/63fe3516-4170-402a-9dc8-6d3eab1c7933/images/11111111-1111-1111-1111-111111111111/
[root@pb-rh35 11111111-1111-1111-1111-111111111111]# echo foo > /tmp/test.iso
[root@pb-rh35 11111111-1111-1111-1111-111111111111]# engine-iso-uploader -i ISO_DOMAIN upload --nossl /tmp/test.iso 
Usage: engine-iso-uploader [options] list 
       engine-iso-uploader [options] upload FILE [FILE]...[FILE]

engine-iso-uploader: error: no such option: --nossl
[root@pb-rh35 11111111-1111-1111-1111-111111111111]# engine-iso-uploader -i ISO_DOMAIN upload /tmp/test.iso 
Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort): 
Uploading, please wait...
INFO: Start uploading /tmp/test.iso 
INFO: /tmp/test.iso uploaded successfully
[root@pb-rh35 11111111-1111-1111-1111-111111111111]# rpm -qa ovirt-engine-iso-uploader
[root@pb-rh35 11111111-1111-1111-1111-111111111111]# rpm -qa ovirt-iso-uploader
ovirt-iso-uploader-3.5.0-0.1.master.20140711.git4a98e28.el6.noarch
[root@pb-rh35 11111111-1111-1111-1111-111111111111]#

Comment 11 errata-xmlrpc 2015-02-11 17:48:44 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/RHBA-2015-0191.html