deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Fojtik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DTACLOUD-395) Failed deleting VM via CIMI
Date Mon, 10 Dec 2012 09:57:25 GMT

    [ https://issues.apache.org/jira/browse/DTACLOUD-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13527818#comment-13527818
] 

Michal Fojtik commented on DTACLOUD-395:
----------------------------------------

Hi,

I tried this patch and it helps:

==== SNIP ====

diff --git a/server/lib/db.rb b/server/lib/db.rb
index e6fe761..ef83462 100644
--- a/server/lib/db.rb
+++ b/server/lib/db.rb
@@ -48,7 +48,8 @@ module Deltacloud
 
       def delete_attributes_for(model)
         return if test_environment?
-        get_entity(model).destroy
+        entity = get_entity(model)
+        !entity.nil? && entity.destroy!
       end
 
       def get_entity(model)

==== SNIP ====

I'll send it along with some other DB fixes soon :-) Stay tuned!
                
> Failed deleting VM via CIMI
> ---------------------------
>
>                 Key: DTACLOUD-395
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-395
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: CIMI/Frontend
>         Environment: latest upstream code.
>            Reporter: Oved Ourfali
>            Assignee: Michal Fojtik
>
> When trying to delete a VM via CIMI, I get the following error:
> ERROR -- 500: [NoMethodError] undefined method `destroy' for nil:NilClass
> /autohome/oourfali/git/deltacloud/server/pkg/deltacloud-core-1.0.5/lib/db.rb:51:in `delete_attributes_for'
> /autohome/oourfali/git/deltacloud/server/pkg/deltacloud-core-1.0.5/lib/cimi/models/machine.rb:114:in
`delete!'
> /autohome/oourfali/git/deltacloud/server/pkg/deltacloud-core-1.0.5/lib/cimi/collections/machines.rb:66:in
`block (3 levels) in <class:Machines>'
> /autohome/oourfali/.gem/ruby/1.9.1/gems/sinatra-rabbit-1.1.3/lib/sinatra/rabbit/base.rb:396:in
`instance_eval'
> /autohome/oourfali/.gem/ruby/1.9.1/gems/sinatra-rabbit-1.1.3/lib/sinatra/rabbit/base.rb:396:in
`block in control'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in `call'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in `block in compile!'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `[]'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `block (3 levels)
in route!'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:851:in `route_eval'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `block (2 levels)
in route!'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:872:in `block in process_route'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in `catch'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in `process_route'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:834:in `block in route!'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in `each'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in `route!'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:936:in `dispatch!'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in `block in call!'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `block in invoke'
> /usr/local/share/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `catch'
> 127.0.0.1 - - [09/Dec/2012 15:09:08] "DELETE /cimi/machines/ec7fbdba-83d7-4835-b304-0fc1aa90b71a
HTTP/1.1" 500 1459 0.0278

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message