Bug 1134569
Summary: | virsh iface-bridge throws away static config parameters from the old interface config file | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Edgar Hoch <edgar.hoch> |
Component: | netcf | Assignee: | Laine Stump <laine> |
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 21 | CC: | agedosier, berrange, clalancette, itamar, jforbes, laine, libvirt-maint, veillard, virt-maint |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-12-02 03:33:01 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Edgar Hoch
2014-08-27 19:48:24 UTC
Here my manual commands to convert a simple ethernet interface to bridge. Assume the network interface is em1, and NetworkManager is running. cp -a /etc/sysconfig/network-scripts/ifcfg-em1 /root cp -a /root/ifcfg-em1 /root/ifcfg-em1.orig cp -a /root/ifcfg-em1 /root/ifcfg-brem1 sed -n -e ' /DEVICE=/ { p ; s/DEVICE=/BRIDGE=br/ ; p } /HWADDR=/ p /ONBOOT=/ p /TYPE=/ p /UUID=/ p /NAME=/ p ' /root/ifcfg-em1.orig > /root/ifcfg-em1 sed -e ' /DEVICE=/ { s/DEVICE=/DEVICE=br/ } /TYPE=/ { s/TYPE=Ethernet/TYPE=Bridge/} /NAME=/ { s/NAME="System /NAME="System br/ } /HWADDR=/ { s/^/# / } /UUID=/ { s/^/# / } ' /root/ifcfg-em1.orig > /root/ifcfg-brem1 /bin/cp -af /root/ifcfg-brem1 /root/ifcfg-em1 /etc/sysconfig/network-scripts/ & systemctl restart NetworkManager.service & Notes: The background commands (the "&" char) is neccessary when doing this while connected over ssh, because otherwise the command may loose network connection and "hang". I use "cp -a" to keep the selinux file context. /root/ifcfg-brem1 and /root/ifcfg-em1 must be copied "at the same time", because NetworkManager will detect the change of the files (new file, modified file) and will (re)read them and change the network interfaces according to the new values. But it cannot change the interface from Type Ethernet to Type Bridge on the fly - this is the reason for restarting NetworkManager. I am not sure if this will always work (sometimes I got the message "NetworkManager[13298]: <warn> (brem1): cannot use existing bridge for 'System brem1'"). You should have access to the console if the network connection is lost. You may alternativly reboot the system. I assume that virsh will use other mechanisms than sed, but the script demonstrate what "virsh iface-bridge" should do. virsh iface-bridge uses the netcf library to read the netdev configuration as an XML document, then modifies that XML document and defines the new bridge based on that. The problem is that there are several settings in the ifcfg file that aren't recognized by netcf when it is translating between ifcfg and xml. I'm moving this BZ to netcf to remind me to add recognition for more fields (I recently added recognition of IPADDR0/PREFIX0/NETMASK0/GATEWAY0) This message is a reminder that Fedora 21 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '21'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 21 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |