glance image-show does not output correctly
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Glance Client |
Critical
|
David Sariel | ||
| | python-glanceclient (Ubuntu) |
High
|
James Page | ||
| | python-urllib3 (Ubuntu) |
High
|
Unassigned | ||
| | requests (Ubuntu) |
High
|
Unassigned | ||
Bug Description
1) Description of the problem
When running `glance image-show` on an existing image, the glance client does not output the details of the image.
glance client version: 0.19.0
operating system: ubuntu 14.04
The glance client is installed from the UCA liberty-staging repo. This bug does not appear when python-glanceclient is installed from the CentOS 7 delorean repo or when installed directly from pip.
2) Impact
A user can't view details of their image via the command line.
The behavior trickles down to python-
Our use case is in puppet: the glance_image provider in the glance puppet module cannot fetch details of an uploaded image, and so tries to upload the image again with --copy-from and fails.
3) Expected behavior
(Installed from UCA Kilo)
# glance --version
0.15.0
# glance image-show 3aa89a60-
+------
| Property | Value |
+------
| checksum | d972013792949d0
| container_format | bare |
| created_at | 2015-08-
| deleted | False |
| disk_format | qcow2 |
| id | 3aa89a60-
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | test_image |
| owner | fe3360a176d54a0
| protected | False |
| size | 13147648 |
| status | active |
| updated_at | 2015-08-
+------
4) Actual behavior
(Installed from UCA Liberty-staging)
# glance --version
0.19.0
# glance image-show 728d718c-
id
5) Steps to reproduce
- install the liberty-staging repo
- apt-get install python-glanceclient
- run glance image-show against an openstack cloud with glance exposed
Additional information:
# lsb_release -rd
Description: Ubuntu 14.04.2 LTS
Release: 14.04
# apt-cache policy python-glanceclient
python-
Installed: 1:0.19.
Candidate: 1:0.19.
Version table:
*** 1:0.19.
500 http://
100 /var/lib/
1:
500 http://
| Launchpad Janitor (janitor) wrote : | #1 |
| Changed in python-glanceclient (Ubuntu): | |
| status: | New → Confirmed |
| Ed Balduf (ebalduf) wrote : | #2 |
I'm getting this too, on a fresh devstack pull from head on Friday 8/21 onto Fedora 21.
[e@devstack devstack]$ glance image-list
+------
| ID | Name | Disk Format | Container Format | Size | Status |
+------
| e20fae04-
| 66e788d6-
| 51b75631-
| c6ecd6bc-
+------
[e@devstack devstack]$ glance image-show e20fae04-
id
[e@devstack devstack]$ glance --version
0.19.0
[e@devstack devstack]$ cat /etc/fedora-release
Fedora release 21 (Twenty One)
[e@devstack devstack]$ uname -a
Linux devstack.
| Colleen Murphy (krinkle) wrote : | #3 |
Moving this to the python-glanceclient project instead of the Ubuntu package since this appears to be a cross-distro problem.
| affects: | python-glanceclient (Ubuntu) → python-glanceclient |
| Ed Balduf (ebalduf) wrote : | #4 |
A bit more detail here to help. Here is the output from glanceclient with debug and verbose. Taking a look at the trace and the code in master they were radically different, so it seems like this is a version problem. See below
[e@devstack glanceclient]$ glance -d -v image-show e20fae04-
curl -g -i -X HEAD -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-
HTTP/1.1 200 OK
Content-Length: 0
X-Image-Meta-Id: e20fae04-
X-Image-
X-Image-
X-Image-
X-Image-
X-Image-
X-Image-
X-Image-
X-Image-
X-Image-Meta-Size: 13167616
Connection: keep-alive
Etag: 64d7c1cd2b6f60c
X-Image-
Date: Mon, 24 Aug 2015 14:28:26 GMT
X-Image-Meta-Owner: 6880ca64ebd04c1
X-Image-
Content-Type: text/html; charset=UTF-8
X-Openstack-
X-Image-
X-Image-Meta-Name: cirros-
Traceback (most recent call last):
File "/usr/lib/
args.
File "/usr/lib/
image_id = utils.find_
File "/usr/lib/
self.get()
File "/usr/lib/
new = self.manager.
File "/usr/lib/
raise AttributeError(k)
AttributeError: id
id
What I have also found is that if I pull python-glanceclient from the git.openstack.org and move it into site-packages, I still get the same version reported, BUT it now works.
[e@devstack site-packages]$ glance --version
0.19.0
[e@devstack site-packages]$ glance image-show e20fae04-
+------
| Property | Value |
+------
| checksum | 64d7c1cd2b6f60c
| container_format | bare |
| created_at | 2015-08-
| disk_format | qcow2 |
| id | e20fae04-
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-
| owner | 6880ca...
| Flavio Percoco (flaper87) wrote : | #5 |
This might be related to https:/
I'll keep looking into it
| Emilien Macchi (emilienm) wrote : | #6 |
So I don't have the issue in RDO trunk right now (Liberty).
See output:
FailedConsole Output
2015-08-25 13:07:01.721 | Started by user anonymous
2015-08-25 13:07:01.722 | [EnvInject] - Loading node environment variables.
2015-08-25 13:07:05.546 | Building remotely on devstack-
2015-08-25 13:07:06.133 | [gate-puppet-
2015-08-25 13:07:06.813 | Detailed logs: http://
2015-08-25 13:07:07.168 | [gate-puppet-
2015-08-25 13:07:07.480 | INFO:zuul.
2015-08-25 13:07:07.480 | INFO:zuul.
2015-08-25 13:07:07.480 | INFO:zuul.
2015-08-25 13:07:07.480 | INFO:zuul.
2015-08-25 13:07:07.480 | INFO:zuul.
2015-08-25 13:07:07.481 | INFO:zuul.
2015-08-25 13:07:07.528 | INFO:zuul.
2015-08-25 13:07:07.936 | INFO:zuul.
2015-08-25 13:07:08.411 | INFO:zuul.
2015-08-25 13:07:08.411 | INFO:zuul.
2015-08-25 13:07:08.615 | [gate-puppet-
2015-08-25 13:07:08.621 | + cd openstack/
2015-08-25 13:07:08.621 | + mkdir .bundled_gems
2015-08-25 13:07:08.622 | ++ pwd
2015-08-25 13:07:08.622 | + export GEM_HOME=
2015-08-25 13:07:08.622 | + GEM_HOME=
2015-08-25 13:07:08.622 | + gem install bundler --no-rdoc --no-ri --verbose
2015-08-25 13:07:10.489 | GET https:/
2015-08-25 13:07:10.489 | 302 Moved Temporarily
2015-08-25 13:07:10.489 | GET https:/
2015-08-25 13:07:10.489 | 200 OK
2015-08-25 13:07:10.489 | GET https:/
2015-08-25 13:07:10.489 | 302 Moved Temporarily
2015-08-25 13:07:10.489 | GET https:/
2015-08-25 13:07:10.490 | 200 O...
| Emilien Macchi (emilienm) wrote : | #7 |
I'm sorry for my last comment, the copy/paste was not supposed to be so huge.
My bad again, next time I'll use pastebin.
| Emilien Macchi (emilienm) wrote : | #8 |
I have the same issue on Trusty:
2015-08-25 13:27:09.091 | + glance --version
2015-08-25 13:27:09.560 | 0.19.0
2015-08-25 13:27:09.561 | + openstack --os-username glance --os-password a_big_secret --os-tenant-name services --os-auth-url http://
2015-08-25 13:27:16.271 | +------
2015-08-25 13:27:16.272 | | ID | Name |
2015-08-25 13:27:16.272 | +------
2015-08-25 13:27:16.272 | | 86a62ccc-
2015-08-25 13:27:16.273 | | ec3680e0-
2015-08-25 13:27:16.273 | +------
2015-08-25 13:27:16.275 | ++ openstack --os-username glance --os-password a_big_secret --os-tenant-name services --os-auth-url http://
2015-08-25 13:27:16.276 | ++ grep cirros_alt
2015-08-25 13:27:16.277 | ++ awk '{print $2}'
2015-08-25 13:27:20.275 | + ID=86a62ccc-
2015-08-25 13:27:20.275 | + openstack --os-username glance --os-password a_big_secret --os-tenant-name services --os-auth-url http://
2015-08-25 13:27:20.276 | +------
2015-08-25 13:27:20.276 | | Field | Value |
2015-08-25 13:27:20.276 | +------
2015-08-25 13:27:20.276 | | properties | {} |
2015-08-25 13:27:20.277 | +------
| no longer affects: | ubuntu |
| Changed in python-glanceclient (Ubuntu): | |
| status: | New → Confirmed |
| tags: | added: 1.0.0-potential |
| Changed in python-glanceclient: | |
| importance: | Undecided → Critical |
| assignee: | nobody → David (dsariel) |
| Changed in python-glanceclient: | |
| status: | Confirmed → In Progress |
| James Page (james-page) wrote : | #9 |
Confirmed for liberty-staging PPA; I tested with just upgrading glanceclient (which worked OK) and then picking up all of the dependency bumps - at which point I get 'id' back for image-show.
Looks likely this is a requests/urllib3 type problem
| Changed in python-glanceclient (Ubuntu): | |
| importance: | Undecided → High |
| James Page (james-page) wrote : | #10 |
Downgrading urllib3 to 1.10.4 resolves the problem; but we do need to move forwards on identifying the root cause of this problem.
| Changed in python-glanceclient (Ubuntu): | |
| status: | Confirmed → Triaged |
| Launchpad Janitor (janitor) wrote : | #11 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in python-urllib3 (Ubuntu): | |
| status: | New → Confirmed |
| Changed in requests (Ubuntu): | |
| status: | New → Confirmed |
| Ian Cordasco (icordasc) wrote : | #13 |
The cause is the following:
- oslo.vmware requires urllib3 and if that requirement is uncapped, it installs 1.11
- no one tends to install over the default system python-requests which is 2.2.1
- for an unexplained reason, urllib3 1.11 and requests 2.2.1 do not mix nor will they mix (I'm not going to dig into why urllib3 1.11 broke requests 2.2.1 because 2.2.1 is absolutely ancient)
The solutions:
- install a version of requests from this year
- cap urllib3
| Changed in python-glanceclient: | |
| status: | In Progress → Invalid |
| James Page (james-page) wrote : | #14 |
even the latest version of requests (2.7.0) does not support urllib3 1.11, so for Ubuntu/Debian this does not resolve the problem - I've spoken with upstream requests to see if we can get a patch to resolve this for the 2.7.0/1.11 combination we have right now.
For upstream development, capping the urllib3 version requirement makes sense until requests releases a version that supports 1.11.
| Changed in python-urllib3 (Ubuntu): | |
| importance: | Undecided → High |
| Changed in requests (Ubuntu): | |
| status: | Confirmed → Triaged |
| Changed in python-urllib3 (Ubuntu): | |
| status: | Confirmed → Triaged |
| Changed in requests (Ubuntu): | |
| importance: | Undecided → High |
| James Page (james-page) wrote : | #15 |
Looking at https:/
| Changed in python-glanceclient: | |
| status: | Invalid → New |
| Changed in python-urllib3 (Ubuntu): | |
| status: | Triaged → Invalid |
| Changed in python-glanceclient (Ubuntu): | |
| status: | Triaged → In Progress |
| assignee: | nobody → James Page (james-page) |
| Changed in requests (Ubuntu): | |
| status: | Triaged → Invalid |
| James Page (james-page) wrote : | #16 |
Hooking things up - https:/
This fix is required for compatibility with urllib3 >= 1.11
| Changed in python-glanceclient: | |
| status: | New → In Progress |
| Launchpad Janitor (janitor) wrote : | #17 |
This bug was fixed in the package python-glanceclient - 1:0.19.0-1ubuntu2
---------------
python-glanceclient (1:0.19.0-1ubuntu2) wily; urgency=medium
* d/p/urllib3-
>= 1.11 (LP: #1487645).
* d/p/mock-
resolving FTBFS.
-- James Page <email address hidden> Tue, 08 Sep 2015 12:01:58 +0100
| Changed in python-glanceclient (Ubuntu): | |
| status: | In Progress → Fix Released |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit 2c7da7cb6077b89
Author: David Sariel <email address hidden>
Date: Wed Sep 2 14:48:17 2015 +0300
Invalid output running the command 'glance image-show <image_id>'
Running the command returns the string 'id' and fails on exception.
In function _image_
set because key was not lowercased. Converting key to lowercase solves
the problem.
NOTE: this is a compatibility fix for urllib3 >= 1.11
Closes-Bug: #1487645
Co-Authored-by: Flavio Percoco <email address hidden>
Change-Id: I1b0b3271635775
| Changed in python-glanceclient: | |
| status: | In Progress → Fix Committed |
| Changed in python-glanceclient: | |
| milestone: | none → 1.1.0 |
| status: | Fix Committed → Fix Released |
Fix proposed to branch: stable/kilo
Review: https:/
| OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-glanceclient (stable/kilo) | #20 |
Change abandoned by Rawlin Peters (<email address hidden>) on branch: stable/kilo
Review: https:/


Status changed to 'Confirmed' because the bug affects multiple users.