← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1408940] [NEW] glance-replicator doesn't support https connection to glance api

 

Public bug reported:

Tried to call livecopy command with glance-replicator, encountered the
following error:

[root@controller66 ~]# glance-replicator livecopy -M $r1_token -S $r2_token 192.168.101.10:9292 controller66.region2.com:9292
2014-12-04 14:03:11.766 804 CRITICAL glance [-] BadStatusLine
2014-12-04 14:03:11.766 804 TRACE glance Traceback (most recent call last):
2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/bin/glance-replicator", line 10, in <module>
2014-12-04 14:03:11.766 804 TRACE glance     sys.exit(main())
2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib/python2.6/site-packages/glance/cmd/replicator.py", line 737, in main
2014-12-04 14:03:11.766 804 TRACE glance     command(options, args)
2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib/python2.6/site-packages/glance/cmd/replicator.py", line 477, in replication_livecopy
2014-12-04 14:03:11.766 804 TRACE glance     for image in master_client.get_images():
2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib/python2.6/site-packages/glance/cmd/replicator.py", line 154, in get_images
2014-12-04 14:03:11.766 804 TRACE glance     response = self._http_request('GET', url, {}, '')
2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib/python2.6/site-packages/glance/cmd/replicator.py", line 115, in _http_request
2014-12-04 14:03:11.766 804 TRACE glance     response = self.conn.getresponse()
2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse
2014-12-04 14:03:11.766 804 TRACE glance     response.begin()
2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib64/python2.6/httplib.py", line 391, in begin
2014-12-04 14:03:11.766 804 TRACE glance     version, status, reason = self._read_status()
2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib64/python2.6/httplib.py", line 355, in _read_status
2014-12-04 14:03:11.766 804 TRACE glance     raise BadStatusLine(line)
2014-12-04 14:03:11.766 804 TRACE glance BadStatusLine
2014-12-04 14:03:11.766 804 TRACE glance

After checking the codes, I found that the connection is established
with httplib.HTTPConnection for commands, which implies that https
connection is not supported.

** Affects: glance
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1408940

Title:
  glance-replicator doesn't support https connection to glance api

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  Tried to call livecopy command with glance-replicator, encountered the
  following error:

  [root@controller66 ~]# glance-replicator livecopy -M $r1_token -S $r2_token 192.168.101.10:9292 controller66.region2.com:9292
  2014-12-04 14:03:11.766 804 CRITICAL glance [-] BadStatusLine
  2014-12-04 14:03:11.766 804 TRACE glance Traceback (most recent call last):
  2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/bin/glance-replicator", line 10, in <module>
  2014-12-04 14:03:11.766 804 TRACE glance     sys.exit(main())
  2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib/python2.6/site-packages/glance/cmd/replicator.py", line 737, in main
  2014-12-04 14:03:11.766 804 TRACE glance     command(options, args)
  2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib/python2.6/site-packages/glance/cmd/replicator.py", line 477, in replication_livecopy
  2014-12-04 14:03:11.766 804 TRACE glance     for image in master_client.get_images():
  2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib/python2.6/site-packages/glance/cmd/replicator.py", line 154, in get_images
  2014-12-04 14:03:11.766 804 TRACE glance     response = self._http_request('GET', url, {}, '')
  2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib/python2.6/site-packages/glance/cmd/replicator.py", line 115, in _http_request
  2014-12-04 14:03:11.766 804 TRACE glance     response = self.conn.getresponse()
  2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse
  2014-12-04 14:03:11.766 804 TRACE glance     response.begin()
  2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib64/python2.6/httplib.py", line 391, in begin
  2014-12-04 14:03:11.766 804 TRACE glance     version, status, reason = self._read_status()
  2014-12-04 14:03:11.766 804 TRACE glance   File "/usr/lib64/python2.6/httplib.py", line 355, in _read_status
  2014-12-04 14:03:11.766 804 TRACE glance     raise BadStatusLine(line)
  2014-12-04 14:03:11.766 804 TRACE glance BadStatusLine
  2014-12-04 14:03:11.766 804 TRACE glance

  After checking the codes, I found that the connection is established
  with httplib.HTTPConnection for commands, which implies that https
  connection is not supported.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1408940/+subscriptions


Follow ups

References