Nova cannot use https when call glance-client

Bug #1471992 reported by Stanislaw Bogatkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
MOS Glance
5.1.x
Invalid
High
Alex Ermolov
6.0.x
Fix Released
High
Alex Ermolov
6.1.x
Invalid
High
Alex Ermolov

Bug Description

If ssl for endpoints is set, then nova image-list command doesn't work, cause when it calls glance, it try to use plain http instead of https. This behavior should be fixed.

Revision history for this message
Stanislaw Bogatkin (sbogatkin) wrote :
Download full text (16.8 KiB)

More logs:

[root@node-1 ~]# keystone endpoint-list
+----------------------------------+-----------+-------------------------------------------+---------------------------------------------------+-------------------------------------------+----------------------------------+
| id | region | publicurl | internalurl | adminurl | service_id |
+----------------------------------+-----------+-------------------------------------------+---------------------------------------------------+-------------------------------------------+----------------------------------+
| 149d82bce8d74480843cc9e5d9492d37 | RegionOne | https://10.109.21.2:5000/v2.0 | https://internal.fuel.local:5000/v2.0 | http://10.109.22.2:35357/v2.0 | a454d2a580d345eb981c5f709d8beb75 |
| 2069d4ff8d6c4a9a87e08f5be54d9a05 | RegionOne | https://10.109.21.2:8776/v1/%(tenant_id)s | https://internal.fuel.local:8776/v1/%(tenant_id)s | https://10.109.22.2:8776/v1/%(tenant_id)s | 86c7994a7fc14c5ead108d3503558ab5 |
| 2a9785d44ae24462b0676cd044234ba7 | RegionOne | https://10.109.21.2:8773/services/Cloud | https://internal.fuel.local:8773/services/Cloud | https://10.109.22.2:8773/services/Admin | f36166d2728e45288a12537b5b518bc7 |
| b8ea83ee9fb347df8820069f9da3288a | RegionOne | https://10.109.21.2:9292 | https://internal.fuel.local:9292 | https://10.109.22.2:9292 | 424a4fd0df9544afa4469aa6f61ce82e |
| d7ab3e488ef94140a6f0b0ee00436efc | RegionOne | https://10.109.21.2:8774/v2/%(tenant_id)s | https://internal.fuel.local:8774/v2/%(tenant_id)s | https://10.109.22.2:8774/v2/%(tenant_id)s | 46d262e974324ab99816c7e5616f8444 |
| ff222c3b8e5c4ef4b0c6455832d79efa | RegionOne | https://10.109.21.2:8776/v2/%(tenant_id)s | https://internal.fuel.local:8776/v2/%(tenant_id)s | https://10.109.22.2:8776/v2/%(tenant_id)s | 442a059e5d854bc7b13a5f9fbc17275b |
+----------------------------------+-----------+-------------------------------------------+---------------------------------------------------+-------------------------------------------+----------------------------------+

[root@node-1 ~]# glance --debug image-list
/usr/lib/python2.6/site-packages/glanceclient/client.py:26: DeprecationWarning: `version` keyword is being deprecated. Please pass the version as part of the URL. http://$HOST:$PORT/v$VERSION_NUMBER
  DeprecationWarning)
curl -i -X GET -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'Accept-Encoding: gzip, deflate, compress' -H 'Accept: */*' -H 'X-Auth-Token: {SHA1}22e8d4aac973136bce42aa7c0a05d6b153e41c9e' --cert None --key None https://internal.fuel.local:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20

HTTP/1.1 200 OK
date: Tue, 07 Jul 2015 04:33:47 GMT
connection: close
content-type: application/json; charset=UTF-8
content-length: 14
x-openstack-request-id: req-4f68dfcf-dd14-4331-a61a-b3efc7ab54fd

{"images": []}

+----+------+-------------+------------------+------+--------+
| ID | Name | Disk Forma...

