Bug 1368771

Summary: [Text] - Provide clear error message when trying to add host over a bond with a single slave
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: BLL.NetworkAssignee: Leon Goldberg <lgoldber>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: medium Docs Contact:
Priority: low    
Version: 4.0.2.6CC: bugs, danken, yzaspits
Target Milestone: ovirt-4.1.0-betaFlags: rule-engine: ovirt-4.1+
rule-engine: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-15 15:06:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Michael Burman 2016-08-21 10:43:15 UTC
Description of problem:
[Text] - Provide clear error message when trying to add host over a bond with a single slave.

Currently when trying to add host over a bond with a single slave we failing with the next error: 

2016-08-21 09:39:31,836 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-6-thread-32) [4e418dcc] Failed to configure management network: Failed to configure manag
ement network on host red-vds4.qa.lab.tlv.redhat.com. Host red-vds4.qa.lab.tlv.redhat.com has an invalid interface bond1 for the management network configuration.
2016-08-21 09:39:31,837 ERROR [org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommand] (org.ovirt.thread.pool-6-thread-32) [4e418dcc] Exception: org.ovirt.engine.core.bll.network.NetworkConfigurator$Networ
kConfiguratorException: Failed to configure management network
        at org.ovirt.engine.core.bll.network.NetworkConfigurator.createManagementNetworkIfRequired(NetworkConfigurator.java:95) [bll.jar:]


Failed to configure management network on host red-vds4.qa.lab.tlv.redhat.com. Host red-vds4.qa.lab.tlv.redhat.com has an invalid interface bond1 for the management network configuration.

The error message must be clear about the reason of failure. 

Version-Release number of selected component (if applicable):
4.0.2.6-0.1.el7ev

How reproducible:
100

Steps to Reproduce:
1. Create bond with 2 slaves. Set one slave down

Actual results:
Try to add host over the bond

Expected results:
Failed with error:
Host has an invalid interface bond1 for the management network configuration.

Comment 1 Michael Burman 2016-12-15 09:05:24 UTC
Verified on - ovirt-engine-4.1.0-0.2.master.20161214234138.gitc23fdcc.el7.centos.noarch

The new error message look like this:

"Failed to configure management network on host orchid-vds2.qa.lab.tlv.redhat.com. Host orchid-vds2.qa.lab.tlv.redhat.com has an invalid bond interface (bond1 contains less than 2 active slaves) for the management network configuration"