New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Bridge Interfaces #1553
Conversation
Bridge interfaces are widely used. This patch enables configurations as shown below: 1. Bridge over simple Ethernet 2. Bridge over Bond 3. Bridger over Vlan interface Bridges require the 'brctl' utility. This patch automatically includes the utility upon need. Usually, virtual interfaces are skipped, but for Bridges to work, we consider Bridges as physical interfaces, because the Bridge interface holds the IP address, not the physical interface attached to the Bridge. Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
Hello @rmetrich I have one question though, imagine that original system was setup without bridge-utils (containing V. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function bridge_handling should be added to lib/network-functions.sh instead of keeping it in script 310_network_devices.sh
.
The content of the pull request seems correct, but I cannot test it.
@gozora thanks, good point. Was already included in my kernel but who knows ... |
@gdha hello, please advise regarding the bridge_handling function: I don't understand your point, the bridge_handling function is used to create the bridge commands in the 60-network-devices.sh generated script. |
@rmetrich What I meant with the bridge_handling function is to move the function code itself to a library script (e.g. the |
@gdha hmm, here the function adds to generated script ($network_devices_setup_script), same as function vlan_setup and bond_setup, so should likely remain local. |
@rmetrich OK then - keep it together if you prefer that. |
@gdha Is there something special required from me? Such as squashing the commits? |
A side note regarding functions that are used only in one script: I prefer to keep local stuff local so that I prefer to have In particular because such functions are often a bit Because bash does not support local function ... such script-local function should be better 'unset -f' |
@jsmeix Sounds reasonable. Added the unset for all local functions in 310_network_devices.sh |
I'm not satisfied with my code, specially the bridges purely virtual (e.g. libvirt) get configured, which is useless. |
Superseded by #1570 |
Bridge interfaces are widely used. This patch enables configurations as
shown below:
Bridges require the 'brctl' utility. This patch automatically includes
the utility upon need.
Usually, virtual interfaces are skipped, but for Bridges to work, we
consider Bridges as physical interfaces, because the Bridge interface
holds the IP address, not the physical interface attached to the Bridge.
Signed-off-by: Renaud Métrich rmetrich@redhat.com