Reviewed:  https://review.openstack.org/566405
Committed: 
https://git.openstack.org/cgit/openstack/neutron/commit/?id=2e34279ec3f4e93a7eca1e89b307fdbeb15b211e
Submitter: Zuul
Branch:    master

commit 2e34279ec3f4e93a7eca1e89b307fdbeb15b211e
Author: Brian Haley <bha...@redhat.com>
Date:   Fri May 4 16:43:45 2018 -0400

    Fix lack of routes for neighbour IPv4 subnets
    
    According to [1], when a network contains more that one IPv4
    subnet, they are returned in the 'classless-static-routes'
    DHCP option, regardless of whether DHCP is enabled for them
    or not.
    
    However, the get_active_networks_info() method used for
    synchronizing networks after the dhcp agent restarts filters
    subnets with "enable_dhcp=True", which differs from the
    get_network_info() method.  This will block VM access to
    other VMs in the dhcp disabled subnets, even though they are
    in the same network.  This is visible by looking at the "opts"
    file before and after a restart.
    
    Change the dhcp agent to ask for all subnets in its
    get_active_networks_info() RPC call by adding an
    enable_dhcp_filter argument to toggle the behavior, with the
    default being True to not break backwards compatibility.
    
    Based on https://review.openstack.org/#/c/352530/ by Quan Tian.
    
    [1] https://review.openstack.org/#/c/125043/
    
    Change-Id: I11ca1d1a603d02587f3b8d4a5a52a96b0587d61f
    Closes-Bug: #1652654


** Changed in: neutron
       Status: In Progress => Fix Released

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

Title:
  Routes for neighbour subnets missing after dhcp agents restart

Status in neutron:
  Fix Released

Bug description:
  According to [1], when network contains more that one IPv4 subnets, report 
these subnets in 'classless-static-routes' DHCP option.
  However, the 'classless-static-routes' of dhcp disabled subnets will be 
deleted after dhcp agents restart because the 
DhcpRpcCallback.get_active_networks_info method used for synchronize networks 
filter subnets with "enable_dhcp=True". Then VMs can't access the other VMs in 
the dhcp disabled subnets in the same network.

  [1] https://review.openstack.org/#/c/125043/

  How to reproduce:

  1. create a network with two subnets in it, disable one subnet's dhcp.
  
+--------------------------------------+----------------------+----------------+-------------+
  | id                                   | name                 | cidr          
 | enable_dhcp |
  
+--------------------------------------+----------------------+----------------+-------------+
  | 1b14508b-a381-4d73-9128-c05661497c49 | subnet_dhcp_enabled  | 
192.168.1.0/24 | True        |
  | 3572a614-79f0-4b4d-8850-60e74225745a | subnet_dhcp_disabled | 
192.168.2.0/24 | False       |
  
+--------------------------------------+----------------------+----------------+-------------+

  At this time, dhcp opts should like this:

  $ cat neutron/dhcp/004a4f00-f8cf-4c11-a9e7-52bc9961c297/opts
  
tag:tag0,option:classless-static-route,192.168.2.0/24,0.0.0.0,0.0.0.0/0,192.168.1.1
  tag:tag0,249,192.168.2.0/24,0.0.0.0,0.0.0.0/0,192.168.1.1
  tag:tag0,option:router,192.168.1.1

  2. restart the dhcp agent, the "classless-static-routes" disappear

  $ cat neutron/dhcp/004a4f00-f8cf-4c11-a9e7-52bc9961c297/opts
  tag:tag0,option:router,192.168.1.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1652654/+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

Reply via email to