-
Notifications
You must be signed in to change notification settings - Fork 69
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
Don't crash when probing deleted vApp for status #324
Don't crash when probing deleted vApp for status #324
Conversation
51568da
to
437e05d
Compare
Not what people usually say but thanks for not looking at this yesterday @agrare ;) Happened to notice we're GET-ing the vapp by ID in two places so I refactored a bit. Feel free to look at it now, I don't think I'll change my mind again :) |
With this commit we properly capture Fog exception which is raised when GET-ing vApp by ID when vApp doesn't exist anymore. Interesting enough, the fog-vcloud raises one of ```ruby Fog::VcloudDirector::Compute::Forbidden Fog::VcloudDirector::Compute::ServiceError ``` exceptions instead 404, depending on why exactly the entity couldn't be found :) With this commit we now capture the two exceptions and convert them to much more meaningful ``` MiqException::MiqOrchestrationStackNotExistError ``` to better reflect what's going on. Also, Automation is able to properly handle this kind of exception. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1632239 Signed-off-by: Miha Pleško <[email protected]>
437e05d
to
723d6ff
Compare
Checked commit miha-plesko@723d6ff with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@miha-plesko haha I do what I can |
…ted-vapp Don't crash when probing deleted vApp for status
@miq-bot add_label blocker |
…ted-vapp Don't crash when probing deleted vApp for status (cherry picked from commit ab9549d) https://bugzilla.redhat.com/show_bug.cgi?id=1632239
Hammer backport details:
|
…ted-vapp Don't crash when probing deleted vApp for status (cherry picked from commit ab9549d) https://bugzilla.redhat.com/show_bug.cgi?id=1636494
Gaprindashvili backport details:
|
…ing-deleted-vapp" This reverts commit ff0e5f4. https://bugzilla.redhat.com/show_bug.cgi?id=1636494
Reverted the G backport.
|
@simaishi why would you revert it? |
@miha-plesko This was backported only because it was tied to https://bugzilla.redhat.com/show_bug.cgi?id=1636494. Since that's no longer needed in Gaprindashvili branch, I needed to revert all related PRs. We're not backporting any PRs unless it's associated to a BZ that's approved for the next release... |
Tag migrated VM.
With this commit we properly capture Fog exception which is raised when GET-ing vApp by ID when vApp doesn't exist anymore. Interesting enough, the fog-vcloud raises one of
exceptions instead 404, depending on why exactly the entity couldn't be found :)
With this commit we now capture the two exceptions and convert them to much more meaningful
to better reflect what's going on. Also, Automation is able to properly handle this kind of exception.
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1632239
Related PRs:
@miq-bot add_label bug,gaprindashvili/yes,hammer/yes
@miq-bot assign @agrare