Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1100825 - option nossl does not work
Summary: option nossl does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-iso-uploader
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 3.5.0
Assignee: Simone Tiraboschi
QA Contact: Pavel Stehlik
URL:
Whiteboard: integration
Depends On:
Blocks: 1117370 rhev3.5beta 1156165
TreeView+ depends on / blocked
 
Reported: 2014-05-23 14:14 UTC by Petr Beňas
Modified: 2015-02-11 17:48 UTC (History)
14 users (show)

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.
Clone Of:
: 1117370 (view as bug list)
Environment:
Last Closed: 2015-02-11 17:48:44 UTC
oVirt Team: ---
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0191 normal SHIPPED_LIVE rhevm-iso-uploader bug fix and enhancement update 2015-02-11 22:38:19 UTC
oVirt gerrit 29711 master MERGED upload: remove nossl option Never
oVirt gerrit 29716 ovirt-iso-uploader-3.5 MERGED upload: remove nossl option Never

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


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