You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "Marios Andreou (JIRA)" <ji...@apache.org> on 2012/08/22 14:30:37 UTC

[jira] [Created] (DTACLOUD-306) can't retrieve instance details with openstack driver

Marios Andreou created DTACLOUD-306:
---------------------------------------

             Summary: can't retrieve instance details with openstack driver
                 Key: DTACLOUD-306
                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
             Project: DeltaCloud
          Issue Type: Bug
            Reporter: Marios Andreou
            Assignee: Marios Andreou


NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:

I've been tasked to look at Deltacloud, in particular the OpenStack driver.
I have a small OpenStack setup running with OpenStack Essex on Ubuntu
12.04. Each time i try to see an instance in detail i get the following
error: 

OpenStack::Exception::ItemNotFound:The resource could not be found.
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Commented] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by Leander Bessa Beernaert <le...@gmail.com>.
Hello,


1 - I'm using the UI via the browser.

2 - Yes, it lists all of the available OpenStack instances.

3 - Here's the full trace:
>> Thin web server (v1.4.1 codename Chromeo)
>> Debugging ON
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3001, CTRL+C to stop
193.136.19.96 - - [22/Aug/2012 12:47:14] "GET /api/instances HTTP/1.1" 401
8478 0.3866
193.136.19.96 - - [22/Aug/2012 12:47:24] "GET /api/instances HTTP/1.1" 200
4113 0.9413
OpenStack::Exception::ItemNotFound:The resource could not be found.
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in
`raise_exception'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in
`req'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in
`populate'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in
`initialize'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in
`new'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in
`get_server'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in
`block in instances'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in
`call'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in
`safely'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in
`instances'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in
`instance'
193.136.19.96 - - [22/Aug/2012 12:47:27] "GET
/api/instances/18b1cf8a-873c-448c-b377-ea646a61a62d HTTP/1.1" 404 18 0.4565

On Wed, Aug 22, 2012 at 1:44 PM, Marios Andreou (JIRA) <ji...@apache.org>wrote:

>
>     [
> https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439461#comment-13439461]
>
> Marios Andreou commented on DTACLOUD-306:
> -----------------------------------------
>
> Hi - I just did a quick sanity check but wasn't able to reproduce:
>
> 1. what client are you using? (is it the html UI via the web browser?, or
> curl, or something else?)
> 2. can you see the instance you are trying to access in the list of
> instances?
> 3. can I please get a full trace... if you are running deltacloud manually
> this will be in the terminal, if you are using deltacloud as a service the
> logfile is in /var/log/deltacloud-core,
>
> thanks, marios
>
> > can't retrieve instance details with openstack driver
> > -----------------------------------------------------
> >
> >                 Key: DTACLOUD-306
> >                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
> >             Project: DeltaCloud
> >          Issue Type: Bug
> >            Reporter: Marios Andreou
> >            Assignee: Marios Andreou
> >
> > NOTE: AS REPORTED BY Leander Bessa Beernaert to
> dev@deltacloud.apache.org mailing list:
> > I've been tasked to look at Deltacloud, in particular the OpenStack
> driver.
> > I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> > 12.04. Each time i try to see an instance in detail i get the following
> > error:
> > OpenStack::Exception::ItemNotFound:The resource could not be found.
> >
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in
> `raise_exception'
> >
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in
> `req'
> >
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in
> `populate'
> >
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in
> `initialize'
> >
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in
> `new'
> >
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in
> `get_server'
> >
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in
> `block in instances'
> >
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in
> `call'
> >
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in
> `safely'
> >
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in
> `instances'
> >
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in
> `instance'
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>


-- 
Cumprimentos / Regards,
Leander

[jira] [Commented] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Marios Andreou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439461#comment-13439461 ] 

Marios Andreou commented on DTACLOUD-306:
-----------------------------------------

Hi - I just did a quick sanity check but wasn't able to reproduce:

1. what client are you using? (is it the html UI via the web browser?, or curl, or something else?)
2. can you see the instance you are trying to access in the list of instances?
3. can I please get a full trace... if you are running deltacloud manually this will be in the terminal, if you are using deltacloud as a service the logfile is in /var/log/deltacloud-core,

thanks, marios
                
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Leander Beernaert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439724#comment-13439724 ] 

Leander Beernaert commented on DTACLOUD-306:
--------------------------------------------

