Unauthorized error when downloading cirros image

Bug #1415242 reported by Evgeny Bagdasaryan
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
devstack
New
Undecided
Fabien Boucher

Bug Description

We have cirros image downloading from our server, but after this commit (https://review.openstack.org/#/c/142967/), we started getting this:

+ '[' -n /home/localadmin/devstack/files/images/cirros-0.3.3-x86_64-uec/cirros-0.3.3-x86_64-vmlinuz ']'
[192.168.70.2] out: 2015-01-27 15:02:53.236 | ++ openstack --os-token b9ff99f0ac8d48cdbd745b1cbcf49e0e --os-url http://192.168.70.2:9292 image create cirros-0.3.3-x86_64-uec-kernel --public --container-format aki --disk-format aki
[192.168.70.2] out: 2015-01-27 15:02:53.236 | ++ grep ' id '
[192.168.70.2] out: 2015-01-27 15:02:53.237 | ++ get_field 2
[192.168.70.2] out: 2015-01-27 15:02:53.237 | ++ local data field
[192.168.70.2] out: 2015-01-27 15:02:53.237 | ++ read data
[192.168.70.2] out: 2015-01-27 15:02:57.988 | WARNING: urllib3.connectionpool HttpConnectionPool is full, discarding connection: 192.168.70.2
[192.168.70.2] out: 2015-01-27 15:02:57.988 | ERROR: openstack <html>
[192.168.70.2] out: 2015-01-27 15:02:57.988 | <head>
[192.168.70.2] out: 2015-01-27 15:02:57.988 | <title>500 Internal Server Error</title>
[192.168.70.2] out: 2015-01-27 15:02:57.988 | </head>
[192.168.70.2] out: 2015-01-27 15:02:57.988 | <body>
[192.168.70.2] out: 2015-01-27 1
Warning: run() received nonzero return code 1 while executing './stack.sh'!

5:02:57.988 | <h1>500 Internal Server Error</h1>
[192.168.70.2] out: 2015-01-27 15:02:57.988 | Failed to upload image 28d9e611-4724-4ada-b1c0-71bf38d14154<br /><br />
[192.168.70.2] out: 2015-01-27 15:02:57.988 |
[192.168.70.2] out: 2015-01-27 15:02:57.988 | </body>
[192.168.70.2] out: 2015-01-27 15:02:57.988 | </html> (HTTP 500)
[192.168.70.2] out: 2015-01-27 15:02:58.017 | + kernel_id=
[192.168.70.2] out: 2015-01-27 15:02:58.018 | + '[' -n /home/localadmin/devstack/files/images/cirros-0.3.3-x86_64-uec/cirros-0.3.3-x86_64-initrd ']'

g-api.log

2015-01-27 15:02:56.114 19908 TRACE swiftclient Traceback (most recent call last):
2015-01-27 15:02:56.114 19908 TRACE swiftclient File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1243, in _retry
2015-01-27 15:02:56.114 19908 TRACE swiftclient rv = func(self.url, self.token, *args, **kwargs)
2015-01-27 15:02:56.114 19908 TRACE swiftclient File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 685, in head_container
2015-01-27 15:02:56.114 19908 TRACE swiftclient http_response_content=body)
2015-01-27 15:02:56.114 19908 TRACE swiftclient ClientException: Container HEAD failed: http://192.168.70.2:8080/v1/AUTH_0a4871088f5743b0adb062ae01b37305/glance 404 Not Found
2015-01-27 15:02:56.114 19908 TRACE swiftclient
2015-01-27 15:02:56.115 19908 INFO glance_store._drivers.swift.store [44a33fa0-633c-4fa6-9fa3-7786d88c7a89 df613b537d724a24baf9abcfff6c58a6 af0cd4c33ea94b4796e5a319d83923f6 - - -] Creating swift container glance
2015-01-27 15:02:56.122 19908 INFO swiftclient [44a33fa0-633c-4fa6-9fa3-7786d88c7a89 df613b537d724a24baf9abcfff6c58a6 af0cd4c33ea94b4796e5a319d83923f6 - - -] REQ: curl -i http://192.168.70.2:8080/v1/AUTH_0a4871088f5743b0adb062ae01b37305/glance -X PUT -H "Content-Length: 0" -H "X-Auth-Token: 3032e9dbea234b6eb736c03efc7f1e08"
2015-01-27 15:02:56.123 19908 INFO swiftclient [44a33fa0-633c-4fa6-9fa3-7786d88c7a89 df613b537d724a24baf9abcfff6c58a6 af0cd4c33ea94b4796e5a319d83923f6 - - -] RESP STATUS: 401 Unauthorized

Tags: unauthorized
Revision history for this message
Evgeny Bagdasaryan (ebagdasa) wrote :

Also after end of installation, when I execute this command manually after obtaining token key
"openstack --os-url http://192.168.70.2:9292 image create cirros-0.3.3-x86_64-uec-kernel --public --container-format aki --disk-format aki"
Everything works, it just doesn't work during install.

summary: - Unaauthorized error when downloading cirros image
+ Unauthorized error when downloading cirros image
Revision history for this message
Fabien Boucher (fabien-boucher) wrote :

Hi, I got the same error especially when I activate Swift+Glance. I discovered on my devstack that the Swift proxy configuration
is broken and then Swift cannot verify users token. I fact it was unable to do at least a "swift stat". I think Glance uses Swift as
store so during the devstack stack.sh the image registration fails when the glance server handles the registration request due to Swift 401 the Glance request.

In the proxy-server.conf of swift, auth_host and admin_password are not properly configured ...
I provided a patch to fix that on Gerrit. With that patch it works for me.

https://review.openstack.org/#/c/151204/

Changed in devstack:
assignee: nobody → Fabien Boucher (fabien-boucher)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on devstack (master)

Change abandoned by Fabien Boucher (<email address hidden>) on branch: master
Review: https://review.openstack.org/151204
Reason: Handled by https://review.openstack.org/#/c/151506/2/lib/swift

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.