<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Ensure these environment variable is set correctly. My guess is that your environment variable must be pointing to a different project:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">export OS_USERNAME=Admin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">export OS_PASSWORD=secretword<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">export OS_TENANT_NAME=AdminProject<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">export OS_AUTH_URL=http://<keystoneIPaddress>:5000/v2.0/<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">export OS_AUTH_STRATEGY=keystone<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Clement Buisson [mailto:clement.buisson@lookout.com]
<br>
<b>Sent:</b> Wednesday, October 02, 2013 3:06 PM<br>
<b>To:</b> rvaknin@redhat.com<br>
<b>Cc:</b> openstack<br>
<b>Subject:</b> Re: [Openstack] "nova list" returns nothing<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi Rami,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">I checked in Nova DB and I can see all my instances there (select * from instances). On my compute nodes, I ran virsh list --all (got list for kvm instances) and pgrep kvm (got list of pids) and I got valid information about my instances.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I am also running these commands from the Nova-API server. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I tried your curl idea and here is the result:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">curl -i <a href="http://127.0.0.1:8774/v2/ebdee2cb697449c9a374c006a8c2701f/servers">
http://127.0.0.1:8774/v2/ebdee2cb697449c9a374c006a8c2701f/servers</a> -X GET -H "X-Auth-Project-Id: main" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 9b7d9b07f5b14793b1d24c5ca42bedd2"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">HTTP/1.1 200 OK<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">X-Compute-Request-Id: req-9847157c-9d54-42fc-b5d0-3d46be491ef6<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Content-Type: application/json<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Content-Length: 15<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Date: Wed, 02 Oct 2013 22:01:13 GMT<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">{"servers": []}<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">So weird that this array is returning empty data...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">nova-api must be confused! <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thoughts?<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Oct 2, 2013 at 12:37 PM, Rami Vaknin <<a href="mailto:rvaknin@redhat.com" target="_blank">rvaknin@redhat.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal">On 10/02/2013 09:35 PM, Clement Buisson wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p>Hello,<o:p></o:p></p>
<p>I am a Folsom user, I have been using the "nova list" command for a while until couple weeks ago.<br>
That command use to work just fine and one day it just stopped working.<br>
I can run the command but nothing will show up.<o:p></o:p></p>
<p>Here is the output of my command:<o:p></o:p></p>
<p>nova --debug list<o:p></o:p></p>
<p>REQ: curl -i <a href="http://127.0.0.1:8774/v2/ebdee2cb697449c9a374c006a8c2701f/servers/detail" target="_blank">
http://127.0.0.1:8774/v2/ebdee2cb697449c9a374c006a8c2701f/servers/detail</a> -X GET -H "X-Auth-Project-Id: main" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: f03bbc13f258473ab53399e3541a8e70"<o:p></o:p></p>
<p>connect: (127.0.0.1, 8774)<br>
send: u'GET /v2/ebdee2cb697449c9a374c006a8c2701f/servers/detail HTTP/1.1\r\nHost:
<a href="http://127.0.0.1:8774" target="_blank">127.0.0.1:8774</a>\r\nx-auth-project-id: main\r\nx-auth-token: f03bbc13f258473ab53399e3541a8e70\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'<br>
reply: 'HTTP/1.1 200 OK\r\n'<br>
header: X-Compute-Request-Id: req-002a752b-2f47-4cda-8f91-b9a822ef754b<br>
header: Content-Type: application/json<br>
header: Content-Length: 15<br>
header: Date: Thu, 26 Sep 2013 18:07:05 GMT<br>
RESP:{'status': '200', 'content-length': '15', 'content-location': u'<a href="http://127.0.0.1:8774/v2/ebdee2cb697449c9a374c006a8c2701f/servers/detail%27" target="_blank">http://127.0.0.1:8774/v2/ebdee2cb697449c9a374c006a8c2701f/servers/detail'</a>, 'x-compute-request-id':
 'req-002a752b-2f47-4cda-8f91-b9a822ef754b', 'date': 'Thu, 26 Sep 2013 18:07:05 GMT', 'content-type': 'application/json'} {"servers": []}<o:p></o:p></p>
<p>I also tried with the option "all-tenant":<o:p></o:p></p>
<p class="MsoNormal">nova --debug list --all-tenants<br>
<br>
REQ: curl -i <a href="http://127.0.0.1:8774/v2/ebdee2cb697449c9a374c006a8c2701f/servers/detail?all_tenants=1" target="_blank">
http://127.0.0.1:8774/v2/ebdee2cb697449c9a374c006a8c2701f/servers/detail?all_tenants=1</a> -X GET -H "X-Auth-Project-Id: main" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 9b7d9b07f5b14793b1d24c5ca42bedd2"<br>
connect: (127.0.0.1, 8774)<br>
send: u'GET /v2/ebdee2cb697449c9a374c006a8c2701f/servers/detail?all_tenants=1 HTTP/1.1\r\nHost:
<a href="http://127.0.0.1:8774" target="_blank">127.0.0.1:8774</a>\r\nx-auth-project-id: main\r\nx-auth-token: 9b7d9b07f5b14793b1d24c5ca42bedd2\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'<br>
reply: 'HTTP/1.1 200 OK\r\n'<br>
header: X-Compute-Request-Id: req-50e187e8-74b0-4342-a400-b364a61748e1<br>
header: Content-Type: application/json<br>
header: Content-Length: 15<br>
header: Date: Wed, 02 Oct 2013 18:32:44 GMT<br>
RESP:{'status': '200', 'content-length': '15', 'content-location': u'<a href="http://127.0.0.1:8774/v2/ebdee2cb697449c9a374c006a8c2701f/servers/detail?all_tenants=1" target="_blank">http://127.0.0.1:8774/v2/ebdee2cb697449c9a374c006a8c2701f/servers/detail?all_tenants=1</a>',
 'x-compute-request-id': 'req-50e187e8-74b0-4342-a400-b364a61748e1', 'date': 'Wed, 02 Oct 2013 18:32:44 GMT', 'content-type': 'application/json'} {"servers": []}
<o:p></o:p></p>
<p>Same thing with euca2ools:<o:p></o:p></p>
<p>euca-describe-instances --debug<o:p></o:p></p>
<p>2013-09-26 11:07:14,205 euca2ools [DEBUG]:Method: POST<br>
2013-09-26 11:07:14,205 euca2ools [DEBUG]:Path: /services/Cloud/<br>
2013-09-26 11:07:14,205 euca2ools [DEBUG]:Data:<br>
2013-09-26 11:07:14,205 euca2ools [DEBUG]:Headers: {}<br>
2013-09-26 11:07:14,205 euca2ools [DEBUG]:Host: <a href="http://127.0.0.1:8773" target="_blank">
127.0.0.1:8773</a><br>
2013-09-26 11:07:14,206 euca2ools [DEBUG]:establishing HTTP connection: kwargs={}<br>
2013-09-26 11:07:14,206 euca2ools [DEBUG]:Token: None<br>
2013-09-26 11:07:14,206 euca2ools [DEBUG]:using _calc_signature_2<br>
2013-09-26 11:07:14,206 euca2ools [DEBUG]:query string: AWSAccessKeyId=fbae4dab6bc045469c1f9f843d5d99b0&Action=DescribeInstances&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2013-09-26T18%3A07%3A14Z&Version=2010-08-31<br>
2013-09-26 11:07:14,206 euca2ools [DEBUG]:string_to_sign: POST<br>
<a href="http://127.0.0.1:8773" target="_blank">127.0.0.1:8773</a><br>
/services/Cloud/<br>
AWSAccessKeyId=fbae4dab6bc045469c1f9f843d5d99b0&Action=DescribeInstances&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2013-09-26T18%3A07%3A14Z&Version=2010-08-31<br>
2013-09-26 11:07:14,206 euca2ools [DEBUG]:len(b64)=44<br>
2013-09-26 11:07:14,206 euca2ools [DEBUG]:base64 encoded digest: aoAKyibiBwFSbMMiUiEivQCvF6o/Cf5E4yM82LN3LfI=<br>
2013-09-26 11:07:14,206 euca2ools [DEBUG]:query_string: AWSAccessKeyId=fbae4dab6bc045469c1f9f843d5d99b0&Action=DescribeInstances&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2013-09-26T18%3A07%3A14Z&Version=2010-08-31 Signature: aoAKyibiBwFSbMMiUiEivQCvF6o/Cf5E4yM82LN3LfI=<br>
send: 'POST /services/Cloud/ HTTP/1.1\r\nHost: <a href="http://127.0.0.1:8773" target="_blank">
127.0.0.1:8773</a>\r\nAccept-Encoding: identity\r\nContent-Length: 231\r\nContent-Type: application/x-www-form-urlencoded; charset=UTF-8\r\nUser-Agent: Boto/2.2.2 (linux2)\r\n\r\nAWSAccessKeyId=fbae4dab6bc045469c1f9f843d5d99b0&Action=DescribeInstances&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2013-09-26T18%3A07%3A14Z&Version=2010-08-31&Signature=aoAKyibiBwFSbMMiUiEivQCvF6o%2FCf5E4yM82LN3LfI%3D'<br>
reply: 'HTTP/1.1 200 OK\r\n'<br>
header: Content-Type: text/xml<br>
header: Content-Length: 206<br>
header: Date: Thu, 26 Sep 2013 18:07:14 GMT<br>
2013-09-26 11:07:14,264 euca2ools [DEBUG]:<?xml version="1.0" ?><DescribeInstancesResponse xmlns="<a href="http://ec2.amazonaws.com/doc/2010-08-31/" target="_blank">http://ec2.amazonaws.com/doc/2010-08-31/</a>"><requestId>req-53dfca36-14fc-497d-a37d-220e6072e903</requestId><reservationSet/></DescribeInstancesResponse><o:p></o:p></p>
<p>I am getting a 200 from Keystone, so it's not an auth problem...<br>
Do you have any clues about that one?<o:p></o:p></p>
</div>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal">Weird, <br>
<br>
I would check whether the instances appear in nova database.<br>
<br>
In addition, I would also check that the instances really exist in the compute nodes by: "virsh list -a" or/and "pgrep qemu" (will return a pid per running instance).<br>
<br>
More two dump questions:<br>
Are you sure that the machine you're running that command is the nova api machine (the api calls are to 127.0.0.1, local machine)?<br>
Can you run the same curl command again but with .../servers instead of ../servers/details (run it first by "nova --debug list" to get a new token, then run it manually with a changed uri/url)?<br>
<br>
<br>
<br>
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">Thanks a lot!<br>
Clément<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><o:p></o:p></pre>
<pre>Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><o:p></o:p></pre>
<pre>Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><span class="hoenzb"><span style="color:#888888"><o:p></o:p></span></span></pre>
<p class="MsoNormal"><span style="color:#888888"><br>
<br>
<br>
<span class="hoenzb"><o:p></o:p></span></span></p>
<pre><span style="color:#888888">-- <o:p></o:p></span></pre>
<pre><span style="color:#888888"><o:p> </o:p></span></pre>
<pre><span style="color:#888888">Thanks,<o:p></o:p></span></pre>
<pre><span style="color:#888888"><o:p> </o:p></span></pre>
<pre><span style="color:#888888">Rami Vaknin, QE @ Red Hat, TLV, IL.<o:p></o:p></span></pre>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<div>
<p class="MsoNormal">Clément<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>