← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1714007] Re: Incorrect assert in test_routers._verify_gateway_port under neutron tests

 

Reviewed:  https://review.openstack.org/507341
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3d1b33633fffcc2ea5731d381fe9123a623292b3
Submitter: Jenkins
Branch:    master

commit 3d1b33633fffcc2ea5731d381fe9123a623292b3
Author: Dongcan Ye <hellochosen@xxxxxxxxx>
Date:   Tue Sep 26 11:52:35 2017 +0800

    Fix _verify_gateway_port() in multiple subnets
    
    The original code asserts that gw port's fixed_ips allocated from
    the first subnet of external network. This will fails if external
    network have multiple subnets.
    
    Change-Id: I1a2d433b36a0cb72fc3e6dc3b377e0ca56fc6f7a
    Closes-Bug: #1714007


** 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/1714007

Title:
  Incorrect assert in test_routers._verify_gateway_port  under neutron
  tests

Status in neutron:
  Fix Released

Bug description:
  _verify_gateway_port() has the following code, which seems to be
  trying to assert that the fixed ip of the port on the router is
  allocated from an appropriate public subnet. Since it only takes the
  first subnet of the public network, this will always fail if the ip of
  the port is in a different subnet.

          public_net_body = self.admin_client.show_network(
              CONF.network.public_network_id)
          public_subnet_id = public_net_body['network']['subnets'][0]
          self.assertIn(public_subnet_id,
                        [x['subnet_id'] for x in fixed_ips])

  Similar bug: https://bugs.launchpad.net/tempest/+bug/1624057
  The above bug has been fixed in openstack/tempest 14.0 onwards, however bug fix for same tests are not reflected under openstack/neutron tests.

  This causes the following neutron tests to fail when having multiple
  public subnets :

  neutron.tests.tempest.api.test_routers.RoutersTest.test_update_router_set_gateway_with_snat_explicit
  neutron.tests.tempest.api.test_routers.RoutersTest.test_update_router_set_gateway_without_snat
  neutron.tests.tempest.api.test_routers.RoutersTest.test_update_router_reset_gateway_without_snat

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


References