Reviewed:  https://review.openstack.org/615206
Committed: 
https://git.openstack.org/cgit/openstack/neutron-tempest-plugin/commit/?id=21f5342de8b36c3c033d959b63451723e4fdbcf3
Submitter: Zuul
Branch:    master

commit 21f5342de8b36c3c033d959b63451723e4fdbcf3
Author: Slawek Kaplonski <skapl...@redhat.com>
Date:   Fri Nov 2 16:02:09 2018 +0100

    Fix creating subnet without gateway
    
    If create_subnet() method is called with gateway=None explicity,
    subnet should be created without gateway_ip specified.
    To achieve that "gateway_ip=null" should be passed in json in
    request's body to neutron server.
    This was missing, so neutron-server allocated gateway_ip automatically.
    Now gateway for such network will not be set as is expected.
    
    Closes-Bug: #1769609
    
    Change-Id: Ia9f0646a3cf371f82f2aa2dc22837249531d1ff5


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

Title:
  neutron-tempest-plugin: there is no way to create a subnet without a
  gateway and this breaks trunk tests

Status in neutron:
  Fix Released

Bug description:
  This commit [0] fixed an issue with the subnet CIDR generation in tempest 
tests.
  With the fix all subnets will get a gateway assigned regardless that it's 
attached to a router or not so it may happen that the gateway port doesn't 
exist. Normally, this shouldn't be a big deal but for trunk ports it's 
currently an issue with test_subport_connectivity [1] where the test boots a VM 
(advanced image) and then opens an SSH connection to its FIP to configure the 
interface for the subport and runs dhclient on it.

  When dhclient runs, a new default gateway route is installed and the
  connectivity to the FIP is lost thus making the test to fail as it
  fails to execute/read any further commands:

  I logged into the VM with virsh and checked the routes:

  [root@tempest-server-test-378882328 ~]# ip r
  default via 10.100.0.17 dev eth0.10
  default via 10.100.0.1 dev eth0 proto static metric 100
  default via 10.100.0.17 dev eth0.10 proto static metric 400
  10.100.0.0/28 dev eth0 proto kernel scope link src 10.100.0.5 metric 100
  10.100.0.16/28 dev eth0.10 proto kernel scope link src 10.100.0.25
  169.254.169.254 via 10.100.0.18 dev eth0.10 proto dhcp
  169.254.169.254 via 10.100.0.2 dev eth0 proto dhcp metric 100

  This shouldn't happen as the subnet is not even connected to a router
  and also 10.100.0.17 doesn't even exist in Neutron. Prior to [0] it
  didn't fail because old code would create the subnet with gateway=None
  and it was skipped (actually it will only setup a gateway
  automatically if gateway equals to '' [2] but it was None instead
  [3]).

  Let's allow a way to have the ability to configure subnets without a
  gateway.

  [0] 
https://github.com/openstack/neutron-tempest-plugin/commit/0ddc93b1b19922d08bedf331b57c363535bb357e
  [1] 
https://github.com/openstack/neutron-tempest-plugin/blob/02a5e2b07680d8c4dd69d681ae9a01d92b4be0ac/neutron_tempest_plugin/scenario/test_trunk.py#L229
  [2] 
https://github.com/openstack/neutron-tempest-plugin/commit/0ddc93b1b19922d08bedf331b57c363535bb357e#diff-872f814e35c7437b9f42aef71a991279L295
  [3] 
https://github.com/openstack/neutron-tempest-plugin/commit/0ddc93b1b19922d08bedf331b57c363535bb357e#diff-2f4232239c10eae0d0688617a3e6f98dL238

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