Red Hat Bugzilla – Bug 798450
netcf doesn't update the gateway device
Last modified: 2012-08-05 19:04:05 EDT
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):
Steps to Reproduce:
1. Use virt-manager to change the gateway device into a bridge
GATEWAYDEV not updated in /etc/sysconfig/network, causing routing to fail
GATEWAYDEV should have been updated to point to the bridge, br0
This was a fresh, minimal install of 6.1
I downloaded and installed the latest version of virt-manager directly from the website
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
Bug 822989 is a related problem.
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.
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.
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.