Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"vagrant destroy" does not poweroff server beforehand #10

Open
angristan opened this issue Oct 4, 2020 · 0 comments · May be fixed by #11
Open

"vagrant destroy" does not poweroff server beforehand #10

angristan opened this issue Oct 4, 2020 · 0 comments · May be fixed by #11

Comments

@angristan
Copy link
Contributor

➜  vagrant-scaleway git:(master) ✗ vagrant destroy -f
==> default: Destroying the server...
Traceback (most recent call last):
	43: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
	42: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/machine.rb:201:in `action'
	41: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/machine.rb:201:in `call'
	40: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/environment.rb:613:in `lock'
	39: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/machine.rb:215:in `block in action'
	38: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/machine.rb:243:in `action_raw'
	37: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `run'
	36: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/util/busy.rb:19:in `busy'
	35: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `block in run'
	34: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builder.rb:149:in `call'
	33: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	32: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builtin/call.rb:53:in `call'
	31: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `run'
	30: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/util/busy.rb:19:in `busy'
	29: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `block in run'
	28: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builder.rb:149:in `call'
	27: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	26: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	25: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	24: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
	23: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	22: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builtin/call.rb:53:in `call'
	21: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `run'
	20: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/util/busy.rb:19:in `busy'
	19: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `block in run'
	18: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builder.rb:149:in `call'
	17: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	16: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	15: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	14: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/vagrant-scaleway-0.4.1/lib/vagrant-scaleway/action/connect_scaleway.rb:30:in `call'
	13: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	12: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builtin/provisioner_cleanup.rb:25:in `call'
	11: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	10: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/vagrant-scaleway-0.4.1/lib/vagrant-scaleway/action/destroy_server.rb:17:in `call'
	 9: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/fog-scaleway-0.5.0/lib/fog/scaleway/models/compute/server.rb:102:in `destroy'
	 8: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/fog-scaleway-0.5.0/lib/fog/scaleway/requests/compute/delete_server.rb:6:in `delete_server'
	 7: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/fog-scaleway-0.5.0/lib/fog/scaleway/request_helper.rb:26:in `delete'
	 6: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/fog-scaleway-0.5.0/lib/fog/scaleway/compute.rb:128:in `request'
	 5: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/fog-scaleway-0.5.0/lib/fog/scaleway/client.rb:17:in `request'
	 4: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/fog-core-1.45.0/lib/fog/core/connection.rb:81:in `request'
	 3: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/excon-0.76.0/lib/excon/connection.rb:281:in `request'
	 2: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/excon-0.76.0/lib/excon/connection.rb:450:in `response'
	 1: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/excon-0.76.0/lib/excon/middlewares/response_parser.rb:12:in `response_call'
/Users/stanislas/.vagrant.d/gems/2.6.6/gems/excon-0.76.0/lib/excon/middlewares/expects.rb:13:in `response_call': Expected([204]) <=> Actual(400 Bad Request) (Excon::Error::BadRequest)
excon.error.response
  :body          => "{\"type\": \"invalid_request_error\", \"message\": \"instance should be powered off\"}"
  :cookies       => [
  ]
  :headers       => {
    "content-length"            => "78"
    "content-security-policy"   => "default-src 'none'; frame-ancestors 'none'"
    "content-type"              => "application/json"
    "date"                      => "Sun, 04 Oct 2020 11:29:41 GMT"
    "server"                    => "Scaleway API-Gateway"
    "strict-transport-security" => "max-age=63072000"
    "warning"                   => "299 - \"Deprecated API please use https://api.scaleway.com/instance/v1/zones/fr-par-1/\""
    "x-content-type-options"    => "nosniff"
    "x-frame-options"           => "DENY"
    "x-request-id"              => "cb6fa384-42a8-4b88-ab88-9380ddfe3871"
  }
  :host          => "cp-PAR1.scaleway.com"
  :local_address => "10.66.66.2"
  :local_port    => 64718
  :path          => "/servers/66a8dc7c-cc1e-4c7c-8b6e-6f29793aba7b"
  :port          => 443
  :reason_phrase => "Bad Request"
  :remote_ip     => "51.159.69.134"
  :status        => 400
  :status_line   => "HTTP/1.1 400 Bad Request\r\n"
	43: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
	42: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/machine.rb:201:in `action'
	41: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/machine.rb:201:in `call'
	40: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/environment.rb:613:in `lock'
	39: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/machine.rb:215:in `block in action'
	38: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/machine.rb:243:in `action_raw'
	37: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `run'
	36: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/util/busy.rb:19:in `busy'
	35: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `block in run'
	34: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builder.rb:149:in `call'
	33: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	32: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builtin/call.rb:53:in `call'
	31: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `run'
	30: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/util/busy.rb:19:in `busy'
	29: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `block in run'
	28: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builder.rb:149:in `call'
	27: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	26: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	25: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	24: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
	23: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	22: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builtin/call.rb:53:in `call'
	21: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `run'
	20: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/util/busy.rb:19:in `busy'
	19: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/runner.rb:89:in `block in run'
	18: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builder.rb:149:in `call'
	17: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	16: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	15: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	14: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/vagrant-scaleway-0.4.1/lib/vagrant-scaleway/action/connect_scaleway.rb:30:in `call'
	13: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	12: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/builtin/provisioner_cleanup.rb:25:in `call'
	11: from /opt/vagrant/embedded/gems/2.2.10/gems/vagrant-2.2.10/lib/vagrant/action/warden.rb:48:in `call'
	10: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/vagrant-scaleway-0.4.1/lib/vagrant-scaleway/action/destroy_server.rb:17:in `call'
	 9: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/fog-scaleway-0.5.0/lib/fog/scaleway/models/compute/server.rb:102:in `destroy'
	 8: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/fog-scaleway-0.5.0/lib/fog/scaleway/requests/compute/delete_server.rb:6:in `delete_server'
	 7: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/fog-scaleway-0.5.0/lib/fog/scaleway/request_helper.rb:26:in `delete'
	 6: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/fog-scaleway-0.5.0/lib/fog/scaleway/compute.rb:128:in `request'
	 5: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/fog-scaleway-0.5.0/lib/fog/scaleway/client.rb:17:in `request'
	 4: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/fog-core-1.45.0/lib/fog/core/connection.rb:81:in `request'
	 3: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/excon-0.76.0/lib/excon/connection.rb:281:in `request'
	 2: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/excon-0.76.0/lib/excon/connection.rb:450:in `response'
	 1: from /Users/stanislas/.vagrant.d/gems/2.6.6/gems/excon-0.76.0/lib/excon/middlewares/response_parser.rb:12:in `response_call'
/Users/stanislas/.vagrant.d/gems/2.6.6/gems/excon-0.76.0/lib/excon/middlewares/expects.rb:13:in `response_call': instance should be powered off (Fog::Scaleway::Compute::InvalidRequestError)
angristan added a commit to scaleway/vagrant-scaleway that referenced this issue Oct 4, 2020
The message changed, so the regex needed to be updated in order for "destroy" to work when the instance is still running.

Fix kaorimatz#10
@angristan angristan linked a pull request Oct 4, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant