Configuring Nova to use Glance

Asked by Chau Pham

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.0.31", "REMOTE_ADDR": "192.168.0.31", "wsgi.url_scheme": "http", "SERVER_PORT": "8773", "GATEWAY_INTERFACE": "CGI/1.1", "HTTP_ACCEPT_ENCODING": "identity"}
2011-09-19 16:29:23,087 ERROR nova.api [JBUDYSLATZYQ-FD0LJKP chaupv myproject] UnknownError: An unknown error has occurred. Please try your request again.
2011-09-19 16:29:23,087 INFO nova.api [JBUDYSLATZYQ-FD0LJKP chaupv myproject] 0.438615s 192.168.0.31 GET /services/Cloud/ CloudController:DescribeImages 400 [Boto/1.9b (linux2)] text/plain text/xml

---------------------------------------------------------------------------------------------

Could anyone please help me?

Thank You

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Chau Pham
Solved:
Last query:
Last reply:
Revision history for this message
Dan Prince (dan-prince) said :
#1

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.

Revision history for this message
Chau Pham (chaupv79) said :
#2

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?

Revision history for this message
Dan Prince (dan-prince) said :
#3

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.

Revision history for this message
Chau Pham (chaupv79) said :
#4

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?

Revision history for this message
Chau Pham (chaupv79) said :
#5

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....

Revision history for this message
Chau Pham (chaupv79) said :
#6

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

This guideline recommended to to use --glance_api_server.

Revision history for this message
scarroy (scarroy) said :
#7

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

Steve