Revision history for this message
Stanislaw Bogatkin (sbogatkin) wrote :

One more - if you need an live environment with such settings - you can use http://jenkins-product.srt.mirantis.net:8080/view/custom_iso/job/custom_7.0_iso/209/ ISO and enable SSL for internal endoints in settings page.

Changed in fuel:
assignee: MOS Nova (mos-nova) → Andrey Kurilin (akurilin)
Revision history for this message
Andriy Kurilin (andreykurilin) wrote :

Since novaclient(`nova image-list`) makes a request to nova API, not to Glance API, the problem not in novaclient.

I suppose that you have wrong configuration of Nova. Nova config file(/etc/nova/nova.conf) contains "glance" section.
http://paste.mirantis.net/show/682/ - default parameters of this section.

Option "protocol" defines the use of a particular protocol("http"/"https") for communication with glance API.

If you want to use "https" for communication between Nova API and Glance API, you should change this option and restart nova-api service.

Changed in fuel:
status: New → Invalid
Revision history for this message
Stanislaw Bogatkin (sbogatkin) wrote :

Sorry, but you not right. Nova.conf does have enabled https for glance, but it doens't work.

Changed in fuel:
status: Invalid → Confirmed
Revision history for this message
Andriy Kurilin (andreykurilin) wrote :

Trace from Nova-API http://paste.mirantis.net/show/685/ looks similar to upstream bug in glanceclient - https://bugs.launchpad.net/python-glanceclient/+bug/1442664

After upgrading glanceclient from 0.15.0 to 0.17.1*, the issue was fixed.

* fix was merged in 0.17.1 https://launchpad.net/python-glanceclient/+milestone/0.17.1

Changed in fuel:
assignee: Andrey Kurilin (akurilin) → MOS Glance (mos-glance)
affects: fuel → mos
Changed in mos:
milestone: 7.0 → none
milestone: none → 7.0
Revision history for this message
Mike Fedosin (mfedosin) wrote :

Btw, we are going to remove custom SSL compression handling, so it's better don't use it at all https://review.openstack.org/#/c/189344/

Revision history for this message
Mike Fedosin (mfedosin) wrote :

Fix https://review.openstack.org/#/c/174293/ was merged to stable/kilo and transferred to MOS 7.0

Changed in mos:
status: Confirmed → Fix Committed
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/python-glanceclient (openstack-ci/fuel-6.1/2014.2)

Fix proposed to branch: openstack-ci/fuel-6.1/2014.2
Change author: Alex Ermolov <email address hidden>
Review: https://review.fuel-infra.org/10007

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/python-glanceclient (openstack-ci/fuel-6.0-updates/2014.2)

Fix proposed to branch: openstack-ci/fuel-6.0-updates/2014.2
Change author: Alex Ermolov <email address hidden>
Review: https://review.fuel-infra.org/11240

Revision history for this message
Oleksiy Butenko (obutenko) wrote :

verified on MOS 7.0 ISO 286