This happens with all active instances. I can access all the remaining options, except buckets ( i don't have a swift installation).

I tried this to reboot an instance since i can't do it from the web ui

curl -v --user "admin+admin:nova" 'http://127.0.0.1:3001/api/instances/976dd852-3ceb-461c-be04-97cee92f2efc/reboot'
* About to connect() to 127.0.0.1 port 3001 (#0)
*   Trying 127.0.0.1... connected
* Server auth using Basic with user 'admin+admin'
> GET /api/instances/976dd852-3ceb-461c-be04-97cee92f2efc/reboot HTTP/1.1
> Authorization: Basic YWRtaW4rYWRtaW46bm92YQ==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 127.0.0.1:3001
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< X-Frame-Options: sameorigin
< X-XSS-Protection: 1; mode=block
< Content-Type: text/html;charset=utf-8
< X-Cascade: pass
< Server: Apache-Deltacloud/1.0.0
< X-Deltacloud-Driver: openstack
< X-Deltacloud-Provider: http://192.168.111.220:35357/v2.0/
< Content-Length: 497
< Date: Wed, 22 Aug 2012 18:03:04 GMT
< Connection: keep-alive
< 
<!DOCTYPE html>
<html>
<head>
  <style type="text/css">
  body { text-align:center;font-family:helvetica,arial;font-size:22px;
    color:#888;margin:20px}
  #c {margin:0 auto;width:500px;text-align:left}
  </style>
</head>
<body>
  <h2>Sinatra doesn&rsquo;t know this ditty.</h2>
  <img src='http://127.0.0.1:3001/api/__sinatra__/404.png'>
  <div id="c">
    Try this:
    <pre>get '/api/instances/976dd852-3ceb-461c-be04-97cee92f2efc/reboot' do
  "Hello World"
end</pre>
  </div>
</body>
</html>
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0

                
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Christian Karnath (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440357#comment-13440357 ] 

Christian Karnath edited comment on DTACLOUD-306 at 8/24/12 2:01 AM:
---------------------------------------------------------------------

I can reproduce this issue against an OpenStack Essex installation. I guess this issue occurs because in older OpenStack-versions (Diablo etc.) the instance-id _and_ image-id were an integer and in Essex they are now a guid-string.

I did a quick lookup in the file openstack_driver.rb and replaced  some "to_i"-functions in "to_s"-functions and everything works fine:

server = os.get_server(instance_id.to_i)
changed to
server = os.get_server(instance_id.to_s)

and
server = os.get_server(opts[:id].to_i)
changed to
server = os.get_server(opts[:id].to_s)

(I'm sorry that I'm not familiar in how to produce a patch-file yet)


                
      was (Author: karnath):
    I can reproduce this issue against an OpenStack Essex installation. I guess this issue occurs because in older OpenStack-versions (Diablo etc.) the instance-id _and_ image-id was an integer and in Essex it is now a guid-string.

I did a quick lookup in the file openstack_driver.rb and replaced  some "to_i"-functions in "to_s"-functions and everything works fine:

server = os.get_server(instance_id.to_i)
changed to
server = os.get_server(instance_id.to_s)

and
server = os.get_server(opts[:id].to_i)
changed to
server = os.get_server(opts[:id].to_s)

(I'm sorry that I'm not familiar in how to produce a patch-file yet)


                  
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Christian Karnath (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440357#comment-13440357 ] 

Christian Karnath edited comment on DTACLOUD-306 at 8/24/12 2:00 AM:
---------------------------------------------------------------------

I can reproduce this issue against an OpenStack Essex installation. I guess this issue occurs because in older OpenStack-versions (Diablo etc.) the instance-id _and_ image-id was an integer and in Essex it is now a guid-string.

I did a quick lookup in the file openstack_driver.rb and replaced  some "to_i"-functions in "to_s"-functions and everything works fine:

server = os.get_server(instance_id.to_i)
changed to
server = os.get_server(instance_id.to_s)

and
server = os.get_server(opts[:id].to_i)
changed to
server = os.get_server(opts[:id].to_s)

(I'm sorry that I'm not familiar in how to produce a patch-file yet)


                
      was (Author: karnath):
    I can reproduce this issue against an OpenStack Essex installation. I guess this issue occurs because in older OpenStack-versions (Diablo etc.) the instance-id was an integer and in Essex it is now a guid-string.

I did a quick lookup in the file openstack_driver.rb and replaced  some "to_i"-functions in "to_s"-functions and everything works fine:

server = os.get_server(instance_id.to_i)
changed to
server = os.get_server(instance_id.to_s)

and
server = os.get_server(opts[:id].to_i)
changed to
server = os.get_server(opts[:id].to_s)

(I'm sorry that I'm not familiar in how to produce a patch-file yet)


                  
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Marios Andreou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439473#comment-13439473 ] 

Marios Andreou commented on DTACLOUD-306:
-----------------------------------------

Response from reporter:


Hello,


1 - I'm using the UI via the browser.

2 - Yes, it lists all of the available OpenStack instances.

3 - Here's the full trace:
>> Thin web server (v1.4.1 codename Chromeo)
>> Debugging ON
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3001, CTRL+C to stop
193.136.19.96 - - [22/Aug/2012 12:47:14] "GET /api/instances HTTP/1.1" 401
8478 0.3866
193.136.19.96 - - [22/Aug/2012 12:47:24] "GET /api/instances HTTP/1.1" 200
4113 0.9413
OpenStack::Exception::ItemNotFound:The resource could not be found.
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in
`raise_exception'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in
`req'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in
`populate'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in
`initialize'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in
`new'
/var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in
`get_server'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in
`block in instances'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in
`call'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in
`safely'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in
`instances'
/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in
`instance'
193.136.19.96 - - [22/Aug/2012 12:47:27] "GET
/api/instances/18b1cf8a-873c-448c-b377-ea646a61a62d HTTP/1.1" 404 18 0.4565
                
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Marios Andreou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440379#comment-13440379 ] 

Marios Andreou commented on DTACLOUD-306:
-----------------------------------------

Christian: thanks very much for your input! I was confused at first by your explanation, because I know that the openstack rubygem we are using (and to which deltacloud core developers are the main contributors) actually does something like:

[in openstack-1.0.1/lib/compute/server.rb ]:

49     def populate(data=nil)$
50       path = "/servers/#{URI.encode(@id.to_s)}"$
51       if data.nil? then$  
52           response = @compute.connection.req("GET", path)$
53           OpenStack::Exception.raise_exception(response) unless response.code.match(/^20.$/)$
54           data = JSON.parse(response.body)["server"]$
55       end$

[...]

as you can see in line 50 above, the id passed from deltacloud is already turned into a string. But you are right that the problem is in the 'to_i' from the deltacloud driver... since for example the instance id "2a308316-ee76-4df7-b050-c7de0d18b569" is converted to the integer 2 (the to_i parses the string and extracts whatever leading numbers it can, and returns just  0 if there are none). So the result was that the openstack rubygem was making the call with an instance id of "2".

I'll remove the extraneous 'to_i' from the deltacloud driver and run the openstack tests to make sure all is in order before sending the patch here. 

I'm a little confused that Leander was able to get at specific images though if the same applies to those.

Thanks again for your input, marios
                
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Marios Andreou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439611#comment-13439611 ] 

Marios Andreou commented on DTACLOUD-306:
-----------------------------------------

ok - still don't know what's going on - since I can't reproduce it here I have more questions:

- does this only happen for instances? can you retrieve specific images, realms, hardware profiles etc?

- are you able to stop/reboot an instance?

thanks
                
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Christian Karnath (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440357#comment-13440357 ] 

Christian Karnath edited comment on DTACLOUD-306 at 8/24/12 2:04 AM:
---------------------------------------------------------------------

I could reproduce this issue against an OpenStack Essex installation. I guess this issue occurs because in older OpenStack-versions (Diablo etc.) the instance-id _and_ image-id were an integer and in Essex they are now a guid-string.

I did a quick lookup in the file openstack_driver.rb and replaced  some "to_i"-functions in "to_s"-functions and everything works fine:

server = os.get_server(instance_id.to_i)
changed to
server = os.get_server(instance_id.to_s)

and
server = os.get_server(opts[:id].to_i)
changed to
server = os.get_server(opts[:id].to_s)

(I'm sorry that I'm not familiar in how to produce a patch-file yet)


                
      was (Author: karnath):
    I can reproduce this issue against an OpenStack Essex installation. I guess this issue occurs because in older OpenStack-versions (Diablo etc.) the instance-id _and_ image-id were an integer and in Essex they are now a guid-string.

I did a quick lookup in the file openstack_driver.rb and replaced  some "to_i"-functions in "to_s"-functions and everything works fine:

server = os.get_server(instance_id.to_i)
changed to
server = os.get_server(instance_id.to_s)

and
server = os.get_server(opts[:id].to_i)
changed to
server = os.get_server(opts[:id].to_s)

(I'm sorry that I'm not familiar in how to produce a patch-file yet)


                  
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Marios Andreou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marios Andreou updated DTACLOUD-306:
------------------------------------

    Attachment: 0001-Fix-for-DTACLOUD_306-Openstack-server-ID-should-be-p.patch

Attached patch should resolve the issue

Leander and/or Christian - are you able to apply this patch to test if it resolved the issue?

thanks, marios
                
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>         Attachments: 0001-Fix-for-DTACLOUD_306-Openstack-server-ID-should-be-p.patch
>
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Leander Beernaert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440458#comment-13440458 ] 

Leander Beernaert commented on DTACLOUD-306:
--------------------------------------------

The patch worked. I can now access the instance detail and reboot it as well. :)
                
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>         Attachments: 0001-Fix-for-DTACLOUD_306-Openstack-server-ID-should-be-p.patch
>
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Christian Karnath (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440357#comment-13440357 ] 

Christian Karnath commented on DTACLOUD-306:
--------------------------------------------

I can reproduce this issue against an OpenStack Essex installation. I guess this issue occurs because in older OpenStack-versions (Diablo etc.) the instance-id was an integer and in Essex it is now a guid-string.

I did a quick lookup in the file openstack_driver.rb and replaced  some "to_i"-functions in "to_s"-functions and everything works fine:

server = os.get_server(instance_id.to_i)
changed to
server = os.get_server(instance_id.to_s)

and
server = os.get_server(opts[:id].to_i)
changed to
server = os.get_server(opts[:id].to_s)

(I'm sorry that i'm not familiar in how to produce a patch-file yet)


                
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Christian Karnath (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440357#comment-13440357 ] 

Christian Karnath edited comment on DTACLOUD-306 at 8/24/12 1:58 AM:
---------------------------------------------------------------------

I can reproduce this issue against an OpenStack Essex installation. I guess this issue occurs because in older OpenStack-versions (Diablo etc.) the instance-id was an integer and in Essex it is now a guid-string.

I did a quick lookup in the file openstack_driver.rb and replaced  some "to_i"-functions in "to_s"-functions and everything works fine:

server = os.get_server(instance_id.to_i)
changed to
server = os.get_server(instance_id.to_s)

and
server = os.get_server(opts[:id].to_i)
changed to
server = os.get_server(opts[:id].to_s)

(I'm sorry that I'm not familiar in how to produce a patch-file yet)


                
      was (Author: karnath):
    I can reproduce this issue against an OpenStack Essex installation. I guess this issue occurs because in older OpenStack-versions (Diablo etc.) the instance-id was an integer and in Essex it is now a guid-string.

I did a quick lookup in the file openstack_driver.rb and replaced  some "to_i"-functions in "to_s"-functions and everything works fine:

server = os.get_server(instance_id.to_i)
changed to
server = os.get_server(instance_id.to_s)

and
server = os.get_server(opts[:id].to_i)
changed to
server = os.get_server(opts[:id].to_s)

(I'm sorry that i'm not familiar in how to produce a patch-file yet)


                  
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Marios Andreou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439488#comment-13439488 ] 

Marios Andreou commented on DTACLOUD-306:
-----------------------------------------

OK - lets try a different client and see what we get - can you please do the following and report the full output you get:


1.List all instances:

curl -v --user "USER:PASS" "http://0.0.0.0:3001/api/instances?format=xml"

2. List a specific instance:

curl -v --user "USER:PASS" "http://0.0.0.0:3001/api/instances/ID?format-xml"


obviously change USER:PASS above with your credentials and also the ID of the instance. 

thanks!
                
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Marios Andreou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440379#comment-13440379 ] 

Marios Andreou edited comment on DTACLOUD-306 at 8/24/12 3:36 AM:
------------------------------------------------------------------

Christian: thanks very much for your input! I was confused at first by your explanation, because I know that the openstack rubygem we are using (and to which deltacloud core developers are the main contributors) actually does something like:

[in openstack-1.0.1/lib/compute/server.rb ]:

49     def populate(data=nil)$
50       path = "/servers/#{URI.encode(@id.to_s)}"$
51       if data.nil? then$  
52           response = @compute.connection.req("GET", path)$
53           OpenStack::Exception.raise_exception(response) unless response.code.match(/^20.$/)$
54           data = JSON.parse(response.body)["server"]$
55       end$

[...]

as you can see in line 50 above, the id passed from deltacloud is already turned into a string. But you are right that the problem is in the 'to_i' from the deltacloud driver... since for example the instance id "2a308316-ee76-4df7-b050-c7de0d18b569" is converted to the integer 2 (the to_i parses the string and extracts whatever leading numbers it can, and returns just  0 if there are none). So the result was that the openstack rubygem was making the call with an instance id of "2".

I'll remove the extraneous 'to_i' from the deltacloud driver and run the openstack tests to make sure all is in order before sending the patch here. 

I'm a little confused that Leander was able to get at specific images though if the same applies to those.

[EDIT - its because the 'images' method in the deltacloud openstack driver wasn't invoking 'to_i' for the image ID, but passing it 'as-is' as a string]

Thanks again for your input, marios
                
      was (Author: marios):
    Christian: thanks very much for your input! I was confused at first by your explanation, because I know that the openstack rubygem we are using (and to which deltacloud core developers are the main contributors) actually does something like:

[in openstack-1.0.1/lib/compute/server.rb ]:

49     def populate(data=nil)$
50       path = "/servers/#{URI.encode(@id.to_s)}"$
51       if data.nil? then$  
52           response = @compute.connection.req("GET", path)$
53           OpenStack::Exception.raise_exception(response) unless response.code.match(/^20.$/)$
54           data = JSON.parse(response.body)["server"]$
55       end$

[...]

as you can see in line 50 above, the id passed from deltacloud is already turned into a string. But you are right that the problem is in the 'to_i' from the deltacloud driver... since for example the instance id "2a308316-ee76-4df7-b050-c7de0d18b569" is converted to the integer 2 (the to_i parses the string and extracts whatever leading numbers it can, and returns just  0 if there are none). So the result was that the openstack rubygem was making the call with an instance id of "2".

I'll remove the extraneous 'to_i' from the deltacloud driver and run the openstack tests to make sure all is in order before sending the patch here. 

I'm a little confused that Leander was able to get at specific images though if the same applies to those.

Thanks again for your input, marios
                  
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>         Attachments: 0001-Fix-for-DTACLOUD_306-Openstack-server-ID-should-be-p.patch
>
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Leander Beernaert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439491#comment-13439491 ] 

Leander Beernaert commented on DTACLOUD-306:
--------------------------------------------

1:

* About to connect() to 127.0.0.1 port 3001 (#0)
*   Trying 127.0.0.1... connected
* Server auth using Basic with user 'admin+admin'
> GET /api/instances?format=xml HTTP/1.1
> Authorization: Basic YWRtaW4rYWRtaW46bm92YQ==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 127.0.0.1:3001
> Accept: */*
> 
< HTTP/1.1 200 OK
< X-Frame-Options: sameorigin
< X-XSS-Protection: 1; mode=block
< Content-Type: application/xml
< X-Backend-Runtime: 0.6583676338195801
< Server: Apache-Deltacloud/1.0.0
< X-Deltacloud-Driver: openstack
< X-Deltacloud-Provider: http://192.168.111.220:35357/v2.0/
< Content-Length: 5372
< ETag: "55c9e339c7ce2b0cfc3e17b337d9b8c5"
< Cache-Control: max-age=0, private, must-revalidate
< Date: Wed, 22 Aug 2012 13:39:25 GMT
< Connection: keep-alive
< 
<?xml version='1.0' encoding='utf-8' ?>
<instances>
  <instance href='http://127.0.0.1:3001/api/instances/18b1cf8a-873c-448c-b377-ea646a61a62d' id='18b1cf8a-873c-448c-b377-ea646a61a62d'>
    <name>region1</name>
    <owner_id>admin</owner_id>
    <image href='http://127.0.0.1:3001/api/images/fb7aa7f1-89a4-4fee-ba08-c4081dacd413' id='fb7aa7f1-89a4-4fee-ba08-c4081dacd413'></image>
    <realm href='http://127.0.0.1:3001/api/realms/default' id='default'></realm>
    <state>RUNNING</state>
    <hardware_profile href='http://127.0.0.1:3001/api/hardware_profiles/6' id='6'>
    </hardware_profile>
    <actions>
      <link href='http://127.0.0.1:3001/api/instances/18b1cf8a-873c-448c-b377-ea646a61a62d/reboot' method='post' rel='reboot' />
      <link href='http://127.0.0.1:3001/api/instances/18b1cf8a-873c-448c-b377-ea646a61a62d/stop' method='post' rel='stop' />
      <link href='http://127.0.0.1:3001/api/create_image;instance_id=18b1cf8a-873c-448c-b377-ea646a61a62d' method='post' rel='create_image' />
    </actions>
    <public_addresses></public_addresses>
    <private_addresses></private_addresses>
    <storage_volumes></storage_volumes>
    <authentication type='key'>
      <login>
        <username>root</username>
        <password><![CDATA[]]></password>
      </login>
      <login>
        <keyname></keyname>
      </login>
    </authentication>
  </instance>
  <instance href='http://127.0.0.1:3001/api/instances/ecadf392-9278-41fb-a6d2-5b2e4e2ebe52' id='ecadf392-9278-41fb-a6d2-5b2e4e2ebe52'>
    <name>region2</name>
    <owner_id>admin</owner_id>
    <image href='http://127.0.0.1:3001/api/images/fb7aa7f1-89a4-4fee-ba08-c4081dacd413' id='fb7aa7f1-89a4-4fee-ba08-c4081dacd413'></image>
    <realm href='http://127.0.0.1:3001/api/realms/default' id='default'></realm>
    <state>RUNNING</state>
    <hardware_profile href='http://127.0.0.1:3001/api/hardware_profiles/6' id='6'>
    </hardware_profile>
    <actions>
      <link href='http://127.0.0.1:3001/api/instances/ecadf392-9278-41fb-a6d2-5b2e4e2ebe52/reboot' method='post' rel='reboot' />
      <link href='http://127.0.0.1:3001/api/instances/ecadf392-9278-41fb-a6d2-5b2e4e2ebe52/stop' method='post' rel='stop' />
      <link href='http://127.0.0.1:3001/api/create_image;instance_id=ecadf392-9278-41fb-a6d2-5b2e4e2ebe52' method='post' rel='create_image' />
    </actions>
    <public_addresses></public_addresses>
    <private_addresses></private_addresses>
    <storage_volumes></storage_volumes>
    <authentication type='key'>
      <login>
        <username>root</username>
        <password><![CDATA[]]></password>
      </login>
      <login>
        <keyname></keyname>
      </login>
    </authentication>
  </instance>
  <instance href='http://127.0.0.1:3001/api/instances/2a308316-ee76-4df7-b050-c7de0d18b569' id='2a308316-ee76-4df7-b050-c7de0d18b569'>
    <name>master</name>
    <owner_id>admin</owner_id>
    <image href='http://127.0.0.1:3001/api/images/fb7aa7f1-89a4-4fee-ba08-c4081dacd413' id='fb7aa7f1-89a4-4fee-ba08-c4081dacd413'></image>
    <realm href='http://127.0.0.1:3001/api/realms/default' id='default'></realm>
    <state>RUNNING</state>
    <hardware_profile href='http://127.0.0.1:3001/api/hardware_profiles/6' id='6'>
    </hardware_profile>
    <actions>
      <link href='http://127.0.0.1:3001/api/instances/2a308316-ee76-4df7-b050-c7de0d18b569/reboot' method='post' rel='reboot' />
      <link href='http://127.0.0.1:3001/api/instances/2a308316-ee76-4df7-b050-c7de0d18b569/stop' method='post' rel='stop' />
      <link href='http://127.0.0.1:3001/api/create_image;instance_id=2a308316-ee76-4df7-b050-c7de0d18b569' method='post' rel='create_image' />
    </actions>
    <public_addresses></public_addresses>
    <private_addresses></private_addresses>
    <storage_volumes></storage_volumes>
    <authentication type='key'>
      <login>
        <username>root</username>
        <password><![CDATA[]]></password>
      </login>
      <login>
        <keyname></keyname>
      </login>
    </authentication>
  </instance>
  <instance href='http://127.0.0.1:3001/api/instances/e7a2695a-9ac2-4cf4-a720-2dc2e2f7adfb' id='e7a2695a-9ac2-4cf4-a720-2dc2e2f7adfb'>
    <name>client1</name>
    <owner_id>admin</owner_id>
    <image href='http://127.0.0.1:3001/api/images/fb7aa7f1-89a4-4fee-ba08-c4081dacd413' id='fb7aa7f1-89a4-4fee-ba08-c4081dacd413'></image>
    <realm href='http://127.0.0.1:3001/api/realms/default' id='default'></realm>
    <state>RUNNING</state>
    <hardware_profile href='http://127.0.0.1:3001/api/hardware_profiles/6' id='6'>
    </hardware_profile>
    <actions>
      <link href='http://127.0.0.1:3001/api/instances/e7a2695a-9ac2-4cf4-a720-2dc2e2f7adfb/reboot' method='post' rel='reboot' />
      <link href='http://127.0.0.1:3001/api/instances/e7a2695a-9ac2-4cf4-a720-2dc2e2f7adfb/stop' method='post' rel='stop' />
      <link href='http://127.0.0.1:3001/api/create_image;instance_id=e7a2695a-9ac2-4cf4-a720-2dc2e2f7adfb' method='post' rel='create_image' />
    </actions>
    <public_addresses></public_addresses>
    <private_addresses></private_addresses>
    <storage_volumes></storage_volumes>
    <authentication type='key'>
      <login>
        <username>root</username>
        <password><![CDATA[]]></password>
      </login>
      <login>
        <keyname></keyname>
      </login>
    </authentication>
  </instance>
</instances>
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0

2:
<h1>Not Found</h1> 
curl -v --user "admin+admin:nova" "http://127.0.0.1:3001/api/instances/2a308316-ee76-4df7-b050-c7de0d18b569?format=xml"
* About to connect() to 127.0.0.1 port 3001 (#0)
*   Trying 127.0.0.1... connected
* Server auth using Basic with user 'admin+admin'
> GET /api/instances/2a308316-ee76-4df7-b050-c7de0d18b569?format=xml HTTP/1.1
> Authorization: Basic YWRtaW4rYWRtaW46bm92YQ==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 127.0.0.1:3001
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< X-Frame-Options: sameorigin
< X-XSS-Protection: 1; mode=block
< Content-Type: text/html;charset=utf-8
< X-Cascade: pass
< Server: Apache-Deltacloud/1.0.0
< X-Deltacloud-Driver: openstack
< X-Deltacloud-Provider: http://192.168.111.220:35357/v2.0/
< Content-Length: 18
< Date: Wed, 22 Aug 2012 13:41:49 GMT
< Connection: keep-alive
< 
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0

                
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Leander Beernaert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440236#comment-13440236 ] 

Leander Beernaert commented on DTACLOUD-306:
--------------------------------------------

Here is the command output:
curl -v --user "admin+admin:nova" -X POST 'http://127.0.0.1:3001/api/instances/976dd852-3ceb-461c-be04-97cee92f2efc/reboot'
* About to connect() to 127.0.0.1 port 3001 (#0)
*   Trying 127.0.0.1... connected
* Server auth using Basic with user 'admin+admin'
> POST /api/instances/976dd852-3ceb-461c-be04-97cee92f2efc/reboot HTTP/1.1
> Authorization: Basic YWRtaW4rYWRtaW46bm92YQ==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 127.0.0.1:3001
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< X-Frame-Options: sameorigin
< X-XSS-Protection: 1; mode=block
< Content-Type: text/html;charset=utf-8
< X-Cascade: pass
< Server: Apache-Deltacloud/1.0.0
< X-Deltacloud-Driver: openstack
< X-Deltacloud-Provider: http://192.168.111.220:35357/v2.0/
< Content-Length: 18
< Date: Thu, 23 Aug 2012 12:22:52 GMT
< Connection: keep-alive
< 
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0
<h1>Not Found</h1>

I've check the logs and i repeatedly come by these lines in the nova-api log when i try to access the details of the instance or any other action regarding it (e.g.:reboot).

2012-08-23 12:24:42 DEBUG nova.compute.api [req-d57dd3d6-69e9-42b5-a1cb-b5bbfebf90dc abf9afdafbd943db8369239feb4df02f a3e5fee434754c39adbf33863e6d1360] Searching by: {'uuid': [u'976dd852-3ceb-461c-be04-97cee92f2efc', u'18b1cf8a-873c-448c-b377-ea646a61a62d', u'ecadf392-9278-41fb-a6d2-5b2e4e2ebe52', u'2a308316-ee76-4df7-b050-c7de0d18b569', u'e7a2695a-9ac2-4cf4-a720-2dc2e2f7adfb']} from (pid=15899) get_all /usr/lib/python2.7/dist-packages/nova/compute/api.py:1064
2012-08-23 12:24:42 DEBUG nova.compute.api [req-d57dd3d6-69e9-42b5-a1cb-b5bbfebf90dc abf9afdafbd943db8369239feb4df02f a3e5fee434754c39adbf33863e6d1360] Searching by: {'uuid': [u'976dd852-3ceb-461c-be04-97cee92f2efc', u'18b1cf8a-873c-448c-b377-ea646a61a62d', u'ecadf392-9278-41fb-a6d2-5b2e4e2ebe52', u'2a308316-ee76-4df7-b050-c7de0d18b569', u'e7a2695a-9ac2-4cf4-a720-2dc2e2f7adfb']} from (pid=15899) get_all /usr/lib/python2.7/dist-packages/nova/compute/api.py:1064
2012-08-23 12:24:42 INFO nova.api.openstack.wsgi [req-d57dd3d6-69e9-42b5-a1cb-b5bbfebf90dc abf9afdafbd943db8369239feb4df02f a3e5fee434754c39adbf33863e6d1360] http://192.168.111.220:8774/v2/a3e5fee434754c39adbf33863e6d1360/servers/detail returned with HTTP 200
2012-08-23 12:24:57 INFO nova.api.openstack.wsgi [req-79ed5e6d-d572-47f2-a142-b95a2fed840d abf9afdafbd943db8369239feb4df02f a3e5fee434754c39adbf33863e6d1360] GET http://192.168.111.220:8774/v2/a3e5fee434754c39adbf33863e6d1360/servers/976
2012-08-23 12:24:57 DEBUG nova.api.openstack.wsgi [req-79ed5e6d-d572-47f2-a142-b95a2fed840d abf9afdafbd943db8369239feb4df02f a3e5fee434754c39adbf33863e6d1360] Empty body provided in request from (pid=15899) get_body /usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py:705
2012-08-23 12:24:57 INFO nova.api.openstack.wsgi [req-79ed5e6d-d572-47f2-a142-b95a2fed840d abf9afdafbd943db8369239feb4df02f a3e5fee434754c39adbf33863e6d1360] HTTP exception thrown: The resource could not be found.
2012-08-23 12:24:57 INFO nova.api.openstack.wsgi [req-79ed5e6d-d572-47f2-a142-b95a2fed840d abf9afdafbd943db8369239feb4df02f a3e5fee434754c39adbf33863e6d1360] http://192.168.111.220:8774/v2/a3e5fee434754c39adbf33863e6d1360/servers/976 returned with HTTP 404


                
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-306) can't retrieve instance details with openstack driver

Posted by "Marios Andreou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440126#comment-13440126 ] 

Marios Andreou commented on DTACLOUD-306:
-----------------------------------------

strange that this only happens for instances. For the instance actions (like reboot) its a HTTP POST, so the curl command is like:

curl -v --user "USER:PASS" -X POST http://localhost:3001/api/instances/ID/reboot
(see http://deltacloud.apache.org/curl-examples.html)

Can you see anything useful in the nova logs? (http://docs.openstack.org/trunk/openstack-compute/admin/content/log-files-for-openstack-compute.html)

marios
                
> can't retrieve instance details with openstack driver
> -----------------------------------------------------
>
>                 Key: DTACLOUD-306
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-306
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Marios Andreou
>            Assignee: Marios Andreou
>
> NOTE: AS REPORTED BY Leander Bessa Beernaert to dev@deltacloud.apache.org mailing list:
> I've been tasked to look at Deltacloud, in particular the OpenStack driver.
> I have a small OpenStack setup running with OpenStack Essex on Ubuntu
> 12.04. Each time i try to see an instance in detail i get the following
> error: 
> OpenStack::Exception::ItemNotFound:The resource could not be found.
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:436:in `raise_exception'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/connection.rb:189:in `req'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:52:in `populate'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/server.rb:37:in `initialize'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `new'
> /var/lib/gems/1.9.1/gems/openstack-1.0.1/lib/openstack/compute/connection.rb:28:in `get_server'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:122:in `block in instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `call'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/exceptions.rb:181:in `safely'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/openstack/openstack_driver.rb:120:in `instances'
> /var/lib/gems/1.9.1/gems/deltacloud-core-1.0.1/lib/deltacloud/drivers/base_driver.rb:217:in `instance'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira