Bug 1381147

Summary: [OVS] - Overwrite existing static default route
Product: [oVirt] vdsm Reporter: Petr Horáček <phoracek>
Component: GeneralAssignee: Petr Horáček <phoracek>
Status: CLOSED CURRENTRELEASE QA Contact: Meni Yakove <myakove>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.18.15CC: bugs, danken, gklein, mburman, phoracek, ylavi
Target Milestone: ovirt-4.1.0-alphaFlags: rule-engine: ovirt-4.1+
Target Release: 4.18.16   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-01 14:46:32 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:
Bug Depends On:    
Bug Blocks: 1195208    

Description Petr Horáček 2016-10-03 09:02:48 UTC
Description of problem:
We are not able to setup an OVS network with static default route when there is already an existing one.


How reproducible:
Always.


Steps to Reproduce:
1. Run setupNetworks with defaultRoute=True and gateweay='...'


Actual results:
Setup fails with IPWrapper Error because of we cannot overwrite existing default route.


Expected results:
Just set it up.

Comment 1 Michael Burman 2016-11-20 12:53:28 UTC
Hi Petr, please provide us the steps to test this report, because we not sure how.

Another think that maybe relevant here, when setting a gateway over an ovs network via setup networks, we end up with network as out-of-sync and no gateway reported in caps for this network.

Comment 2 Michael Burman 2016-11-21 07:11:30 UTC
engine pass ipv4Gateway='null' to vdsm

Please tell if it's related to this bug or deserves it's own bug

Comment 3 Dan Kenigsberg 2016-11-21 07:23:24 UTC
I'm redirecting the question to Petr, but Michael, could you specify the complete setupNetwork argument list? 'null' in quotes surprises me.

Comment 4 Michael Burman 2016-11-21 07:37:29 UTC
Ok, 

- So we first of all trying to figure out how exactly to test it. 
- Another thing that maybe relevant, when passing a gateway over ovs network, we end up as out-of-sync. This is the complete command. 

2016-11-21 08:46:18,841 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand] (default task-9) [686863fd] START, HostSetupNetworksVDSCommand(HostName = zeus-vds1.qa.lab.tlv.redhat.com, Host
SetupNetworksVdsCommandParameters:{runAsync='true', hostId='e6a65b9b-2752-4274-8b39-a4f7c5ae9ae4', vds='Host[zeus-vds1.qa.lab.tlv.redhat.com,e6a65b9b-2752-4274-8b39-a4f7c5ae9ae4]', rollbackOnFailure='true', connec
tivityTimeout='120', networks='[HostNetwork:{defaultRoute='false', bonding='false', networkName='ovs1', nicName='enp4s0', vlan='162', mtu='0', vmNetwork='true', stp='false', properties='[]', ipv4BootProtocol='STAT
IC_IP', ipv4Address='5.5.5.5', ipv4Netmask='24', ipv4Gateway='null', ipv6BootProtocol='NONE', ipv6Address='null', ipv6Prefix='null', ipv6Gateway='null'},
                HostNetwork:{defaultRoute='false', bonding='false', networkName='new-filter-net', nicName='ens1f1', vlan='166', mtu='0', vmNetwork='true', stp='false', properties='null', ipv4BootProtocol='NONE', i
pv4Address='null', ipv4Netmask='null', ipv4Gateway='null', ipv6BootProtocol='NONE', ipv6Address='null', ipv6Prefix='null', ipv6Gateway='null'}]', removedNetworks='[]', bonds='[]', removedBonds='[]', clusterSwitchT
ype='OVS'}), log id: 37b3ff6c

Comment 5 Petr Horáček 2016-11-23 12:44:01 UTC
Reproducer should be simple. When deploying a host, just use static IP instead of DHCP for management network (I don't know if it is possible to set it before deployment, if not, editing existing DHCP ovirtmgmt into static should be OK as well). Without our fix setupNetworks of static IP management network would fail.

Regarding the out-of-sync. OVS switch supports gateway settings only for the main management network (with defaultRoute='true'), we have not implemented source routing for non-management networks yet. Anyways, the gateway='null' I don't understand.

Comment 6 Michael Burman 2016-11-23 14:10:26 UTC
Thanks Petr, 

Verified on - vdsm-4.18.16-1.el7ev.x86_64 and 4.0.6-0.1.el7ev

The other issue(gateway=null) is tracked on BZ - 1397721