Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1528906

Summary: Engine requires to set a gateway in order to sync a network
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: BLL.NetworkAssignee: Dominik Holler <dholler>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: high Docs Contact:
Priority: high    
Version: 4.2.0CC: bugs, contact, danken
Target Milestone: ovirt-4.2.1Keywords: Regression
Target Release: ---Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: An inconsistency in the internal representation of an empty gateway reported by the host. Consequence: Internal validation of the gateway failed. Fix: Consistent internal representation of empty gateway. Result: Synchronization of hosts with unsynchrnized networking and empty gateway works.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-12 11:51:54 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:
Embargoed:
Attachments:
Description Flags
engine log none

Description Michael Burman 2017-12-25 06:59:59 UTC
Created attachment 1372065 [details]
engine log

Description of problem:
Engine requires to set a gateway in order to sync a network

Can't sync network with combination of static IP(no GW) and VM<>non-VM property.
Can't sync network with combination of static IP(no GW) and vlan/non-vlan property.

Looks like engine requires to set a gateway in order to sync the network.

'Error while executing action: 

zeus-vds1.qa.lab.tlv.redhat.com:
must match "^\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\_){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)"
Attribute: ipConfiguration.iPv4Addresses[0].gateway'

2017-12-25 08:52:51,296+02 WARN  [org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand] (default task-4) [2535d33c] Validation of action 'HostSetupNetworks' failed for user admin@internal-authz. Reasons: VAR__ACTION__SETUP,VAR__TYPE__NETWORKS,must match "^\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)",$flags [Ljavax.validation.constraints.Pattern$Flag;@6f99d3a6,$regexp ^\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|2[0-4]\d|[01]\d\d|\d?\d),$groups [Ljava.lang.Class;@1867ff02,$message {javax.validation.constraints.Pattern.message},$payload [Ljava.lang.Class;@1474d76a,ACTION_TYPE_FAILED_ATTRIBUTE_PATH,$path ipConfiguration.iPv4Addresses[0].gateway,$validatedValue 
2017-12-25 08:52:51,312+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-4) [2535d33c] EVENT_ID: PERSIST_SETUP_NETWORK_ON_HOST_FAILED(10,904), (1/1): Failed to apply changes on host zeus-vds1.qa.lab.tlv.redhat.com. (User: admin@internal-authz)
2017-12-25 08:52:51,325+02 ERROR [org.ovirt.engine.core.bll.network.host.SyncAllHostNetworksCommand] (default task-4) [2535d33c] Transaction rolled-back for command 'org.ovirt.engine.core.bll.network.host.SyncAllHostNetworksCommand'.
2017-12-25 08:52:51,337+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-4) [2535d33c] EVENT_ID: HOST_SYNC_ALL_NETWORKS_FAILED(10,900), Failed to sync all host zeus-vds1.qa.lab.tlv.redhat.com networks


Version-Release number of selected component (if applicable):
4.2.0.2-0.1.el7

How reproducible:
100% 

Steps to Reproduce:
Scenario1 - 
1. Create 2 DCs, run host in DC1
2. Create network called 'net1' on both DCs, on DC1 set it as VM network, on DC2 set it as non-VM network. Attach net1 to host in DC1 with static IP without GW.
3. Set host to maintenance and  Move the host to DC2(net1 network is now out-of-sync and non-VM network in DC2)
4. Try to sync the network

Scenario2 - 
1. Create 2 DCs, run host in DC1
2. Create network called 'net1' on both DCs, on DC1 set it with vlan tag 11, on DC2 set it as non-vlan network. Attach 'net1' to host in DC1 with static IP without GW.
3. Set host to maintenance and  Move the host to DC2(net1 network is now out-of-sync and non-vlan network in DC2)
4. Try to sync the network

Actual results:
Failed - engine expecting to set GW 

Expected results:
Sync should work if static IP has no gateway as well.

Comment 1 Red Hat Bugzilla Rules Engine 2017-12-26 15:38:56 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Michael Burman 2018-01-14 13:42:23 UTC
Verified on - 4.2.1.1-0.1.el7

Comment 3 Sandro Bonazzola 2018-02-12 11:51:54 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.