Ask Your Question
0

Configuring Nova to use Glance

asked 2011-09-19 07:31:58 -0500

chaupv79 gravatar image

Hi everybody,

I have Nova and Glance installed in 2 separated Ubuntu 10.04 Lucid. they are working normally independently. but when i try to configure Nova to use Glance as a below ( In 2 last configuration lines in nova.conf)

--daemonize=1 --dhcpbridge_flagfile=/etc/nova/nova.conf --dhcpbridge=/usr/bin/nova-dhcpbridge --logdir=/var/log/nova --state_path=/var/lib/nova --verbose --libvirt_type=qemu --sql_connection=mysql://root:nova@192.168.0.31/nova --s3_host=192.168.0.31 --rabbit_host=192.168.0.31 --ec2_host=192.168.0.31 --ec2_url=http://192.168.0.31:8773/services/Cloud --fixed_range=10.0.0.0/12 --network_size=64 --num_networks=1 --FAKE_subdomain=ec2 --public_interface=eth0 --state_path=/var/lib/nova --lock_path=/var/lock/nova --glance_api_servers=192.168.0.15:9292 --image_service=nova.image.glance.GlanceImageService

my Glance server's IP address is 192.168.0.15 and Nova Machine's IP address is 192.168.0.31

after restart all service in Nova: nova-api, nova-objectstore, service nova-scheduler, nova-network, nova-compute

I try to use

"euca-describe-images"

=> error has occurs

UnknownError: An unknown error has occurred. Please try your request again.

some lines that caused of the error in the log file:

---------------- /var/log/nova/nova-api.log--------------------

2011-09-19 16:29:23,083 ERROR nova.api [JBUDYSLATZYQ-FD0LJKP chaupv myproject] Unexpected error raised: Unable to connect to server. Got error: [Errno 111] ECONNREFUSED (nova.api): TRACE: Traceback (most recent call last): (nova.api): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/ec2/__init__.py", line 321, in __call__ (nova.api): TRACE: result = api_request.invoke(context) (nova.api): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/ec2/apirequest.py", line 150, in invoke (nova.api): TRACE: result = method(context, **args) (nova.api): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/ec2/cloud.py", line 962, in describe_images (nova.api): TRACE: images = self.image_service.detail(context) (nova.api): TRACE: File "/usr/lib/pymodules/python2.6/nova/image/s3.py", line 72, in detail (nova.api): TRACE: return self.service.detail(context) (nova.api): TRACE: File "/usr/lib/pymodules/python2.6/nova/image/glance.py", line 78, in detail (nova.api): TRACE: image_metas = self.client.get_images_detailed() (nova.api): TRACE: File "/usr/lib/pymodules/python2.6/glance/client.py", line 210, in get_images_detailed (nova.api): TRACE: res = self.do_request("GET", "/images/detail") (nova.api): TRACE: File "/usr/lib/pymodules/python2.6/glance/client.py", line 167, in do_request (nova.api): TRACE: "server. Got error: %s" % e) (nova.api): TRACE: ClientConnectionError: Unable to connect to server. Got error: [Errno 111] ECONNREFUSED (nova.api): TRACE: 2011-09-19 16:29:23,087 ERROR nova.api [JBUDYSLATZYQ-FD0LJKP chaupv myproject] Environment: {"HTTP_AUTHORIZATION": "AWS 9dcb65d1-d6b1-4755-881e-529afc663489:myproject:mc+SWouXP6coYGpF4WBRJZNsKJc=", "CONTENT_TYPE": "text/plain", "SCRIPT_NAME": "/services/Cloud", "HTTP_DATE": "Mon, 19 Sep 2011 07:29:22 GMT", "REQUEST_METHOD": "GET", "HTTP_HOST": "192.168.0.31:8773", "PATH_INFO": "/", "SERVER_PROTOCOL": "HTTP/1.0", "QUERY_STRING": "AWSAccessKeyId=9dcb65d1-d6b1-4755-881e-529afc663489%3Amyproject&Action=DescribeImages&Owner.1=self&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2011-09-19T07%3A29%3A22&Version=2009-11-30&Signature=1LF6R5FBbE0zYxNNmkMQu8ymGuiY9K0NW%2B46EwRHJ2Q%3D", "CONTENT_LENGTH": "0", "HTTP_USER_AGENT": "Boto/1.9b (linux2)", "SERVER_NAME": "192.168 ... (more)

edit retag flag offensive close merge delete

7 answers

Sort by ยป oldest newest most voted
0

answered 2011-09-22 00:54:12 -0500

chaupv79 gravatar image

Hi Everybody,

I don't think the different python-glance version will make the error above.

please tell me if you have an idea.

Thank....

edit flag offensive delete link more
0

answered 2011-09-19 20:47:41 -0500

Can you check the version of python-glance on your nova node. It could be the glance client you are using doesn't match the version of the glance server.

dpkg -l python-glance

My guess would be that if you upgrade the glance client so that it more closely matches the revision on the glance server you will have a working setup.

edit flag offensive delete link more
0

answered 2011-09-21 02:57:37 -0500

chaupv79 gravatar image

Thank Dan,

My Nova node and Glance node have different python-glance version python-glance 2011.3 in Glance node and python-glance 2011.2 in Nova node.

Could you show me how to upgrade python-glance in Nova node without re-installing all thing?

edit flag offensive delete link more
0

answered 2011-09-21 03:15:09 -0500

If you are using the PPA's I think this would work:

apt-get update apt-get install python-glance

You could also specify an explicit version so it matches the glance node:

apt-get install python-glance=123.4.5

You might also be able to toss just the matching python-glance deb (obtained from the glance node) over onto the nova node and just install it locally as well.

edit flag offensive delete link more
0

answered 2011-09-21 03:58:20 -0500

chaupv79 gravatar image

Hi Dan,

I just updated python-glance to 2012.1 in both Nova and Glance nodes, I also restarted 2 those nodes to make sure all service are running.

Unfortunately, when I try the command below in terminal:

"euca-describle-images", the same error has occurred

UnknownError: An unknown error has occurred. Please try your request again.

Now, I sill not figure out what's happening.

Do you have another idea?

edit flag offensive delete link more
0

answered 2011-09-22 02:31:18 -0500

chaupv79 gravatar image

After digging hard, I have solved my problem as below

change nova.conf

--glance_api_servers=192.168.0.15:9292 --image_service=nova.image.glance.GlanceImageService

To:

--glance_host=192.168.0.15 --glance_port=9292 --image_service=nova.image.glance.GlanceImageService

It's so funny. when i take a look at http://docs.openstack.org/cactus/openstack-compute/admin/content/configuring-compute-to-use-glance.html (http://docs.openstack.org/cactus/open...)

This guideline recommended to to use --glance_api_server.

edit flag offensive delete link more
0

answered 2011-11-09 17:07:56 -0500

Thanks Chau - making those changes in the nova.conf worked!! I agree that the docs should be changed per your configuration.

Steve

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: 2011-09-19 07:31:58 -0500

Seen: 75 times

Last updated: Nov 09 '11