[Engine-devel] network features review

Simon Grinberg simon at redhat.com
Tue May 22 14:42:47 UTC 2012



----- Original Message -----
> From: "Dan Kenigsberg" <danken at redhat.com>
> To: "avi tal" <atal at redhat.com>
> Cc: engine-devel at ovirt.org
> Sent: Tuesday, May 22, 2012 4:54:09 PM
> Subject: Re: [Engine-devel] network  features review
> 
> On Tue, May 22, 2012 at 03:53:56PM +0300, avi tal wrote:
> > On 05/22/2012 03:06 PM, Livnat Peer wrote:
> > >On 22/05/12 14:35, avi tal wrote:
> > >>On 05/22/2012 11:45 AM, Livnat Peer wrote:
> > >>>Hi All,
> > >>>
> > >>>This is a summary of comments we(*) gathered while reviewing the
> > >>>current
> > >>>network related functionality in oVirt, we'll open the relevant
> > >>>RFE/Bugs
> > >>>but wanted to share first to get comments:
> > >>>
> > >>>
> > >>>Default Gateway:
> > >>>----------------
> > >>>current status -
> > >>>    In the UI/API we expose to the user the possibility to
> > >>>    configure the
> > >>>    default gateway for the host. We expose this option only
> > >>>    when editing
> > >>>    the management network.
> > >>>
> > >>>comments -
> > >>>Apparently we do not configure the host default gateway but the
> > >>>network gateway.
> > >>>
> > >>>1. We need to fix the phrasing to gateway (not default gateway)
> > >>not true. especially in linux we configure "default gateway".
> > >>unlike
> > >>windows which holds gateway for each interface, linux holds only
> > >>one
> > >>default gateway.
> > >I'll leave this one to Danken.
> > 
> > Running POC in my machine:
> > # cat ifcfg-eth1
> > DEVICE=eth1
> > ONBOOT=yes
> > BOOTPROTO=static
> > IPADDR=X.Y.129.10
> > NETMASK=255.255.255.0
> > GATEWAY=X.Y.129.254
> > 
> > # cat ifcfg-eth2
> > DEVICE=eth2
> > ONBOOT=yes
> > BOOTPROTO=static
> > IPADDR=X.Y.127.10
> > NETMASK=255.255.255.0
> > GATEWAY=X.Y.127.254
> > 
> > # cat /etc/sysconfig/network
> > NETWORKING=yes
> > HOSTNAME=...
> > GATEWAY=X.Y.128.254
> > 
> > # service network restart
> > # route -n
> > Kernel IP routing table
> > Destination     Gateway         Genmask         Flags Metric Ref
> > Use Iface
> > X.Y.129.0     0.0.0.0         255.255.255.0   U     0      0
> >        0 eth1
> > X.Y.127.0     0.0.0.0         255.255.255.0   U     0      0
> >        0 eth2
> > 169.254.0.0     0.0.0.0         255.255.0.0     U     1003   0
> >        0 eth1
> > 169.254.0.0     0.0.0.0         255.255.0.0     U     1004   0
> >        0 eth2
> > 169.254.0.0     0.0.0.0         255.255.0.0     U     1005   0
> >        0 eth3
> > 0.0.0.0         X.Y.127.254   0.0.0.0         UG    0      0
> >        0 eth2
> > 
> > 
> > NOTE: we can add static routing to each interface using
> > route-<interface>
> 
> I am afraid that I've been misleading Livnat and Simon in private
> communications. I've repressed this fact for a long while, but
> apparently
> initscripts's usage of GATEWAY, be it in interface or hostwide
> config, is to
> set the host's default gateway.
> /etc/sysconfig/network-scripts/ifup-eth :
> 
>        if [ -n "${GATEWAY}" ] ...; then
>             ip route replace default ${METRIC:+metric $METRIC} \
>                 via ${GATEWAY} ${WINDOW:+window $WINDOW} ${SRC} \
>                 ${GATEWAYDEV:+dev $GATEWAYDEV} ...
> 
> 
> This means that oVirt's current behavior is ok as it is - we set
> GATEWAY
> for a single network that is always on, and thus control the host's
> default gateway.

Did not read the entire thread yet, but just relating to this one.
Current behaviour is not OK in any case, engine only supports setting default gateway on the management network - not on a selected network. This is not always the case.
Actually many times the management network will be segregated where the engine and the nodes are on the same VLAN - no need for default gateway, while the clients are on the remote network thus the default gateway is requested to be on the Display network. 

The simple solution to properly support a single default gateway as interface independent is to place it in /etc/sysconfig/network. And remove it from a specific network dialogue. Make it a host level config.

The only misleading information you gave is that if engine will provide a GATEWAY per network and then a hosts level config in /etc/sysconfig/network this will allow for per network gateway + one default gateway. This is not the case and when testing that I realized it does not work. This is why I did not open the RFE we've discussed 

I'm still investigating how to support multiple gateways, probably through iproute2 policy tables. However this change is not trivial so I recommend ATM to focus on the relevantly minor change of setting host level gateway and not network level.  

Simon. 



> 
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel
> 



More information about the Devel mailing list