> BOOTPROTO= will set the environment variable and then call
> ${OTHERSCRIPT} which is /etc/sysconfig/network-scripts/ifup-eth, right?
>
> In that script, there are these lines right on top of it:
> ...
>         CONFIG=${1}
>
>         need_config "${CONFIG}"
>
>         source_config
Thanks. I had forgotten about the source_config there.
v3 looks fine to me. I will apply it soon.

>
> Basically, it is finding the correct location of the config file and
> source_config will read including its variables.
>
> Therefore, if you set BOOTPROTO=dhcp in the ifcfg- file, the
> source_config will set it overwriting whatever you had before.
>
> If you don't set BOOTPROTO= in the ifcfg file, then remains what
> has been passed by the caller script which is OVSBOOTPROTO.
>
>> I may be missing a different path where setting BOOTPROTO initiates dhcp.
>
> Not sure what you meant here.  The dhclient is started by ifup-eth
> script. Perhaps you are confusing with bridge dhcp setup because
> in that case, any port requires the bridge to be UP, but not all
> ports give access to the dhcp server, so you have to decide whether
> to bring up with dhcp or without it (OVSBOOTPROTO= && OVSINTF)
>
>
>> > +* All the interfaces that can reach the DHCP server
>> > +as a space separated list in OVSDHCPINTERFACES.
>> > +
>> > +DEVICE=intbr0
>> > +ONBOOT=yes
>> > +DEVICETYPE=ovs
>> > +TYPE=OVSIntPort
>> > +OVS_BRIDGE=ovsbridge0
>> > +OVSBOOTPROTO="dhcp"
>> > +OVSDHCPINTERFACES="eth0"
>> > +HOTPLUG=no
>> > +
>> >  Adding physical eth0 to ovsbridge0 described above:
>> >
>> >  ==> ifcfg-eth0 <==
>> > diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs 
>> > b/rhel/etc_sysconfig_network-scripts_ifup-ovs
>> > index 3f31c30..3b8bb33 100755
>> > --- a/rhel/etc_sysconfig_network-scripts_ifup-ovs
>> > +++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs
>> > @@ -115,7 +115,12 @@ case "$TYPE" in
>> >         OVSIntPort)
>> >                 ifup_ovs_bridge
>> >                 ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port 
>> > "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" 
>> > type=internal ${OVS_EXTRA+-- $OVS_EXTRA}
>> > -               ${OTHERSCRIPT} ${CONFIG} ${2}
>> > +               if [ -n "${OVSDHCPINTERFACES}" ]; then
>> > +                       for _iface in "${OVSDHCPINTERFACES}"; do
>> I think either the quotes around $OVSDHCPINTERFACES (otherwise the for
>> loop is redundant) should be removed or we should get rid of the for
>> loop( If "ifup eth0 eth1" is accepted to work fine.)
>
> Oh, that's bug.  I've tested only with one interface, so it didn't
> matter.  I will send a v3 without the quotes.
>
>> > +                               /sbin/ifup ${_iface}
>> > +                       done
>> > +               fi
>> > +               BOOTPROTO=${OVSBOOTPROTO} ${OTHERSCRIPT} ${CONFIG} ${2}
>> If $OVSBOOTPROTO has more than a word in it, I think the above will
>> give a syntax error. I think you should add quotes around it.
>
> Ok.
>
> Thanks for reviewing it.
> fbl
>
>
>> >                 ;;
>> >         OVSBond)
>> >                 ifup_ovs_bridge
>> > --
>> > 1.8.4.2
>> >
>>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to