<font size=2 face="sans-serif">Can you verify your glance endpointTemplate
is</font><font size=1 color=#2f2f2f face="Courier New"> </font><a href=http://%host_ip%:9292/v1><font size=1 color=#2f2f2f face="Courier New">http://%HOST_IP%:9292/v1</font></a><font size=1 color=#2f2f2f face="Courier New">
</font><font size=2 face="sans-serif">?  Hard to tell from the trace
below if the "v1.1/1/images/detail" is against the Nova API or
Glance API.</font>
<br><font size=2 face="sans-serif"><br>
Michael<br>
<br>
-------------------------------------------------<br>
Michael Fork<br>
Cloud Architect, Emerging Solutions<br>
IBM Systems & Technology Group</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:      
 </font><font size=1 face="sans-serif">Lillie Ross-CDSR11
<Ross.Lillie@motorolasolutions.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:      
 </font><font size=1 face="sans-serif">"openstack@lists.launchpad.net"
<openstack@lists.launchpad.net></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:      
 </font><font size=1 face="sans-serif">02/06/2012 05:41 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:    
   </font><font size=1 face="sans-serif">[Openstack]
Nova command line versus Euca2ools</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:    
   </font><font size=1 face="sans-serif">openstack-bounces+mjfork=us.ibm.com@lists.launchpad.net</font>