{"build_id": "286", "build_number": "286", "release_versions": {"2015.1.0-7.0": {"VERSION": {"build_id": "286", "build_number": "286", "api": "1.0", "fuel-library_sha": "ff63a0bbc93a3a0fb78215c2fd0c77add8dfe589", "nailgun_sha": "5c33995a2e6d9b1b8cdddfa2630689da5084506f", "feature_groups": ["mirantis"], "fuel-nailgun-agent_sha": "d7027952870a35db8dc52f185bb1158cdd3d1ebd", "openstack_version": "2015.1.0-7.0", "fuel-agent_sha": "082a47bf014002e515001be05f99040437281a2d", "production": "docker", "python-fuelclient_sha": "1ce8ecd8beb640f2f62f73435f4e18d1469979ac", "astute_sha": "8283dc2932c24caab852ae9de15f94605cc350c6", "fuel-ostf_sha": "1f08e6e71021179b9881a824d9c999957fcc7045", "release": "7.0", "fuelmain_sha": "9ab01caf960013dc882825dc9b0e11ccf0b81cb0"}}}, "auth_required": true, "api": "1.0", "fuel-library_sha": "ff63a0bbc93a3a0fb78215c2fd0c77add8dfe589", "nailgun_sha": "5c33995a2e6d9b1b8cdddfa2630689da5084506f", "feature_groups": ["mirantis"], "fuel-nailgun-agent_sha": "d7027952870a35db8dc52f185bb1158cdd3d1ebd", "openstack_version": "2015.1.0-7.0", "fuel-agent_sha": "082a47bf014002e515001be05f99040437281a2d", "production": "docker", "python-fuelclient_sha": "1ce8ecd8beb640f2f62f73435f4e18d1469979ac", "astute_sha": "8283dc2932c24caab852ae9de15f94605cc350c6", "fuel-ostf_sha": "1f08e6e71021179b9881a824d9c999957fcc7045", "release": "7.0", "fuelmain_sha": "9ab01caf960013dc882825dc9b0e11ccf0b81cb0"}

Changed in mos:
status: Fix Committed → Fix Released
tags: added: 6.0 release-notes-done
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/python-glanceclient (openstack-ci/fuel-6.0-updates/2014.2)

Change abandoned by Alex Ermolov <email address hidden> on branch: openstack-ci/fuel-6.0-updates/2014.2
Review: https://review.fuel-infra.org/11240

Revision history for this message
Alex Ermolov (aermolov) wrote :

Fix proposed to branch: openstack-ci/fuel-6.0-updates/2014.2
Change author: Alex Ermolov <email address hidden>
Review: https://review.fuel-infra.org/11428

Revision history for this message
Alex Ermolov (aermolov) wrote :

Marked as Invalid for 6.1.x as the actual code (excluding unit tests) is already there.

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix merged to openstack-build/python-glanceclient-build (openstack-ci/fuel-6.0-updates/2014.2)

Reviewed: https://review.fuel-infra.org/11519
Submitter: Alexander Tsamutali <email address hidden>
Branch: openstack-ci/fuel-6.0-updates/2014.2

Commit: fd484c495e40e257e6b90acb7f7432ca468d25f1
Author: Alex Ermolov <email address hidden>
Date: Mon Sep 14 20:06:18 2015

Removed "fix-glanceclient-tests" patch

Removal is done because the patch code duplicates
a part of CR to the project (python-glanceclient) itself

Related-bug: #1471992
Change-Id: I7f4d8b9e93bda554d9d207a5df6508c8353a9d23

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/python-glanceclient (openstack-ci/fuel-6.0-updates/2014.2)

Reviewed: https://review.fuel-infra.org/11428
Submitter: Vitaly Sedelnik <email address hidden>
Branch: openstack-ci/fuel-6.0-updates/2014.2

Commit: 5be93d9da01c08656982c9d51bcb09fe9cbf5234
Author: Alex Ermolov <email address hidden>
Date: Thu Oct 29 08:06:07 2015

Fix client when using no ssl compression

Since the release of the 0.16.1 client, using the 'no ssl compression'
option, whether on the command line, or via the library -- Nova does this by
default -- a stack trace was generated.

cherry-picked from: https://review.openstack.org/#/c/174293/

Closes-bug: #1471992
Change-Id: I71d9a643468897b6d7261573ae262b3b22893945

Revision history for this message
Alex Ermolov (aermolov) wrote :

Marked as Invalid for 5.1.1 as there is not code to patch.

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/python-glanceclient (openstack-ci/fuel-6.1/2014.2)

Change abandoned by Alex Ermolov <email address hidden> on branch: openstack-ci/fuel-6.1/2014.2
Review: https://review.fuel-infra.org/10007
Reason: Bug is Invalid for 6.1

Revision history for this message
Vadim Rovachev (vrovachev) wrote :

Verified on 6.0

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.