A few default gateways appeared in CentOS 7 (Fuel 8.0)

Bug #1520172 reported by Albert Syriy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Confirmed
High
Fuel Library (Deprecated)

Bug Description

Moving to CentOS 7 we faced the issue when a few default gateways appeared when an interface received configuration from DHCP. It's a CentOS behavior.
The possible workaround is add an item in the fuelmenu to choose which is default route is (between received gateways) and remove all other (unwanted). The parameter of GW should be pass to the testing environment (when fuelmenu doesn't run).

Steps to reproduce:
1. Configure one interface as internal network, the others for DHCP

# cat /etc/sysconfig/network-scripts/ifcfg-enp2s1
BOOTPROTO=none
IPADDR=10.20.0.2
DEVICE=enp2s1
ONBOOT=yes
TYPE=Ethernet
PREFIX=24

# cat /etc/sysconfig/network-scripts/ifcfg-ens34
BOOTPROTO=dhcp
DEVICE=ens34
ONBOOT=yes
TYPE=Ethernet

2. Run fuelmenu and save parameters. As the result the routing table has two (or more, depend on the number interfaces taking config from DHCP servers)
]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 172.18.201.1 0.0.0.0 UG 0 0 0 ens34
0.0.0.0 10.20.0.1 0.0.0.0 UG 0 0 0 enp2s1
10.20.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s1
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.18.201.0 0.0.0.0 255.255.255.0 U 0 0 0 ens34
172.18.201.0 0.0.0.0 255.255.255.0 U 0 0 0 ens34
[# ip route
default via 172.18.201.1 dev ens34 proto static metric 100
default via 10.20.0.1 dev enp2s1 proto static metric 101
10.20.0.0/24 dev enp2s1 proto kernel scope link src 10.20.0.2 metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.42.1
172.18.201.0/24 dev ens34 proto kernel scope link src 172.18.201.16
172.18.201.0/24 dev ens34 proto kernel scope link src 172.18.201.16 metric 100

The two default routes break down network
The user in such case should choose correct network default route configuration.

Albert Syriy (asyriy)
Changed in fuel:
milestone: none → 8.0
description: updated
Dmitry Pyzhov (dpyzhov)
tags: added: area-library team-linux
Revision history for this message
Albert Syriy (asyriy) wrote :

IMHO, the configuration with a few default routes in the routing table required intruding a human to take a decision.
Could we add the item "default route" in the network configuration screen ?

Maciej Relewicz (rlu)
Changed in fuel:
assignee: nobody → Fuel Library Team (fuel-library)
tags: added: covered-by-bp
Maciej Relewicz (rlu)
Changed in fuel:
status: New → Confirmed
Revision history for this message
Oleg S. Gelbukh (gelbuhos) wrote :

Default routes have different metrics, one with metric 100 will be preferred unless it is unreachable (i.e. interface is down), then the second one is used. How does it break network?

Dmitry Pyzhov (dpyzhov)
tags: added: feature-centos7
Revision history for this message
Oleg S. Gelbukh (gelbuhos) wrote :

@asryiy Albert, any updates on this? Otherwise it should be marked Incomplete since not moving for >month.

Revision history for this message
Albert Syriy (asyriy) wrote : Re: [Bug 1520172] Re: A few default gateways appeared in CentOS 7 (Fuel 8.0)
Download full text (3.6 KiB)

Hello,

In my opinion it's a bug (buggy configuration or misconfiguration), because
we have a few default gateways.
When default is an internal (or control) 10.20.0.x network, you can not
reach the Fuel master node outside.
Packages received from external network (for example 172.x.x.x), but
replies are sent (forwarded) to the default network, which is 10.20.0.x .
And only when you control network (10.20.0.x) is down, you will be able
communicate to outside.

So that reason we have to be able to define what is really default route
and don't have few of them.
The case you described (different metrics, few GWs) is possible when you
have a couple of path to the same "point" outside, and when one path is
down, you can use the other one. Our case is different, the control network
must not be reached out side by design.

Regrads,

Albert Syriy,

Software Engineer,
Mirantis

On Wed, Dec 30, 2015 at 7:16 PM, Oleg S. Gelbukh <<email address hidden>
> wrote:

> @asryiy Albert, any updates on this? Otherwise it should be marked
> Incomplete since not moving for >month.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1520172
>
> Title:
> A few default gateways appeared in CentOS 7 (Fuel 8.0)
>
> Status in Fuel for OpenStack:
> Confirmed
>
> Bug description:
> Moving to CentOS 7 we faced the issue when a few default gateways
> appeared when an interface received configuration from DHCP. It's a CentOS
> behavior.
> The possible workaround is add an item in the fuelmenu to choose which
> is default route is (between received gateways) and remove all other
> (unwanted). The parameter of GW should be pass to the testing environment
> (when fuelmenu doesn't run).
>
> Steps to reproduce:
> 1. Configure one interface as internal network, the others for DHCP
>
> # cat /etc/sysconfig/network-scripts/ifcfg-enp2s1
> BOOTPROTO=none
> IPADDR=10.20.0.2
> DEVICE=enp2s1
> ONBOOT=yes
> TYPE=Ethernet
> PREFIX=24
>
> # cat /etc/sysconfig/network-scripts/ifcfg-ens34
> BOOTPROTO=dhcp
> DEVICE=ens34
> ONBOOT=yes
> TYPE=Ethernet
>
> 2. Run fuelmenu and save parameters. As the result the routing table has
> two (or more, depend on the number interfaces taking config from DHCP
> servers)
> ]# netstat -nr
> Kernel IP routing table
> Destination Gateway Genmask Flags MSS Window irtt
> Iface
> 0.0.0.0 172.18.201.1 0.0.0.0 UG 0 0 0
> ens34
> 0.0.0.0 10.20.0.1 0.0.0.0 UG 0 0 0
> enp2s1
> 10.20.0.0 0.0.0.0 255.255.255.0 U 0 0 0
> enp2s1
> 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0
> docker0
> 172.18.201.0 0.0.0.0 255.255.255.0 U 0 0 0
> ens34
> 172.18.201.0 0.0.0.0 255.255.255.0 U 0 0 0
> ens34
> [# ip route
> default via 172.18.201.1 dev ens34 proto static metric 100
> default via 10.20.0.1 dev enp2s1 proto static metric 101
> 10.20.0.0/24 dev enp2s1 proto kernel scope link src 10.20.0.2
> metric 100
> 172.17.0.0/1...

Read more...

Revision history for this message
Bartosz Kupidura (zynzel) wrote :

In current iso (fuel-8.0-391-2016-01-03_14-01-11.iso) there is no way to remove 'default gateway' from 10.20.0.1 in fuelmenu.

Ex.
eth0 (10.20.0.0/24) - fuel admin interface
eth1 (172.16.0.0/24) - interface in public network

There is no way to remove gateway from eth0 (10.20.0.1) and put it on eth1 (172.16.0.1). This way fuel master can't be deployed (no internet access)

Revision history for this message
Albert Syriy (asyriy) wrote :
Download full text (3.2 KiB)

You can use a trick, down admin interface and up.
ifdown eth0
ifup eth0.

In such case the order of "default gateway" will be changed and will be
able access to the master node.

Regards,

Albert Syriy,

Software Engineer,
Mirantis

On Tue, Jan 5, 2016 at 11:31 AM, Bartosz Kupidura <email address hidden>
wrote:

> In current iso (fuel-8.0-391-2016-01-03_14-01-11.iso) there is no way to
> remove 'default gateway' from 10.20.0.1 in fuelmenu.
>
> Ex.
> eth0 (10.20.0.0/24) - fuel admin interface
> eth1 (172.16.0.0/24) - interface in public network
>
> There is no way to remove gateway from eth0 (10.20.0.1) and put it on
> eth1 (172.16.0.1). This way fuel master can't be deployed (no internet
> access)
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1520172
>
> Title:
> A few default gateways appeared in CentOS 7 (Fuel 8.0)
>
> Status in Fuel for OpenStack:
> Confirmed
>
> Bug description:
> Moving to CentOS 7 we faced the issue when a few default gateways
> appeared when an interface received configuration from DHCP. It's a CentOS
> behavior.
> The possible workaround is add an item in the fuelmenu to choose which
> is default route is (between received gateways) and remove all other
> (unwanted). The parameter of GW should be pass to the testing environment
> (when fuelmenu doesn't run).
>
> Steps to reproduce:
> 1. Configure one interface as internal network, the others for DHCP
>
> # cat /etc/sysconfig/network-scripts/ifcfg-enp2s1
> BOOTPROTO=none
> IPADDR=10.20.0.2
> DEVICE=enp2s1
> ONBOOT=yes
> TYPE=Ethernet
> PREFIX=24
>
> # cat /etc/sysconfig/network-scripts/ifcfg-ens34
> BOOTPROTO=dhcp
> DEVICE=ens34
> ONBOOT=yes
> TYPE=Ethernet
>
> 2. Run fuelmenu and save parameters. As the result the routing table has
> two (or more, depend on the number interfaces taking config from DHCP
> servers)
> ]# netstat -nr
> Kernel IP routing table
> Destination Gateway Genmask Flags MSS Window irtt
> Iface
> 0.0.0.0 172.18.201.1 0.0.0.0 UG 0 0 0
> ens34
> 0.0.0.0 10.20.0.1 0.0.0.0 UG 0 0 0
> enp2s1
> 10.20.0.0 0.0.0.0 255.255.255.0 U 0 0 0
> enp2s1
> 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0
> docker0
> 172.18.201.0 0.0.0.0 255.255.255.0 U 0 0 0
> ens34
> 172.18.201.0 0.0.0.0 255.255.255.0 U 0 0 0
> ens34
> [# ip route
> default via 172.18.201.1 dev ens34 proto static metric 100
> default via 10.20.0.1 dev enp2s1 proto static metric 101
> 10.20.0.0/24 dev enp2s1 proto kernel scope link src 10.20.0.2
> metric 100
> 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.42.1
> 172.18.201.0/24 dev ens34 proto kernel scope link src 172.18.201.16
> 172.18.201.0/24 dev ens34 proto kernel scope link src 172.18.201.16
> metric 100
>
> The two default routes break down network
> The user in such case should choose correct network default route
> configuration.
>
> To manage no...

Read more...

Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

This is a duplicate of https://bugs.launchpad.net/fuel/+bug/1528437 which is already on review.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.