← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1769609] [NEW] neutron-tempest-plugin: there is no way to create a subnet without a gateway and this breaks trunk tests

 

Public bug reported:

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

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
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:
  New

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


Follow ups