[Yahoo-eng-team] [Bug 1663165] [NEW] network_data from metadata agent does not contain local routes for adjacent subnets

2017-02-09 Thread Joshua Griffiths
Public bug reported:

Description
---
The network_data.json provided by the config drive/metadata service is missing 
local routes for adjacent subnets.

When using DHCP, these routes *are* provided via neutron's DHCP agent
correctly.

Steps to Reproduce
--
* Create a new network in Neutron with 2 subnets: 192.168.0.0/24 and 
192.168.1.0/24 with gateways 192.168.0.1 and 192.168.1.1 respectively.
* Launch a new instance with an address in subnet 192.168.0.0/24 .
* Inspect the available metadata in `openstack/latest/network_data.json`

Expected Behaviour
--
There should be two routes specified in `network_data.json`:
* network: 0.0.0.0, netmask: 0.0.0.0,   gateway: 192.168.0.1
* network: 192.168.1.0, netmask: 255.255.255.0, gateway: 0.0.0.0

Actual Behaviour

There is only one route specified in `network_data.json`:
* network: 0.0.0.0, netmask: 0.0.0.0,   gateway: 192.168.0.1

Environment
---
* Ubuntu 14.04
* stable/newton - latest release from Git

=

For reference to Neutron's behaviour, see: [neutron.agent.linux.dhcp]

NOTE: this is also not properly implemented in cloud-init's static
networking implementation and an issue is currently open
HERE:[https://bugs.launchpad.net/cloud-init/+bug/1663049]. This may be
relevant for anybody attempting to test the behaviour.

** Affects: nova
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1663165

Title:
  network_data from metadata agent does not contain local routes for
  adjacent subnets

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ---
  The network_data.json provided by the config drive/metadata service is 
missing local routes for adjacent subnets.

  When using DHCP, these routes *are* provided via neutron's DHCP agent
  correctly.

  Steps to Reproduce
  --
  * Create a new network in Neutron with 2 subnets: 192.168.0.0/24 and 
192.168.1.0/24 with gateways 192.168.0.1 and 192.168.1.1 respectively.
  * Launch a new instance with an address in subnet 192.168.0.0/24 .
  * Inspect the available metadata in `openstack/latest/network_data.json`

  Expected Behaviour
  --
  There should be two routes specified in `network_data.json`:
  * network: 0.0.0.0, netmask: 0.0.0.0,   gateway: 192.168.0.1
  * network: 192.168.1.0, netmask: 255.255.255.0, gateway: 0.0.0.0

  Actual Behaviour
  
  There is only one route specified in `network_data.json`:
  * network: 0.0.0.0, netmask: 0.0.0.0,   gateway: 192.168.0.1

  Environment
  ---
  * Ubuntu 14.04
  * stable/newton - latest release from Git

  =

  For reference to Neutron's behaviour, see: [neutron.agent.linux.dhcp]

  NOTE: this is also not properly implemented in cloud-init's static
  networking implementation and an issue is currently open
  HERE:[https://bugs.launchpad.net/cloud-init/+bug/1663049]. This may be
  relevant for anybody attempting to test the behaviour.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1663165/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1663049] [NEW] Local routes are not configured correctly in /etc/network/interfaces

2017-02-08 Thread Joshua Griffiths
Public bug reported:

For Debian-based platforms, additional, local routes are not added
correctly in /etc/network/interfaces.

For example, I may have interface `eth0` with address 192.168.0.10/24
but I need to add a *local* route to 192.168.1.0/24 where this subnet is
available on the same physical network - NOT via a gateway.

In this case, my route would look like:
{
"network": "192.168.1.0",
"netmask": "255.255.255.0",
"gateway": "0.0.0.0"
}

The gateway of "0.0.0.0" signifies that this is a local route and a
gateway is not required.

I would expect that /etc/network/interfaces configuration for this route looks 
like one of the below:
---
post-up route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0
post-up ip route add 192.168.1.0/24 dev eth0
---

However, the configuration looks like:
---
post-up route add -net 192.168.1.0 netmask 255.255.255.0 gw 0.0.0.0
---

The `dev eth0` is especially important here as the route table needs to
know which physical interface the subnet is available on.

Whilst this may seem like a very unlikely scenario, this sort of routing
is much more common when the IP addresses are on public subnets and it's
preferable to have them communicate locally rather than via the gateway.

Additionally, it seems that using OpenStack's DHCP to configure the
networking instead does achieve the desired behaviour.

This is working correctly on RHEL-based platforms but I've not tested
any other distros.

For reference, the relevant code is in
`cloudinit.net.eni.Renderer._render_route`

** Affects: cloud-init
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1663049

Title:
  Local routes are not configured correctly in /etc/network/interfaces

Status in cloud-init:
  New

Bug description:
  For Debian-based platforms, additional, local routes are not added
  correctly in /etc/network/interfaces.

  For example, I may have interface `eth0` with address 192.168.0.10/24
  but I need to add a *local* route to 192.168.1.0/24 where this subnet
  is available on the same physical network - NOT via a gateway.

  In this case, my route would look like:
  {
  "network": "192.168.1.0",
  "netmask": "255.255.255.0",
  "gateway": "0.0.0.0"
  }

  The gateway of "0.0.0.0" signifies that this is a local route and a
  gateway is not required.

  I would expect that /etc/network/interfaces configuration for this route 
looks like one of the below:
  ---
  post-up route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0
  post-up ip route add 192.168.1.0/24 dev eth0
  ---

  However, the configuration looks like:
  ---
  post-up route add -net 192.168.1.0 netmask 255.255.255.0 gw 0.0.0.0
  ---

  The `dev eth0` is especially important here as the route table needs
  to know which physical interface the subnet is available on.

  Whilst this may seem like a very unlikely scenario, this sort of
  routing is much more common when the IP addresses are on public
  subnets and it's preferable to have them communicate locally rather
  than via the gateway.

  Additionally, it seems that using OpenStack's DHCP to configure the
  networking instead does achieve the desired behaviour.

  This is working correctly on RHEL-based platforms but I've not tested
  any other distros.

  For reference, the relevant code is in
  `cloudinit.net.eni.Renderer._render_route`

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1663049/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp