Ask Your Question
0

glance image upload fails during installation

asked 2012-04-09 19:22:27 -0500

sumit-sngpt gravatar image

When I install openstack including glance using devstack on RHEL6, I get following error. It looks like the auth-token from keystone which glance uses as its option has some issues. Any idea ?

ERROR: @devstack.image.uploader : Installing 'http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-uec.tar.gz' failed due to: None Command: glance -A 03fbad35089b4f5684667b237421f76e details Exit code: 1 Stdout: 'Failed to show details. Got error:\nAn object with the specified identifier was not found.\nDetails: 404 Not Found\n\nThe resource could not be found.\n\n \n' Stderr: '' Traceback (most recent call last): File "/home/sumitsen/DevstackPy/devstack/image/uploader.py", line 372, in install name = Image(uri, token).install() File "/home/sumitsen/DevstackPy/devstack/image/uploader.py", line 245, in install if self._registry.has_image(name): File "/home/sumitsen/DevstackPy/devstack/image/uploader.py", line 296, in has_image return image in self.get_image_names() File "/home/sumitsen/DevstackPy/devstack/image/uploader.py", line 299, in get_image_names self._load() File "/home/sumitsen/DevstackPy/devstack/image/uploader.py", line 289, in _load res = utils.execute_template(cmd, params=params) File "/home/sumitsen/DevstackPy/devstack/utils.py", line 130, in execute_template **kargs) File "/home/sumitsen/DevstackPy/devstack/shell.py", line 183, in execute stderr=stderr, cmd=str_cmd) ProcessExecutionError: None Command: glance -A 03fbad35089b4f5684667b237421f76e details Exit code: 1 Stdout: 'Failed to show details. Got error:\nAn object with the specified identifier was not found.\nDetails: 404 Not Found\n\nThe resource could not be found.\n\n \n' Stderr: ''

edit retag flag offensive close merge delete

8 answers

Sort by ยป oldest newest most voted
0

answered 2012-04-10 07:05:19 -0500

zhonghuabaima0913 gravatar image

i also have this question.

edit flag offensive delete link more
0

answered 2012-04-12 13:54:58 -0500

sumit-sngpt gravatar image

Its not able to authenticate now. This has started throwing error since day before yesterday. Before it was working fine. This on RHEL6.2 machine.

[sumitsen@sorrygate-dr DevstackPy]$ curl -v -H "X-Auth-User: admin" -H "X-Auth-Key: openstack" http://localhost:35357/v2.0/tokens/3afca52edcb247f9b2bfc8bd524cb0f2 (http://localhost:35357/v2.0/tokens/3a...) * About to connect() to localhost port 35357 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 35357 (#0)

GET /v2.0/tokens/3afca52edcb247f9b2bfc8bd524cb0f2 HTTP/1.1 User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2 Host: localhost:35357 Accept: / X-Auth-User: admin X-Auth-Key: openstack

< HTTP/1.1 401 Not Authorized < Content-Type: application/json < Vary: X-Auth-Token < Content-Length: 116 < Date: Wed, 11 Apr 2012 11:12:20 GMT < * Connection #0 to host localhost left intact * Closing connection #0 {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Not Authorized"}}

edit flag offensive delete link more
0

answered 2012-04-12 14:01:41 -0500

jaypipes gravatar image

Hi Sumit,

What does this return? Please pastebin it. Thanks!

curl -v -X POST -H "X-Auth-User: <service_username>" -H "X-Auth-Key: <service_password>" http://<keystone_host>:5000/v2.0/tokens

edit flag offensive delete link more
0

answered 2012-04-13 03:33:21 -0500

gongysh gravatar image

To verify token by head option, the command should be:

#curl -H "X-Auth-Token:ADMIN" http://localhost:35357/v2.0/tokens/7e1d790f2e844b8296f9216928d3d2a7 (http://localhost:35357/v2.0/tokens/7e...)

where ADMIN is the admin_token defined in keystone.conf: [DEFAULT] #bind_host = 0.0.0.0 public_port = 5000 admin_port = 35357 admin_token = ADMIN

7e1d790f2e844b8296f9216928d3d2a7 is one we got when we auth a username and password.

Document is at http://keystone.openstack.org/api_curl_examples.html#id1 (http://keystone.openstack.org/api_cur...)

About run glance details, please set env: #for keystone client

export SERVICE_ENDPOINT=http://localhost:35357/v2.0 export SERVICE_TOKEN=ADMIN

#for nova client export NOVA_AUTH_STRATEGY=keystone export NOVA_USERNAME=admin export NOVA_PASSWORD=password export NOVA_PROJECT_ID=admin export NOVA_URL=http://localhost:35357/v2.0 export NOVA_VERSION=1.1

#for glance client export OS_AUTH_USER=admin export OS_AUTH_KEY=password export OS_AUTH_TENANT=admin export OS_AUTH_URL=http://localhost:35357/v2.0 export OS_AUTH_STRATEGY=keystone

and also make sure your glance is using keystone for auth. in glance-api.conf and glance-registry.conf: [paste_deploy] flavor = keystone

edit flag offensive delete link more
0

answered 2012-04-09 19:59:21 -0500

jaypipes gravatar image

If you do:

curl -v -H "X-Auth-User: <service_username>" -H "X-Auth-Key: <service_password>" http://<keystone_host>:35357/v2.0/tokens/03fbad35089b4f5684667b237421f76e

and replace with appropriate service user/password credentials, what is the response?

-jay

edit flag offensive delete link more
0

answered 2012-04-10 01:37:16 -0500

michael-lin gravatar image

I had the same question on ubuntu 11.10 and tried Jay's method to solve question, but it doesn't work :<

Any methods can solve this question, or it is a bug?

edit flag offensive delete link more
0

answered 2012-04-10 07:05:28 -0500

zhonghuabaima0913 gravatar image

i also have this question.

edit flag offensive delete link more
0

answered 2012-04-13 12:23:48 -0500

sumit-sngpt gravatar image

That's strange that when I restarted my machine everything started working fine including the glance error I stated.

Thanks all for your help!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-04-09 19:22:27 -0500

Seen: 118 times

Last updated: Apr 13 '12