Bug 798450

Summary: netcf doesn't update the gateway device
Product: Red Hat Enterprise Linux 6 Reporter: Jonathan Bayer <jbayer>
Component: netcfAssignee: Laine Stump <laine>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1CC: dallan, dyuan, mzhan, rwu, ydu, yupzhang, zhpeng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-05 23:04:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Script to install necessary RPMs and then to download and install current version of libvirt and virt-manager none

Description Jonathan Bayer 2012-02-28 21:35:28 UTC
Created attachment 566402 [details]
Script to install necessary RPMs and then to download and install current version of libvirt and virt-manager

Description of problem:

Using virt-manager, I converted the gateway device, eth0, into a bridge.  Everything worked except that the routing was not working.  Upon investigation I found that the GATEWAYDEV in /etc/sysconfig/network was not updated, it still said eth0 instead of br0

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.  Use virt-manager to change the gateway device into a bridge
2.
3.
  
Actual results:

GATEWAYDEV not updated in /etc/sysconfig/network, causing routing to fail

Expected results:

GATEWAYDEV should have been updated to point to the bridge, br0

Additional info:

This was a fresh, minimal install of 6.1
I downloaded and installed the latest version of virt-manager directly from the website

Comment 2 Laine Stump 2012-05-11 19:47:53 UTC
This poses an interesting problem, because /etc/sysconfig/network in general (and GATEWAYDEV in particular) is a *system* network configuration setting, while libvirt's virInterface*() APIs are all geared towards configuring a single interface (or related set of interfaces).

The model that the virInterface APIs works well with is when the default gateway is specified in the configuration for one of the interfaces.

One possibility would be to add an optional gatewayDev='yes|no' attribute to each interface's <route> element, but this would lead to ambiguity (what should happen if gatewayDev='yes' is encountered when defining a new interface if it's already set for an existing interface? error or override? And what if <route gateway> is also set for that interface? Should we then still set GATEWAY=x.x.x.x in that interface's ifcfg file? Or, because gatewayDev is also set, only set GATEWAY=x.x.x.x in /etc/sysconfig/network? And where does the DEFROUTE setting in the ifcfg file fit into all of this?

Or should these settings in /etc/sysconfig/network be considered deprecated, and any encounter with them cause GATEWAY=x.x.x.x to be set in the relevant ifcfg file? I haven't encountered a system that used

Comment 3 Laine Stump 2012-05-18 18:14:02 UTC
Bug 822989 is a related problem.

Comment 5 RHEL Program Management 2012-07-10 08:27:42 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 RHEL Program Management 2012-07-11 00:02:57 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 7 Laine Stump 2012-08-05 23:04:05 UTC
Examination of the NetworkManager source, as well as experimentation (and a discussion with NM's main developer) revealed that NM doesn't support GATEWAYDEV (or GATEWAY). This being the case, it appears that getting a default route by way of specifying GATEWAYDEV or GATEWAY in /etc/sysconfig/network is deprecated in favor of setting GATEWAY[n] and DEFROUTE in the individual ifcfg-* files in /etc/sysconfig/network-scripts (which give as much control, but in a more useful manner)

Based on that investigation, I'm closing this bug as WONTFIX. If that has an adverse impact on you, please open a ticket with Red Hat support to escalate the issue appropriately.