<br>
<hr noshade>
<br>
<br>
<br><font size=3>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. </font>
<br>
<br><font size=3>For example:  euca-describe-availability-zones verbose
yields</font>
<br>
<br><font size=3 face="Courier">root@nova:~# euca-describe-availability-zones
verbose</font>
<br><font size=3 face="Courier">AVAILABILITYZONE nova available</font>
<br><font size=3 face="Courier">AVAILABILITYZONE |- nova </font>
<br><font size=3 face="Courier">AVAILABILITYZONE | |- nova-network enabled
:-) 2012-02-06 22:15:16</font>
<br><font size=3 face="Courier">AVAILABILITYZONE | |- nova-scheduler enabled
:-) 2012-02-06 22:15:15</font>
<br><font size=3 face="Courier">AVAILABILITYZONE | |- nova-vncproxy enabled
:-) 2012-02-06 22:15:14</font>
<br><font size=3 face="Courier">AVAILABILITYZONE | |- nova-compute enabled
:-) 2012-02-06 22:15:07</font>
<br><font size=3 face="Courier">AVAILABILITYZONE |- nova1 </font>
<br><font size=3 face="Courier">AVAILABILITYZONE | |- nova-compute enabled
:-) 2012-02-06 22:15:08</font>
<br>
<br><font size=3>however, euca-describe-images yields (with debug enabled)</font>
<br>
<br><font size=3 face="Courier">root@nova:~# euca-describe-images --debug</font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,289 euca2ools [DEBUG]:Method:
POST</font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,289 euca2ools [DEBUG]:Path:
/services/Cloud/</font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,289 euca2ools [DEBUG]:Data:
</font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,289 euca2ools [DEBUG]:Headers:
{}</font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,290 euca2ools [DEBUG]:Host:
173.23.181.1:8773</font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,290 euca2ools [DEBUG]:establishing
HTTP connection: kwargs={}</font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,290 euca2ools [DEBUG]:using
_calc_signature_2</font>
<br><font size=3 face="Courier">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</font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,290 euca2ools [DEBUG]:string_to_sign:
POST</font>
<br><font size=3 face="Courier">173.23.181.1:8773</font>
<br><font size=3 face="Courier">/services/Cloud/</font>
<br><font size=3 face="Courier">AWSAccessKeyId=admin%3Aadmin&Action=DescribeImages&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-02-06T22%3A16%3A28Z&Version=2010-08-31</font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,290 euca2ools [DEBUG]:len(b64)=44</font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,290 euca2ools [DEBUG]:base64
encoded digest: vSajubq/uXVIsFyMiUjxViprJ1zYHPpIONPcW5cN5yI=</font>
<br><font size=3 face="Courier">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=</font>
<br><font size=3 face="Courier">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'</font>
<br><font size=3 face="Courier">reply: 'HTTP/1.1 400 Bad Request\r\n'</font>
<br><font size=3 face="Courier">header: Content-Type: text/xml</font>
<br><font size=3 face="Courier">header: Content-Length: 239</font>
<br><font size=3 face="Courier">header: Date: Mon, 06 Feb 2012 22:16:28
GMT</font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,299 euca2ools [DEBUG]:<?xml
version="1.0"?></font>
<br><font size=3 face="Courier"><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></font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,299 euca2ools [ERROR]:400
Bad Request</font>
<br><font size=3 face="Courier">2012-02-06 16:16:28,300 euca2ools [ERROR]:<?xml
version="1.0"?></font>
<br><font size=3 face="Courier"><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></font>
<br><font size=3 face="Courier">UnknownError: An unknown error has occurred.
Please try your request again.</font>
<br>
<br><font size=3>The corresponding nova command yields the following (again
with debug enabled)</font>
<br>
<br><font size=3 face="Courier">root@nova:~# nova --debug image-list</font>
<br><font size=3 face="Courier">connect: (173.23.181.1, 5000)</font>
<br><font size=3 face="Courier">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"}}}'</font>
<br><font size=3 face="Courier">reply: 'HTTP/1.1 200 OK\r\n'</font>
<br><font size=3 face="Courier">header: Content-Type: application/json;
charset=UTF-8</font>
<br><font size=3 face="Courier">header: Content-Length: 1007</font>
<br><font size=3 face="Courier">header: Date: Mon, 06 Feb 2012 22:19:52
GMT</font>
<br><font size=3 face="Courier">connect: (173.23.181.1, 8774)</font>
<br><font size=3 face="Courier">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'</font>
<br><font size=3 face="Courier">reply: 'HTTP/1.1 400 Bad Request\r\n'</font>
<br><font size=3 face="Courier">header: Content-Length: 65</font>
<br><font size=3 face="Courier">header: Content-Type: application/json;
charset=UTF-8</font>
<br><font size=3 face="Courier">header: Date: Mon, 06 Feb 2012 22:19:52
GMT</font>
<br><font size=3 face="Courier">Traceback (most recent call last):</font>
<br><font size=3 face="Courier">  File "/usr/bin/nova",
line 9, in <module></font>
<br><font size=3 face="Courier">    load_entry_point('python-novaclient==2012.1',
'console_scripts', 'nova')()</font>
<br><font size=3 face="Courier">  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py",
line 353, in main</font>
<br><font size=3 face="Courier">    OpenStackComputeShell().main(sys.argv[1:])</font>
<br><font size=3 face="Courier">  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py",
line 304, in main</font>
<br><font size=3 face="Courier">    args.func(self.cs, args)</font>
<br><font size=3 face="Courier">  File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py",
line 312, in do_image_list</font>
<br><font size=3 face="Courier">    image_list = cs.images.list()</font>
<br><font size=3 face="Courier">  File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/images.py",
line 45, in list</font>
<br><font size=3 face="Courier">    return self._list("/images/detail",
"images")</font>
<br><font size=3 face="Courier">  File "/usr/lib/python2.7/dist-packages/novaclient/base.py",
line 69, in _list</font>
<br><font size=3 face="Courier">    resp, body = self.api.client.get(url)</font>
<br><font size=3 face="Courier">  File "/usr/lib/python2.7/dist-packages/novaclient/client.py",
line 130, in get</font>
<br><font size=3 face="Courier">    return self._cs_request(url,
'GET', **kwargs)</font>
<br><font size=3 face="Courier">  File "/usr/lib/python2.7/dist-packages/novaclient/client.py",
line 118, in _cs_request</font>
<br><font size=3 face="Courier">    **kwargs)</font>
<br><font size=3 face="Courier">  File "/usr/lib/python2.7/dist-packages/novaclient/client.py",
line 101, in request</font>
<br><font size=3 face="Courier">    raise exceptions.from_response(resp,
body)</font>
<br><font size=3 face="Courier">novaclient.exceptions.BadRequest: Malformed
request url (HTTP 400)</font>
<br>
<br><font size=3>As mentioned, these error carry over to the Dashboard
application.  </font>
<br>
<br><font size=3>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.</font>
<br>
<br><font size=3>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).</font>
<br>
<br><font size=3>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…</font>
<br>
<br><font size=3>Thanks in advance for any help or insight you might be
able to provide.  Additional details can be furnished as needed.</font>
<br>
<br><font size=3>Regards,</font>
<br><font size=3>Ross</font>
<br><tt><font size=2>_______________________________________________<br>
Mailing list: </font></tt><a href=https://launchpad.net/~openstack><tt><font size=2>https://launchpad.net/~openstack</font></tt></a><tt><font size=2><br>
Post to     : openstack@lists.launchpad.net<br>
Unsubscribe : </font></tt><a href=https://launchpad.net/~openstack><tt><font size=2>https://launchpad.net/~openstack</font></tt></a><tt><font size=2><br>
More help   : </font></tt><a href=https://help.launchpad.net/ListHelp><tt><font size=2>https://help.launchpad.net/ListHelp</font></tt></a><tt><font size=2><br>
</font></tt>
<br>