[ovs-dev] [PATCH] rhel: Enable DHCP in redhat network scripts.

Alexey I. Froloff raorn at altlinux.org
Wed Jan 25 12:54:56 UTC 2012


On Tue, Jan 24, 2012 at 09:30:15AM -0800, Ben Pfaff wrote:
> Should we skip the "post" call for OVSIntPort?  We know that these
> ports are not physical ports, so they will not allow DHCP to complete.
I believe DHCP is allowed on these ports, but you are right - no
need to delay bridge configuration in this particular case.

> Should we only delay bringing up the bridge port when DHCP is in use?
> It seems nicer to bring up the bridge port immediately if we can.
These scripts are mostly hacks.  Open vSwitch support need deeper
integration with initscripts package, which includes
modifications to ifup-eth script.

Or we could try another solution.  For each OVSBridge we should
provide list of physical ports that are added to bridge.
Previously, I didn't like this idea, since you need to maintain
both, the physical port configuration files and list of ports in
bridge config, but we have such list in OVSBond config already...

This is what I am thinking now:

-- example 1 --
DEVICE=ovsbr0
BOOTPROTO=dhcp
DEVICETYPE=ovs
TYPE=OVSBridge
OVS_OPTIONS="<options>"
OVS_EXTRA="<extra>"

PORT0_DEVICE=eth0
PORT0_TYPE=OVSPort
PORT0_OPTIONS="<options0>"
PORT0_EXTRA="<extra0>"

PORT1_DEVICE=eth1
PORT1_TYPE=OVSPort
PORT1_OPTIONS="<options1>"
PORT1_EXTRA="<extra1>"
-- example 1 --

-- example 2 --
DEVICE=ovsbr1
BOOTPROTO=dhcp
DEVICETYPE=ovs
TYPE=OVSBridge

PORT0_DEVICE=bond1
PORT0_TYPE=OVSBond
PORT0_BOND_IFACES="eth2 eth3 eth4"
PORT0_OPTIONS="<options1>"
PORT0_EXTRA="<extra1>"
-- example 2 --

In this case you'll only need ifcfg-*'s for physical ports,
OVSBridge and OVSIntPort.  OVSPort and OVSBond are hidden inside
bridge configuration.  And when you ifup the bridge, you are sure
that all ports (except OVSIntPort's) are added to the bridge.

Downside of this approach is that interface config will be almost
as complex as "ovs-vsctl --help" output ;-)

> Alexey: what do you think of these changes?
This is as hacky as the whole "RedHat support" stuff, so I think
it's OK.  I'll try to make some code in a couple of days.

-- 
Regards,    --
Sir Raorn.   --- http://thousandsofhate.blogspot.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20120125/10ecf509/attachment-0003.sig>


More information about the dev mailing list