← Back to team overview

openstack team mailing list archive

Re: Nova command line versus Euca2ools

 

The sweet smell of success...

Looking closely at my api-paste.ini file, and comparing to Kiall's (ManagediT) templates, I noticed that I had my authorization pipelines setup wrong.  So I corrected these errors and now all nova client commands seem to execute with no problem.  Additionally, dashboard and euca2ools now seems to be working without any errors. It's a beautiful thing!

Now a question.  My network/installation is setup to isolate nova-compute traffic on a private network.  Should endpointTemplates be setup to specify the private network URL for "Internal URL" field of the template?  My guess is yes, but thought I'd ask anyways.

Now, on to configuring Swift.

Thanks for everyone's patience and help.  And thanks again to Kiall for figuring all this out and leading the way.

Regards,
Ross

On Feb 6, 2012, at 5:09 PM, Michael J Fork wrote:

Can you verify your glance endpointTemplate is http://%HOST_IP%:9292/v1<http://%host_ip%:9292/v1> ?  Hard to tell from the trace below if the "v1.1/1/images/detail" is against the Nova API or Glance API.

Michael

-------------------------------------------------
Michael Fork
Cloud Architect, Emerging Solutions
IBM Systems & Technology Group



From:        Lillie Ross-CDSR11 <Ross.Lillie@xxxxxxxxxxxxxxxxxxxxx<mailto:Ross.Lillie@xxxxxxxxxxxxxxxxxxxxx>>
To:        "openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>" <openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>>
Date:        02/06/2012 05:41 PM
Subject:        [Openstack] Nova command line versus Euca2ools
Sent by:        openstack-bounces+mjfork=us.ibm.com@xxxxxxxxxxxxxxxxxxx<mailto:openstack-bounces+mjfork=us.ibm.com@xxxxxxxxxxxxxxxxxxx>
________________________________



I currently have OpenStack installed (using the ManagedIT PPA) to use Keystone for authentication.  However I'm still receiving a number of "Malformed request URL" messages, both in Dashboard as well as when using the Nova command line client.  Also, some of the Euca2ools command run OK, others (such as euca-describe-images) don't.  I'm aware that not all the Euca commands are supported in Diablo, but currently I don't have any commands that let me launch instances.

For example:  euca-describe-availability-zones verbose yields

root@nova:~# euca-describe-availability-zones verbose
AVAILABILITYZONE nova available
AVAILABILITYZONE |- nova
AVAILABILITYZONE | |- nova-network enabled :-) 2012-02-06 22:15:16
AVAILABILITYZONE | |- nova-scheduler enabled :-) 2012-02-06 22:15:15
AVAILABILITYZONE | |- nova-vncproxy enabled :-) 2012-02-06 22:15:14
AVAILABILITYZONE | |- nova-compute enabled :-) 2012-02-06 22:15:07
AVAILABILITYZONE |- nova1
AVAILABILITYZONE | |- nova-compute enabled :-) 2012-02-06 22:15:08

however, euca-describe-images yields (with debug enabled)

root@nova:~# euca-describe-images --debug
2012-02-06 16:16:28,289 euca2ools [DEBUG]:Method: POST
2012-02-06 16:16:28,289 euca2ools [DEBUG]:Path: /services/Cloud/
2012-02-06 16:16:28,289 euca2ools [DEBUG]:Data:
2012-02-06 16:16:28,289 euca2ools [DEBUG]:Headers: {}
2012-02-06 16:16:28,290 euca2ools [DEBUG]:Host: 173.23.181.1:8773
2012-02-06 16:16:28,290 euca2ools [DEBUG]:establishing HTTP connection: kwargs={}
2012-02-06 16:16:28,290 euca2ools [DEBUG]:using _calc_signature_2
2012-02-06 16:16:28,290 euca2ools [DEBUG]:query string: AWSAccessKeyId=admin%3Aadmin&Action=DescribeImages&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-02-06T22%3A16%3A28Z&Version=2010-08-31
2012-02-06 16:16:28,290 euca2ools [DEBUG]:string_to_sign: POST
173.23.181.1:8773
/services/Cloud/
AWSAccessKeyId=admin%3Aadmin&Action=DescribeImages&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-02-06T22%3A16%3A28Z&Version=2010-08-31
2012-02-06 16:16:28,290 euca2ools [DEBUG]:len(b64)=44
2012-02-06 16:16:28,290 euca2ools [DEBUG]:base64 encoded digest: vSajubq/uXVIsFyMiUjxViprJ1zYHPpIONPcW5cN5yI=
2012-02-06 16:16:28,290 euca2ools [DEBUG]:query_string: AWSAccessKeyId=admin%3Aadmin&Action=DescribeImages&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-02-06T22%3A16%3A28Z&Version=2010-08-31 Signature: vSajubq/uXVIsFyMiUjxViprJ1zYHPpIONPcW5cN5yI=
send: 'POST /services/Cloud/ HTTP/1.1\r\nHost: 173.23.181.1:8773\r\nAccept-Encoding: identity\r\nContent-Length: 207\r\nContent-Type: application/x-www-form-urlencoded; charset=UTF-8\r\nUser-Agent: Boto/2.0 (linux2)\r\n\r\nAWSAccessKeyId=admin%3Aadmin&Action=DescribeImages&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-02-06T22%3A16%3A28Z&Version=2010-08-31&Signature=vSajubq/uXVIsFyMiUjxViprJ1zYHPpIONPcW5cN5yI%3D'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Content-Type: text/xml
header: Content-Length: 239
header: Date: Mon, 06 Feb 2012 22:16:28 GMT
2012-02-06 16:16:28,299 euca2ools [DEBUG]:<?xml version="1.0"?>
<Response><Errors><Error><Code>UnknownError</Code><Message>An unknown error has occurred. Please try your request again.</Message></Error></Errors><RequestID>b7f94f66-d309-4dcf-bc5f-c6aa5a09a83a</RequestID></Response>
2012-02-06 16:16:28,299 euca2ools [ERROR]:400 Bad Request
2012-02-06 16:16:28,300 euca2ools [ERROR]:<?xml version="1.0"?>
<Response><Errors><Error><Code>UnknownError</Code><Message>An unknown error has occurred. Please try your request again.</Message></Error></Errors><RequestID>b7f94f66-d309-4dcf-bc5f-c6aa5a09a83a</RequestID></Response>
UnknownError: An unknown error has occurred. Please try your request again.

The corresponding nova command yields the following (again with debug enabled)

root@nova:~# nova --debug image-list
connect: (173.23.181.1, 5000)
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 173.23.181.1:5000\r\nContent-Length: 100\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\nuser-agent: python-novaclient\r\n\r\n{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "admin"}}}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json; charset=UTF-8
header: Content-Length: 1007
header: Date: Mon, 06 Feb 2012 22:19:52 GMT
connect: (173.23.181.1, 8774)
send: u'GET /v1.1/1/images/detail HTTP/1.1\r\nHost: 173.23.181.1:8774\r\nx-auth-project-id: admin\r\nx-auth-token: 10111213141516171819\r\naccept-encoding: gzip, deflate\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Content-Length: 65
header: Content-Type: application/json; charset=UTF-8
header: Date: Mon, 06 Feb 2012 22:19:52 GMT
Traceback (most recent call last):
  File "/usr/bin/nova", line 9, in <module>
    load_entry_point('python-novaclient==2012.1', 'console_scripts', 'nova')()
  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 353, in main
    OpenStackComputeShell().main(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 304, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line 312, in do_image_list
    image_list = cs.images.list()
  File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/images.py", line 45, in list
    return self._list("/images/detail", "images")
  File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 69, in _list
    resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 130, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 118, in _cs_request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 101, in request
    raise exceptions.from_response(resp, body)
novaclient.exceptions.BadRequest: Malformed request url (HTTP 400)

As mentioned, these error carry over to the Dashboard application.

Interestingly, I can create keypairs and create/modify security groups with no problems (using the Euca commands).  None of the nova client commands execute without reporting a malformed URL request.

What am I missing today?  I've checked keystone endpointTemplates (they're correct).  The debug trace above shows that the request is authenticating w/ keystone correctly.  Also, the request URI for the subsequent GET appear correct (to me, at least).

Finally, should the EC2/Euca commands work and support starting and stopping instances when using Keystone with Diablo?  Life seemed so much easier before I decided to integrate keystone into my setup.  Sigh…

Thanks in advance for any help or insight you might be able to provide.  Additional details can be furnished as needed.

Regards,
Ross
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@xxxxxxxxxxxxxxxxxxx<mailto:openstack@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp



Follow ups

References