-
Notifications
You must be signed in to change notification settings - Fork 897
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
Rescue migration error and update status #16705
Conversation
@miq-bot assign @gmcculloug |
@miq-bot add_labels automate, fine/yes, gaprindashvili/yes |
@bzwei Looks good. |
app/models/vm_migrate_task.rb
Outdated
vm.relocate(host, respool, datastore, nil, disk_transform) | ||
end | ||
rescue => err | ||
update_and_notify_parent(:state => 'finished', :status => 'error', :message => "Failed. Reason(#{err.message})") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor but it would be more consistent for the message to use [ ]
around the err.message
.
:message => "Failed. Reason:[#{err.message}]")
@bzwei This PR looks good assuming that we can make |
f0b56cd
to
377f422
Compare
Checked commit bzwei@377f422 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Rescue migration error and update status (cherry picked from commit 805e023)
Gaprindashvili backport details:
|
Rescue migration error and update status (cherry picked from commit 805e023) https://bugzilla.redhat.com/show_bug.cgi?id=1478518
Fine backport details:
|
Rescue migration error and update status (cherry picked from commit 805e023) https://bugzilla.redhat.com/show_bug.cgi?id=1478518
https://bugzilla.redhat.com/show_bug.cgi?id=1448023
vm_migrate_task needs to rescue migration error and finish with error.
VMWare migration already raises error when a problem is detected. We just need to rescue it in the task.
RHV migration needs to enhance to monitor the migration status and raise error accordingly. The enhancement will be done in manageiq-providers-ovirt.