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

fix(destroy): fix exception rescue #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

angristan
Copy link
Contributor

The message changed, so the regex needed to be updated in order for "destroy" to work when the instance is still running.

Fix #10

  :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"

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
Copy link
Contributor Author

FYI with this patch, destroy works but return the same error as #9

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 this pull request may close these issues.

"vagrant destroy" does not poweroff server beforehand
1 participant