-
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
Add empty IP address check to preflight check #18425
Add empty IP address check to preflight check #18425
Conversation
@fdupont-redhat 'jameswnl, jerryk55, djberg96' is an invalid reviewer, ignoring... |
@fdupont-redhat do you want a message with the 'raise'? Otherwise looks fine. |
@jerryk55 I don't want a message at the moment. We also works on enhanced error reporting and the message structure is not decided yet. I will add a message in another PR, along with others ;) |
@fdupont-redhat sounds good. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
👍 |
@fdupont-redhat 'jameswnl, jerryk55, djberg96' is an invalid reviewer, ignoring... |
@fdupont-redhat was this PR reviewed and ready for merge. We need this for an upcoming hammer build. |
@@ -54,7 +54,7 @@ def task_active | |||
def preflight_check | |||
destination_cluster | |||
virtv2v_disks | |||
network_mappings | |||
network_mappings.each { |m| raise if m.ip_address.nil? } |
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.
@fdupont-redhat it looks like most of the existing validation is done in the calculate_abcd
methods, would be more consistent to do this check down here
raise "[#{source.name}] NIC #{nic.device_name} [#{source_network.name}] has no mapping." if destination_network.nil? |
Checked commits fabiendupont/manageiq@cf83a9b~...3eb1681 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
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.
👍 awesome @fdupont-redhat !
…dress Add empty IP address check to preflight check (cherry picked from commit 3d26260) https://bugzilla.redhat.com/show_bug.cgi?id=1678376
Hammer backport details:
|
With Linux virtual machines, we have at least two known cases where the IP address for an NIC is empty: 1. ghost config files(ifcfg-*) ; 2. the NIC has more than one IPv4 or one IPv6 address on the NIC. This leads to generating network mappings for conversion with nil addresses, which in turn causes the conversion to fail, as virt-v2v-wrapper can't handle nil addresses.
This PR adds a preflight check on the transformation task to verify that no interface in the mapping has a nil address. The goal is to fail early in the transformation process and not even stop the source VM, preserving the source environment.
Associated RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1671719