Skip to content
This repository has been archived by the owner on Jun 24, 2020. It is now read-only.

Wrong error management when destroying a compute site #181

Open
Nuanda opened this issue May 12, 2015 · 4 comments
Open

Wrong error management when destroying a compute site #181

Nuanda opened this issue May 12, 2015 · 4 comments
Labels

Comments

@Nuanda
Copy link
Member

Nuanda commented May 12, 2015

I tried to destroy Cyfronet prod compute site on cloud-dev deployment (it should not be listed there since there is now a dedicated Atmosphere that manages that CS), and I couldn't remove it due to forbidden message ("You are not allowed to delete the image"). Which might or might not be ok.

The system, instead of showing me that flash error, went 500.

Part of the stack trace:

I, [2015-05-12T17:51:51.273601 #2746]  INFO -- : Completed 500 Internal Server Error in 129ms (ActiveRecord: 15.0ms)
F, [2015-05-12T17:51:51.451184 #2746] FATAL -- : 
Excon::Errors::Forbidden (Expected(204) <=> Actual(403 Forbidden)
excon.error.response
  :body          => "{\"forbidden\": {\"message\": \"You are not allowed to delete the image.\", \"code\": 403}}"
  :headers       => {
    "Content-Length"       => "83"
    "Content-Type"         => "application/json; charset=UTF-8"
    "Date"                 => "Tue, 12 May 2015 13:52:53 GMT"
    "X-Compute-Request-Id" => "req-c9ab8cbc-e54c-4b2a-9569-48c85a1a4127"
  }                                                                                                                                                                         
  :local_address => "10.184.0.3"                                                                                                                                            
  :local_port    => 50808                                                                                                                                                   
  :reason_phrase => "Forbidden"                                                                                                                                             
  :remote_ip     => "149.156.11.2"                                                                                                                                          
  :status        => 403
):
  vendor/bundle/ruby/2.1.0/gems/excon-0.45.1/lib/excon/middlewares/expects.rb:6:in `response_call'
  vendor/bundle/ruby/2.1.0/gems/excon-0.45.1/lib/excon/middlewares/response_parser.rb:8:in `response_call'
  vendor/bundle/ruby/2.1.0/gems/excon-0.45.1/lib/excon/connection.rb:372:in `response'
  vendor/bundle/ruby/2.1.0/gems/excon-0.45.1/lib/excon/connection.rb:236:in `request'
  vendor/bundle/ruby/2.1.0/gems/fog-core-1.30.0/lib/fog/core/connection.rb:81:in `request'
  vendor/bundle/ruby/2.1.0/gems/fog-1.29.0/lib/fog/openstack/compute.rb:351:in `request'
  vendor/bundle/ruby/2.1.0/gems/fog-1.29.0/lib/fog/openstack/requests/compute/delete_image.rb:6:in `delete_image'
  vendor/bundle/ruby/2.1.0/gems/fog-1.29.0/lib/fog/openstack/models/compute/image.rb:44:in `destroy'
  vendor/bundle/ruby/2.1.0/gems/fog-core-1.30.0/lib/fog/core/collection.rb:56:in `destroy'

@Nuanda Nuanda added the bug label May 12, 2015
@tbartynski
Copy link
Contributor

@Nuanda cs delete feature is not well tested. We actually never used this on production. Is there a confirm dialog with a warning that all images and vms on this that are manged by Atmo will be deleted? Maybe we should rethink the destroy cascade?

@Nuanda
Copy link
Member Author

Nuanda commented May 13, 2015

This is rather about properly managing the error message as a flash notification for the user.

@Nuanda
Copy link
Member Author

Nuanda commented May 18, 2015

When this particular fog error is triggered? Can I somehow "simulate" it on my dev machine?

@Nuanda
Copy link
Member Author

Nuanda commented May 18, 2015

#136 is related to this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants