]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agotests: don't allow oslo.config to autodiscover config files
Ihar Hrachyshka [Fri, 10 Apr 2015 09:29:56 +0000 (11:29 +0200)]
tests: don't allow oslo.config to autodiscover config files

oslo.config makes attempts to autodiscover configuration files using
find_config_files() helper. If e.g. /etc/neutron/neutron.conf exists,
and is not readable, the following test failure can be experienced:

oslo_config.cfg.ConfigFilesPermissionDeniedError: Failed to open some
config files: /etc/neutron/neutron.conf

Unit tests must not rely on any external state of the system and run
successfully no matter whether neutron is actually installed on the
system, or not.

Closes-Bug: #1442543
Change-Id: Ic90d8c40b2072fdda152703b84081719936b5f4e
(cherry picked from commit 54fc39308277d4aedc3e399286714d719ecacfbb)

9 years agoMerge "Create bridges in ovsdb monitor functional tests" into stable/kilo
Jenkins [Sun, 7 Jun 2015 19:16:45 +0000 (19:16 +0000)]
Merge "Create bridges in ovsdb monitor functional tests" into stable/kilo

9 years agoDon't update floating IP status if no change
Kevin Benton [Fri, 17 Apr 2015 11:03:38 +0000 (04:03 -0700)]
Don't update floating IP status if no change

The floating IP status was going through all of the
status update code every time the L3 agent sent in
an update, even if the status didn't change.

This patch skips sending updates to the server if the
agent doesn't change the status.

Change-Id: Ic3736bed3dc3e4ccb91f4acfabbf033949e09ce0
Partial-Bug: #1445412
(cherry picked from commit c44506bfd60b2dd6036e113464f1ea682cfaeb6c)

9 years agoMerge "Fix the ImportErrors in l3 and dhcp scheduler functional tests" into stable...
Jenkins [Tue, 2 Jun 2015 12:13:36 +0000 (12:13 +0000)]
Merge "Fix the ImportErrors in l3 and dhcp scheduler functional tests" into stable/kilo

9 years agoBlock subnet create when a network hosts subnets allocated from different pools
Ryan Tidwell [Mon, 4 May 2015 22:56:41 +0000 (15:56 -0700)]
Block subnet create when a network hosts subnets allocated from different pools

This change will ensure that all subnets with the same ip_version on a given
network have been allocated from the same subnet pool or no pool. This
provides cleaner subnet overlap detection.

Cherry-picked from 251f551a5fe8fe05cdc8c9b9cfad357245b39bb9

Change-Id: I3c7366c69b10c202c0511126fbee6b3aac36759e
Closes-Bug: #1451559

9 years agoCreate bridges in ovsdb monitor functional tests
Jakub Libosvar [Wed, 22 Apr 2015 14:47:33 +0000 (16:47 +0200)]
Create bridges in ovsdb monitor functional tests

The test waits inside for output from 'ovsdb-client monitor Bridge'
command but the command makes output only if there is a bridge present
in ovsdb. This patch adds an OVSBridgeFixture to setup so every test
case has a bridge for sure.

Change-Id: I40e1c99ec956c92fa1c7763eb98f7f2ce6fcd226
Closes-Bug: 1447191
(cherry picked from commit aa57c364defec8519bbed06fbce5aae4b23f147f)

9 years agoMerge "Limit router gw ports' stateful fixed IPs to one per address family" into...
Jenkins [Mon, 1 Jun 2015 17:08:28 +0000 (17:08 +0000)]
Merge "Limit router gw ports' stateful fixed IPs to one per address family" into stable/kilo

9 years agoMerge "Ensure metadata network works with DVR" into stable/kilo
Jenkins [Mon, 1 Jun 2015 17:07:53 +0000 (17:07 +0000)]
Merge "Ensure metadata network works with DVR" into stable/kilo

9 years agoMerge "Updated from global requirements" into stable/kilo
Jenkins [Mon, 1 Jun 2015 14:59:06 +0000 (14:59 +0000)]
Merge "Updated from global requirements" into stable/kilo

9 years agoMerge "Support multiple IPv6 prefixes on internal router ports for an HA Router"...
Jenkins [Mon, 1 Jun 2015 14:53:53 +0000 (14:53 +0000)]
Merge "Support multiple IPv6 prefixes on internal router ports for an HA Router" into stable/kilo

9 years agoMerge "Block subnet create with mismatched IP versions" into stable/kilo
Jenkins [Mon, 1 Jun 2015 14:49:48 +0000 (14:49 +0000)]
Merge "Block subnet create with mismatched IP versions" into stable/kilo

9 years agoFix the ImportErrors in l3 and dhcp scheduler functional tests
Numan Siddique [Mon, 13 Apr 2015 15:22:33 +0000 (20:52 +0530)]
Fix the ImportErrors in l3 and dhcp scheduler functional tests

Change-Id: I5b8746d37173869f78a9c23834f10d630d2a36cd
Closes-bug: #1443480
(cherry picked from commit 791d57922b00857e3f8bb753bff9499f3c4e1ab9)

9 years agoSupport multiple IPv6 prefixes on internal router ports for an HA Router
sridhargaddam [Mon, 20 Apr 2015 10:29:54 +0000 (10:29 +0000)]
Support multiple IPv6 prefixes on internal router ports for an HA Router

As part of BP multiple IPv6 prefixes, we can have multiple IPv6 prefixes on
router internal ports. Patch, I7d4e8194815e626f1cfa267f77a3f2475fdfa3d1, adds
the necessary support for a legacy router.

For an HA router, instead of configuring the addresses on the router internal
ports we should be updating the keepalived config file and let keepalived
configure the addresses depending on the state of the router.

Following are the observations with the current code for an HA router.
1. IPv6 addresses are configured on the router internal ports (i.e., qr-xxx)
   irrespective of the state of the router. As the same IP is configured on multiple
   ports you will notice dadfailed status on the ports.
2. Keepalived configuration is not updated with the new IPv6 addresses.

This patch addresses the above issues for an HA Router.

Closes-Bug: #1446161
Partially-implements: blueprint multiple-ipv6-prefixes
Change-Id: Icb9a0e4e6e5deafbdc0135ce7e6b100b1725df66
(cherry picked from commit 99de7cdf700218a54fa6fc2e194cca3ccb35abd4)

9 years agoMerge "OVS-agent: Ignore IPv6 addresses for ARP spoofing prevention" into stable...
Jenkins [Mon, 1 Jun 2015 12:05:15 +0000 (12:05 +0000)]
Merge "OVS-agent: Ignore IPv6 addresses for ARP spoofing prevention" into stable/kilo

9 years agoMerge "Defer creation of router JSON in get_routers RPC" into stable/kilo
Jenkins [Sat, 30 May 2015 16:28:31 +0000 (16:28 +0000)]
Merge "Defer creation of router JSON in get_routers RPC" into stable/kilo

9 years agoMerge "Match order of iptables arguments to iptables-save" into stable/kilo
Jenkins [Fri, 29 May 2015 20:30:06 +0000 (20:30 +0000)]
Merge "Match order of iptables arguments to iptables-save" into stable/kilo

9 years agoMerge "Handle no ofport in get_vif_port_to_ofport_map" into stable/kilo
Jenkins [Fri, 29 May 2015 17:08:11 +0000 (17:08 +0000)]
Merge "Handle no ofport in get_vif_port_to_ofport_map" into stable/kilo

9 years agoMerge "Block allowed address pairs on other tenants' net" into stable/kilo
Jenkins [Fri, 29 May 2015 16:53:21 +0000 (16:53 +0000)]
Merge "Block allowed address pairs on other tenants' net" into stable/kilo

9 years agoMerge "Process port IP requests before subnet requests" into stable/kilo
Jenkins [Fri, 29 May 2015 16:01:53 +0000 (16:01 +0000)]
Merge "Process port IP requests before subnet requests" into stable/kilo

9 years agoMerge "Persist DHCP leases to a local database" into stable/kilo
Jenkins [Fri, 29 May 2015 11:40:03 +0000 (11:40 +0000)]
Merge "Persist DHCP leases to a local database" into stable/kilo

9 years agoOVS-agent: Ignore IPv6 addresses for ARP spoofing prevention
YAMAMOTO Takashi [Tue, 28 Apr 2015 03:37:22 +0000 (12:37 +0900)]
OVS-agent: Ignore IPv6 addresses for ARP spoofing prevention

The flow rules to match on ARP headers for spoofing prevention
fail to install when an IPv6 address is used. These should be
skipped since the ARP spoofing prevention doesn't apply to IPv6.

Conflicts:
neutron/tests/common/machine_fixtures.py

Co-authored-by: Kevin Benton <blak111@gmail.com>
Closes-Bug: #1449363
Change-Id: I4bb3135e62378c5c96d1ac0b646336ac9a637bde
(cherry picked from commit dbe7ba1868f35af0142f78c70693ed69e6f42ca3)

9 years agoMerge "remove router interface on Arista L3 plugin fails" into stable/kilo
Jenkins [Fri, 29 May 2015 01:43:07 +0000 (01:43 +0000)]
Merge "remove router interface on Arista L3 plugin fails" into stable/kilo

9 years agoProcess port IP requests before subnet requests
Kevin Benton [Thu, 28 May 2015 00:38:32 +0000 (17:38 -0700)]
Process port IP requests before subnet requests

When a port requests multiple fixed IPs, process the requests
for specific IP addresses before the ones asking for a subnet.
This prevents an error where the IP that was requested happens
to be the next up for allocation so the subnet request takes it
and causes a DBDuplicateEntry.

Closes-Bug: #1459467
Change-Id: I645565c7fe0c47c58d686b25020bb49a0b9089f5
(cherry picked from commit 817b45b6406d9730859535ac54d73ec5c85451d0)

9 years agoPersist DHCP leases to a local database
Kevin Benton [Tue, 26 May 2015 01:55:44 +0000 (18:55 -0700)]
Persist DHCP leases to a local database

Due to issues caused by dnsmasq restarts sending DHCPNAKs,
change Ieff0236670c1403b5d79ad8e50d7574c1b694e34 passed the
'dhcp-authoritative' option to dnsmasq. While this solved the
restart issue, it broke the multi-DHCP server scenario because
the dnsmasq instances will NAK requests to a server ID that
isn't their own.

Problem DHCP Request Lifecycle:

Client: DHCPDISCOVER(broadcast)
Server1: DHCPOFFER
Server2: DHCPOFFER
Client: DHCPREQUEST(broadcast with Server-ID=Server1)
Server1: DHCPACK
Server2: DHCPNAK(in response to observed DHCPREQUEST with other Server-ID)
          ^---Causes issues

This change removes the authoritative option so NAKs are not
send in response to DHCPREQUEST's to other servers. To handle
the original issue that Ieff0236670c1403b5d79ad8e50d7574c1b694e34
was inteded to address, this patch also allows changes to be persisted
to a local lease file.

In order to handle the issue where a DHCP server may be scheduled
to another agent, a fake lease file is generated for dnsmasq to start
with. The contents are populated based on all of the known ports for
a network. This should prevent dnsmasq from NAKing clients renewing
leases issued before it was restarted/rescheduled.

Closes-Bug: #1457900
Change-Id: Idc91602bf8c474467e596cbd5cbaa8898952c841
(cherry picked from commit 98d8ad911d07a20af18edb0cac4bcf141a83d969)

9 years agoMerge "Make sure OVS restarts when Exception occurred" into stable/kilo
Jenkins [Thu, 28 May 2015 02:58:34 +0000 (02:58 +0000)]
Merge "Make sure OVS restarts when Exception occurred" into stable/kilo

9 years agoMerge "Router is not unscheduled when the last port is deleted" into stable/kilo
Jenkins [Tue, 26 May 2015 18:37:13 +0000 (18:37 +0000)]
Merge "Router is not unscheduled when the last port is deleted" into stable/kilo

9 years agoBlock subnet create with mismatched IP versions
Ryan Tidwell [Tue, 14 Apr 2015 22:53:02 +0000 (15:53 -0700)]
Block subnet create with mismatched IP versions

Cherry picked from 615102520c0df3952347c3e176b60c0ddc97040b

Change-Id: Ic0a3baf0e956505999d2473ae85ebac90e0970cd
Closes-Bug: 1444146

9 years agoMatch order of iptables arguments to iptables-save
Kevin Benton [Sat, 16 May 2015 02:44:16 +0000 (19:44 -0700)]
Match order of iptables arguments to iptables-save

The way we were forming our iptables rules was not matching
the output of iptables-save. This caused the logic that preserves
counters to miss many of the rules.

This patch corrects the order for the comments and the allowed address
pairs to match the output order of iptables-save.

Closes-Bug: #1456823
Change-Id: I34c2249d0865485578767865c82414e1d813d563
(cherry picked from commit 12889f70e1ae547598f4c663e9da5b9bb03e347e)

9 years agoFix neutron tests
Assaf Muller [Wed, 13 May 2015 17:39:20 +0000 (13:39 -0400)]
Fix neutron tests

Tox updated to a new major version and changed some substitute
variables.

Change-Id: Ifd00abed7bf0a68d4d46d12230118022fa2292ef
Related-Bug: #1455102
(cherry picked from commit 0933f26b2c9772c457bb259cff7c8f648d29f620)

9 years agoMerge "Spawn RADVD only in the master HA router" into stable/kilo
Jenkins [Wed, 13 May 2015 20:13:46 +0000 (20:13 +0000)]
Merge "Spawn RADVD only in the master HA router" into stable/kilo

9 years agoLimit router gw ports' stateful fixed IPs to one per address family
Andrew Boik [Wed, 25 Mar 2015 20:05:41 +0000 (16:05 -0400)]
Limit router gw ports' stateful fixed IPs to one per address family

Validate a router's gateway port during a router update by ensuring
it has no more than one v4 fixed IP and one v6 (statefully-assigned)
fixed IP.

Note that there is no limit on v6 addresses from SLAAC and
DHCPv6-stateless subnets as they are automatically allocated.

Change-Id: I6a328048b99af39ab9497fd9f265d1a9b95b7148
Closes-Bug: 1438819
Partially-implements: blueprint multiple-ipv6-prefixes
(cherry picked from commit 1bfd86e1ef7148370798aa99c868d7f931fcbf78)

9 years agoremove router interface on Arista L3 plugin fails
Sukhdev Kapur [Sat, 9 May 2015 00:19:58 +0000 (17:19 -0700)]
remove router interface on Arista L3 plugin fails

The failure is because of mismatch of the
parameters to _validate_interface_info(). This patch removes
this code as it can be inherited from upstream

Change-Id: I5a92c6d05876e9ab5201e8fac018433eeb5c89e4
Closes-Bug: #1453323
(cherry picked from commit 9c857dab6289047a272a4519479903c92a84dc4c)

9 years agoMake sure OVS restarts when Exception occurred
watanabe.isao [Thu, 2 Apr 2015 01:54:56 +0000 (10:54 +0900)]
Make sure OVS restarts when Exception occurred

This fix let flows in br-tun automatically recover from an Exception,
which is an ideal situation.
Simplly improve a missed flag will make sure OVS restart properly
after we walked out of Exception loop.

Closes-Bug: #1439472
(cherry picked from commit d72572729152e709c5f7ebae2896d5f66748b59b)

Conflicts:
neutron/plugins/openvswitch/agent/ovs_neutron_agent.py

Change-Id: Id0ac9399ec39fef19ce71566670ed245c681192e

9 years agoBlock allowed address pairs on other tenants' net
Kevin Benton [Tue, 21 Apr 2015 09:01:39 +0000 (02:01 -0700)]
Block allowed address pairs on other tenants' net

Don't allow tenants to use the allowed address pairs extension
when they are attaching a port to a network that does not belong
to them.

This is done because allowed address pairs can allow things like
ARP spoofing and all tenants attached to a shared network might not
implicitly trust each other.

Change-Id: Ie6c3e8ad04103804e40f2b043202387385e62ca5
Closes-Bug: #1447242
(cherry picked from commit 927399c011409b7d152b7670b896f15eee7d0db3)

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Mon, 4 May 2015 20:13:11 +0000 (20:13 +0000)]
Updated from global requirements

Change-Id: Iac2cf637afe669fc881ab057a85513d8e85540b3

9 years agoMerge "Remove double queries in l3 DB get methods" into stable/kilo
Jenkins [Sat, 2 May 2015 00:38:29 +0000 (00:38 +0000)]
Merge "Remove double queries in l3 DB get methods" into stable/kilo

9 years agoMerge "Set loading strategy to joined for Routerport/Port" into stable/kilo
Jenkins [Sat, 2 May 2015 00:38:05 +0000 (00:38 +0000)]
Merge "Set loading strategy to joined for Routerport/Port" into stable/kilo

9 years agoSpawn RADVD only in the master HA router
sridhargaddam [Wed, 8 Apr 2015 10:57:19 +0000 (10:57 +0000)]
Spawn RADVD only in the master HA router

Currently radvd is spawned in all the HA routers irrespective of the
state of the router. This approach has the following issues.

1. While processing the internal router ports (i.e., qr-xxx), ha_router
   removes the LLA of the interface and adds it as a VIP to Keepalived conf.
   Radvd daemon is spawned after this operation in the router namespace
   (if the port is associated with any IPv6 subnets). Radvd notices that
   qr-xxx interface does not have the LLA, so does not transmit any Router
   Advts. In this state, VMs fail to acquire IPv6 addresses because of the
   missing RAs. Radvd does not recover even after keepalived configures the
   LLA of the interface. The only solution is to restart/reload radvd daemon.
   Currently keepalived-state-change monitor does not do any radvd related
   operations when a state transition happens. So we endup in this state
   forever.
2. For all the routers in Backup state, qr-xxx interface does not have LLA
   as it is managed by keepalived and configured only on the Master HA router.
   In such agents syslog is flooded with the messages [1] and this can cause
   loss of other useful info.
   [1] - resetting ipv6-allrouters membership on qr-2e373555-97

This patch implements the following.
1. If the router is already in the Master state, we configure the LLA as a VIP
   in keepalived conf but do not delete the LLA of the internal interface.
2. We spawn radvd only if the router is in the Master State.
3. Keepalived-state-change monitor takes care of enabling/disabling radvd upon
   state transitions.

Closes-Bug: #1440699
Change-Id: I351c71d058170265bbb8b56e1f7a3430bd8828d5
(cherry picked from commit 2f9b0ce940099bcc82d2940b99bdc387db22d6fc)

9 years agoBump pre-release to 2015.1.1
Thierry Carrez [Thu, 30 Apr 2015 13:59:13 +0000 (15:59 +0200)]
Bump pre-release to 2015.1.1

Change-Id: If1fa3357efe6d26ee05b930f98bcabadc47a1d14

9 years agoRun radvd as root
Henry Gessau [Mon, 27 Apr 2015 13:59:21 +0000 (09:59 -0400)]
Run radvd as root

During the refactoring of external process management radvd lost
its root privileges.

Closes-bug: 1448813

Change-Id: I84883fe81684afafac9b024282a03f447c8f825a
(cherry picked from commit a5e54338770fc074e01fa88dbf909ee1af1b66b2)

9 years agoRouter is not unscheduled when the last port is deleted
Stephen Ma [Tue, 24 Feb 2015 23:31:33 +0000 (23:31 +0000)]
Router is not unscheduled when the last port is deleted

When checking for ports that are still in use on a DVR router,
the L3 agent scheduler makes the assumption that a port's
network must be owned by the same tenant. This isn't always
true as the admin could have created a shared network that
other tenants may use. The result of this assumption is that
the router associated with the shared network may not be
unscheduled from a VM host when the last VM (created by a
non-admin tenant) using the shared network is deleted from
the compute node.

The owner of a VM may not own all the ports of a shared
network.  Other tenants may have VMs using the same shared
network running on the same compute node. Also the VM owner
may not own the router ports. In order to check whether a
router can be unscheduled from a node has to be run with
admin context so all the ports associated with router are
returned from database queries.

This patch fixes this problem by using the admin context to
make the queries needed for the DVR scheduler to make the
correct unschedule decision.

Change-Id: I45477713d7ce16f2451fa6fbe04c610388b06867
Closes-bug: #1424096
(cherry picked from commit edbade486102a219810137d1c6b916e87475d477)

9 years agoDon't resync on DHCP agent setup failure
Kevin Benton [Fri, 24 Apr 2015 07:35:31 +0000 (00:35 -0700)]
Don't resync on DHCP agent setup failure

There are various cases where the DHCP agent will try to
create a DHCP port for a network and there will be a failure.
This has primarily been caused by a lack of available IP addresses
in the allocation pool. Trying to fix all availability corner cases
on the server side will be very difficult due to race conditions between
multiple ports being created, the dhcp_agents_per_network parameter, etc.

This patch just stops the resync attempt on the agent side if a failure
is caused by an IP address generation problem. Future updates to the subnet
will cause another attempt so if the tenant does fix the issue they will
get DHCP service.

Change-Id: I0896730126d6dca13fe9284b4d812cfb081b6218
Closes-Bug: #1447883
(cherry picked from commit db9ac7e0110a0c2ef1b65213317ee8b7f1053ddc)

9 years agoHandle no ofport in get_vif_port_to_ofport_map
Kevin Benton [Tue, 31 Mar 2015 03:29:51 +0000 (20:29 -0700)]
Handle no ofport in get_vif_port_to_ofport_map

Newly added ports to OVSDB might not yet have an
ofport number assigned to them. This causes the
return from the DB query to return a list instead
of a port number.

This patch handles that by attempting to convert
each result into an integer and then catching the
exception and continuing through the iteration to
ignore uninitialized ports like these.

It also adds a unit test based on data from a
failure observed in the gate.

Change-Id: I5c1bc8363cc7b07a03df12e3ccd49a09b1907ad2
Closes-Bug: #1444269
(cherry picked from commit e7e2609fae70dbffa0ddbf37c7804587e216648c)

9 years agoMerge "Restrict subnet create/update to avoid DHCP resync" into stable/kilo
Jenkins [Thu, 23 Apr 2015 14:08:02 +0000 (14:08 +0000)]
Merge "Restrict subnet create/update to avoid DHCP resync" into stable/kilo

9 years agoMerge "Double functional testing timeout to 180s" into stable/kilo
Jenkins [Thu, 23 Apr 2015 14:07:10 +0000 (14:07 +0000)]
Merge "Double functional testing timeout to 180s" into stable/kilo

9 years agoMerge "tests: confirm that _output_hosts_file does not log too often" into stable...
Jenkins [Thu, 23 Apr 2015 13:57:49 +0000 (13:57 +0000)]
Merge "tests: confirm that _output_hosts_file does not log too often" into stable/kilo

9 years agoMerge "Updated from global requirements" into stable/kilo
Jenkins [Thu, 23 Apr 2015 09:48:21 +0000 (09:48 +0000)]
Merge "Updated from global requirements" into stable/kilo

9 years agoMerge "Only update MTU in update code for MTU" into stable/kilo
Jenkins [Thu, 23 Apr 2015 09:48:08 +0000 (09:48 +0000)]
Merge "Only update MTU in update code for MTU" into stable/kilo

9 years agoMerge "Release Import of Translations from Transifex" into stable/kilo
Jenkins [Thu, 23 Apr 2015 09:47:55 +0000 (09:47 +0000)]
Merge "Release Import of Translations from Transifex" into stable/kilo

9 years agotests: confirm that _output_hosts_file does not log too often
Ihar Hrachyshka [Mon, 20 Apr 2015 15:06:38 +0000 (17:06 +0200)]
tests: confirm that _output_hosts_file does not log too often

I3ad7864eeb2f959549ed356a1e34fa18804395cc didn't include any regression unit
tests to validate that the method won't ever log too often again,
reintroducing performance drop in later patches. It didn't play well
with stable backports of the fix, where context was lost when doing the
backport, that left the bug unfixed in stable/juno even though the patch
was merged there [1].

The patch adds an explicit note in the code that suggests not to add new
log messages inside the loop to avoid regression, and a unit test was
added to capture it.

Once the test is merged in master, it will be proposed for stable/juno
inclusion, with additional changes that would fix the regression again.

Related-Bug: #1414218
Change-Id: I5d43021932d6a994638c348eda277dd8337cf041
(cherry picked from commit 3b74095a935f6d2027e6bf04cc4aa21f8a1b46f2)

9 years agoDouble functional testing timeout to 180s
Maru Newby [Thu, 9 Apr 2015 17:00:57 +0000 (17:00 +0000)]
Double functional testing timeout to 180s

The increase in ovs testing is resulting in job failure due to
timeouts in test_killed_monitor_respawns.  Giving the test more
time to complete should reduce the failure rate.

Change-Id: I2ba9b1eb388bfbbebbd6b0f3edb6d5a5ae0bfead
Closes-Bug: #1442272
(cherry picked from commit 81098620c298394e1a98127ceeba7f297db2d906)

9 years agoRestrict subnet create/update to avoid DHCP resync
watanabe.isao [Wed, 15 Apr 2015 06:48:08 +0000 (15:48 +0900)]
Restrict subnet create/update to avoid DHCP resync

As we know, IPs in subnet CIDR are used for
1) Broadcast port
2) Gateway port
3) DHCP port if enable_dhcp is True, or update to True
4) Others go into allocation_pools
Above 1) to 3) are created by default, which means if CIDR doesn't
have that much of IPs, subnet create/update will cause a DHCP resync.

This fix is to add some restricts to the issue:
A) When subnet create, if enable_dhcp is True, /31 and /32
   cidrs are forbidden for IPv4 subnets while /127 and /128 cidrs are
   forbidden for IPv6 subnets.
B) When subnet update, if enable_dhcp is changing to True and there are no
   more IPs in allocation_pools, the request should be denied.

Change-Id: I2e4a4d5841b9ad908f02b7d0795cba07596c023d
Co-authored-by: Andrew Boik <dboik@cisco.com>
Closes-Bug: #1443798
(cherry picked from commit 0c1f96ad5a6606c1205bd50ea944c3a383892cde)

9 years agoOnly update MTU in update code for MTU
Kevin Benton [Tue, 21 Apr 2015 05:26:22 +0000 (22:26 -0700)]
Only update MTU in update code for MTU

The ML2 create_network_db was re-passing in the entire network
with extensions like vlan_transparency present that was causing
issues in the base update function it was calling.

This corrects the behavior by having it only update the MTU, which
is the only thing it was intending to update in the first place.

Change-Id: I723c5c138e0830de98f6024c7635ec65065e9346
Closes-Bug: #1446784
(cherry picked from commit f85de393c469d1e649a1c1e5ee1b683246442351)

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Thu, 23 Apr 2015 02:15:06 +0000 (02:15 +0000)]
Updated from global requirements

Change-Id: I514c65fac38ef0e534e7401a5f3643b1906adea7

9 years agoEnsure metadata network works with DVR
Salvatore Orlando [Wed, 22 Apr 2015 20:27:53 +0000 (13:27 -0700)]
Ensure metadata network works with DVR

As DVR routers use a different type of interface, this patch
amends the DHCP agent code ensuring that a metadata proxy is
spawned when the metadata network feature is enabled on the
DHCP agent.

(Cherry-picked from ec408ac379108eee26d87a8d9834180db11877e0)

Change-Id: Id7f2e891c0753620a604cf6160c6b592db1aa284
Closes-Bug: #1447344

9 years agoDefer creation of router JSON in get_routers RPC
Kevin Benton [Fri, 17 Apr 2015 10:53:45 +0000 (03:53 -0700)]
Defer creation of router JSON in get_routers RPC

The get_routers method in the l3 RPC code has a log.debug
statement that formats all of the router data as indented
JSON. This method can be expensive if there are hundreds
of routers being synced and it happens even if debugging
is disabled since the function call result is the parameter
to the debug statement.

This patch adds and leverages a small helper class that takes a
callable and its args and defers calling it until the __str__ method
is called on it when it's actually trying to be rendered to a string.

Change-Id: I2bfceb286ce30f2a3595381b62bdc6dd71ed8483
Partial-Bug: #1445412
(cherry picked from commit 649599457e29b58ad0aec9ace990e0a2b59b05d0)

9 years agoMerge "Set IPset hash type to 'net' instead of 'ip'" into stable/kilo
Jenkins [Wed, 22 Apr 2015 19:35:56 +0000 (19:35 +0000)]
Merge "Set IPset hash type to 'net' instead of 'ip'" into stable/kilo

9 years agoMerge "Removed ml2_conf_odl.ini config file" into stable/kilo
Jenkins [Wed, 22 Apr 2015 15:24:18 +0000 (15:24 +0000)]
Merge "Removed ml2_conf_odl.ini config file" into stable/kilo

9 years agoMerge "Revert "Add ipset element and hashsize tunables"" into stable/kilo
Jenkins [Wed, 22 Apr 2015 15:24:04 +0000 (15:24 +0000)]
Merge "Revert "Add ipset element and hashsize tunables"" into stable/kilo

9 years agoMerge "Add Kilo release milestone" into stable/kilo
Jenkins [Wed, 22 Apr 2015 15:17:46 +0000 (15:17 +0000)]
Merge "Add Kilo release milestone" into stable/kilo

9 years agoMerge "ML2: Change port status only when it's bound to the host" into stable/kilo
Jenkins [Wed, 22 Apr 2015 10:19:59 +0000 (10:19 +0000)]
Merge "ML2: Change port status only when it's bound to the host" into stable/kilo

9 years agoMerge "IPv6 SLAAC subnet create should update ports on net" into stable/kilo
Jenkins [Wed, 22 Apr 2015 10:19:47 +0000 (10:19 +0000)]
Merge "IPv6 SLAAC subnet create should update ports on net" into stable/kilo

9 years agoRemove double queries in l3 DB get methods
Kevin Benton [Fri, 17 Apr 2015 11:28:58 +0000 (04:28 -0700)]
Remove double queries in l3 DB get methods

Two frequently called functions were querying the routerport table
and the corresponding ports just to get the port ID. Then they were
calling get_ports again with those port IDs, resulting in two queries
to the port table when there should have only been one.

This eliminates the second call to get_ports since all of the necessary
data hase been retrieved from the port table.

Change-Id: I806e9c380b7de048fe084b2baf4b6f92ab0edf6b
Partial-Bug: #1445412
(cherry picked from commit 3310c3c3d4c05c0d13f32f08f978ba4813e2a39a)

9 years agoSet loading strategy to joined for Routerport/Port
Kevin Benton [Fri, 17 Apr 2015 10:36:50 +0000 (03:36 -0700)]
Set loading strategy to joined for Routerport/Port

The RouterPort model has a relationship to the ports model which
is frequently relied on to get the port IDs of interfaces attached
to a router. However, this defaults to the loading strategy to
'select', which meant a new query was being emitted for every
interface to the ports table just to get the ID.

This patch adjusts the relationship to be 'joined' by default so
one query will fetch the related ports.

Another option would have been not to use the port object at all since
the ID is all that the callers were usually interested in. However,
they would end up using the ID to do a port lookup, which is being
optimized away in another patch anyway so the full port object from
the relationship will end up getting used.

Change-Id: Id1ae35f845f7367d5f1f065c6fa637da7b980a2b
Partial-Bug: #1445412
(cherry picked from commit 10b17a884452736a6b214bcb7705b955192a1748)

9 years agoML2: Change port status only when it's bound to the host
mathieu-rohon [Sat, 7 Mar 2015 12:30:49 +0000 (13:30 +0100)]
ML2: Change port status only when it's bound to the host

Currently, nothing prevents the port status to be changed to BUILD
state when get_device_details() is sent by a host that doesn't own
the port.
In some cases the port might stay in BUILD state.
This could happen during a live-migration, or for multi-hosted ports
such as HA ports.
This commit allows the port status modification only if the port
is bound to the host that is asking for it.

Closes-Bug: #1439857
Closes-Bug: #1438040
Closes-Bug: #1416933

Change-Id: I9b3673f453abbafaaa4f78542fcfebe8dc93f2bb
(cherry picked from commit 9b53b82ce7dad551ebc0f02ff667d5345fb7e139)

9 years agoRelease Import of Translations from Transifex
Andreas Jaeger [Mon, 20 Apr 2015 09:07:37 +0000 (11:07 +0200)]
Release Import of Translations from Transifex

Manual import of Translations from Transifex. This change also removes
all po files that are less than 66 per cent translated since such
partially translated files will not help users.

This updates also recreates all pot (translation source files) to
reflect the state of the repository.

This change needs to be done manually since the automatic import does
not handle the proposed branches and we need to sync with latest
translations.

Change-Id: I1b7bd1773bcd12ab282e77ee0dc41c27846fb66b

9 years agoFixes race condition and boosts the scheduling performance
Swaminathan Vasudevan [Wed, 15 Apr 2015 04:34:33 +0000 (21:34 -0700)]
Fixes race condition and boosts the scheduling performance

This patch fixes a race-condition that occurs when the
scheduler tries to check for dvr serviceable ports before
it schedules a router when a subnet is associated with
a router.

Sometimes the dhcp port creation is delayed and so the
router is not scheduled to the l3-agent.

Also it boosts the scheduling performance on dvr-snat
node for scheduling a router.

This patch will provide a work around to fix this race
condition and to boost the scheduling performance
by scheduling a router on a dvr-snat when
dhcp is enabled on the provided subnet, instead of checking
all the available ports on the subnet.

Closes-Bug: #1442494

Change-Id: I089fefdd8535bdc9ed90b3230438ab0bfb6aab4f
(cherry picked from commit c65d3ab6ad4589e6e4a6b488d2eb5d1e4cfee138)

9 years agoSet IPset hash type to 'net' instead of 'ip'
Kevin Benton [Tue, 31 Mar 2015 06:52:56 +0000 (23:52 -0700)]
Set IPset hash type to 'net' instead of 'ip'

The previous hash type was 'ip' and this caused a major
issue with the allowed address pairs extension since it
results in CIDRs being passed to ipset. When the hash type
is 'ip', a CIDR is completely enumerated into all of its
addresses so 10.100.0.0/16 results in ~65k entries. This
meant a single allowed_address_pairs entry could easily
exhaust an entire set.

This patch changes the hash type to 'net', which is designed
to handle a CIDRs as a single entry.

This patch also changes the names of the ipsets because
creating an ipset with different parameters will cause an
error and our ipset manager code isn't robust enough to handle
that at this time. There is another ongoing patch to fix
that but it won't be ready in time.[1]

The related bug was closed by increasing the set limit, which
did alleviate the problem. However, this change would also
address the issue because the gate tests run an allowed address
pairs extension test with the CIDR mentioned above.

1. I59e2e1c090cb95ee1bd14dbb53b6ff2c5e2713fd

Related-Bug: #1439817
Closes-Bug: #1444397
Change-Id: I8177699b157cd3eac46e2f481f47b5d966c49b07
(cherry picked from commit a38b5df5cd3c47672705aad4c30e789ae11ec958)

9 years agoRevert "Add ipset element and hashsize tunables"
Kevin Benton [Tue, 31 Mar 2015 15:53:56 +0000 (08:53 -0700)]
Revert "Add ipset element and hashsize tunables"

This reverts commit b5b919a7a3569ccb93c3d7d523c1edfaeddb7cb9.

The current ipset manager code isn't robust enough to handle
ipsets that already exist with different parameters. This reverts
the ability to change the parameters so we don't break upgrades
to Kilo.

Conflicts:
neutron/agent/linux/ipset_manager.py
neutron/tests/unit/agent/linux/test_ipset_manager.py

Change-Id: I538714df52424f0502cb75daea310517d1142c42
Closes-Bug: #1444201
(cherry picked from commit 03be14a569d240865dabff8b4c30385abf1dbe62)

9 years agoUpdate .gitreview to point to stable/kilo
Kevin Benton [Thu, 16 Apr 2015 23:27:38 +0000 (16:27 -0700)]
Update .gitreview to point to stable/kilo

This is the stable/kilo branch. When people make changes
here it's highly likely that they want to propose them
to stable/kilo on gerrit.

Change-Id: Ie61a9f0c0b0b4896da33a201e42b1c4bc4bae49b

9 years agoAdd Kilo release milestone
Henry Gessau [Thu, 16 Apr 2015 17:38:46 +0000 (13:38 -0400)]
Add Kilo release milestone

Change-Id: Id7d969c92b7c757b766760681357ac13c8079ca3

9 years agoIPv6 SLAAC subnet create should update ports on net
Dane LeBlanc [Thu, 9 Apr 2015 14:32:33 +0000 (10:32 -0400)]
IPv6 SLAAC subnet create should update ports on net

If ports are first created on a network, and then an IPv6 SLAAC
or DHCPv6-stateless subnet is created on that network, then the
ports created prior to the subnet create are not getting
automatically updated (associated) with addresses for the
SLAAC/DHCPv6-stateless subnet, as required.

Change-Id: I88d04a13ce5b8ed4c88eac734e589e8a90e986a0
Closes-Bug: 1427474
Closes-Bug: 1441382
Closes-Bug: 1440183
(cherry picked from commit bd1044ba0e9d7d0f4752c891ac340b115f0019c4)

9 years agoRemoved ml2_conf_odl.ini config file
Ihar Hrachyshka [Fri, 10 Apr 2015 13:07:33 +0000 (15:07 +0200)]
Removed ml2_conf_odl.ini config file

The file is already packaged into decomposed networking-odl repo [1].

[1]: https://git.openstack.org/cgit/stackforge/networking-odl/tree/etc/neutron/plugins/ml2/ml2_conf_odl.ini

Closes-Bug: #1442615
Change-Id: Ic280454190aab4e3b881cde15a882808b652861e
(cherry picked from commit b3334eca0ae9f9c64ccd646035e69081f669e3e4)

9 years agoMerge "Add simple ARP spoofing protection"
Jenkins [Thu, 9 Apr 2015 01:21:53 +0000 (01:21 +0000)]
Merge "Add simple ARP spoofing protection"

9 years agoMerge "Add missing config parameters in neutron.conf"
Jenkins [Wed, 8 Apr 2015 22:42:45 +0000 (22:42 +0000)]
Merge "Add missing config parameters in neutron.conf"

9 years agoMerge "Re-use context session in ML2 DB get_port_binding_host"
Jenkins [Wed, 8 Apr 2015 22:40:49 +0000 (22:40 +0000)]
Merge "Re-use context session in ML2 DB get_port_binding_host"

9 years agoMerge "Revert "IPv6 SLAAC subnet create should update ports on net""
Jenkins [Wed, 8 Apr 2015 20:39:59 +0000 (20:39 +0000)]
Merge "Revert "IPv6 SLAAC subnet create should update ports on net""

9 years agoMerge "Moving VLAN Transparency support from core to extension"
Jenkins [Wed, 8 Apr 2015 20:30:01 +0000 (20:30 +0000)]
Merge "Moving VLAN Transparency support from core to extension"

9 years agoRevert "IPv6 SLAAC subnet create should update ports on net"
armando-migliaccio [Wed, 8 Apr 2015 17:57:13 +0000 (10:57 -0700)]
Revert "IPv6 SLAAC subnet create should update ports on net"

This reverts commit 81f4469b620ec221f53d3ffb4d00b90896dc5ce1.

Change-Id: I63a392fccda29ceff3e91c0a4de741d263bd0e8e
Related-bug: #1441382
Related-bug: #1440183

9 years agoAdd missing config parameters in neutron.conf
Edgar Magana [Tue, 7 Apr 2015 05:57:06 +0000 (22:57 -0700)]
Add missing config parameters in neutron.conf

Include all missing configuration parameters already
integrated in Neutron code.

Change-Id: Iefa344a2f9ec2c74f6314e7c783ff3b213d76ea3
Closes-bug: #1438329

9 years agoMerge "Return from check_ports_exist_on_l3agent if no subnet found"
Jenkins [Wed, 8 Apr 2015 16:11:05 +0000 (16:11 +0000)]
Merge "Return from check_ports_exist_on_l3agent if no subnet found"

9 years agoMerge "Add ipset element and hashsize tunables"
Jenkins [Wed, 8 Apr 2015 15:57:10 +0000 (15:57 +0000)]
Merge "Add ipset element and hashsize tunables"

9 years agoMoving VLAN Transparency support from core to extension
Pritesh Kothari [Wed, 25 Mar 2015 18:34:05 +0000 (11:34 -0700)]
Moving VLAN Transparency support from core to extension

* Moving VLAN Transparency support from core to extension
* Remove the older unit tests and add new corresponding ones

DocImpact
Closes-Bug: #1434667

Change-Id: Ic551475ed7b64aad9627a57abb0df41acc19bfc1

9 years agoRe-use context session in ML2 DB get_port_binding_host
Dane LeBlanc [Sat, 4 Apr 2015 22:50:36 +0000 (18:50 -0400)]
Re-use context session in ML2 DB get_port_binding_host

This patch modifies ML2 DB get_port_binding_host method so that it
reuses the existing context session to do the database query
rather than creating a new database session.

Note that there are other methods in ML2 DB that do not re-use
the caller's session (get_port_from_device_mac() and
get_sg_ids_grouped_by_port()). These will be modified using
a separate bug (https://bugs.launchpad.net/neutron/+bug/1441205).
Change-Id: I8aafb0a70f40f9306ccc366e5db6860c92c48cce
Closes-Bug: #1440183

9 years agoMerge "linuxbridge UT: Fix a regression of the recent ip_lib change"
Jenkins [Wed, 8 Apr 2015 15:09:25 +0000 (15:09 +0000)]
Merge "linuxbridge UT: Fix a regression of the recent ip_lib change"

9 years agoMerge "Remove tests from HA routers test framework"
Jenkins [Wed, 8 Apr 2015 05:37:22 +0000 (05:37 +0000)]
Merge "Remove tests from HA routers test framework"

9 years agoMerge "Fix intermittent UT failures in test_utils"
Jenkins [Wed, 8 Apr 2015 04:40:45 +0000 (04:40 +0000)]
Merge "Fix intermittent UT failures in test_utils"

9 years agoFix intermittent UT failures in test_utils
armando-migliaccio [Tue, 7 Apr 2015 22:37:59 +0000 (15:37 -0700)]
Fix intermittent UT failures in test_utils

Change eba4c2941ee introduced these tests. However they are not that useful as they
simply mimick the code, without really ensuring that the behavior is expected, so
they provide negative value ([1]), plus, they fail randomly.

This patch removes them in favor of a more useful functional check.

[1] http://googletesting.blogspot.com/2015/01/testing-on-toilet-change-detector-tests.html

Closes-bug: #1441347

Change-Id: I8a321995295deef7f6d30be303486be491e2771f

9 years agoMerge "Enhance TESTING.rst"
Jenkins [Tue, 7 Apr 2015 22:19:56 +0000 (22:19 +0000)]
Merge "Enhance TESTING.rst"

9 years agoMerge "Remove check for bash usage"
Jenkins [Tue, 7 Apr 2015 21:26:04 +0000 (21:26 +0000)]
Merge "Remove check for bash usage"

9 years agoMerge "Stop using deprecated DEFAULT group for lock_path"
Jenkins [Tue, 7 Apr 2015 18:38:52 +0000 (18:38 +0000)]
Merge "Stop using deprecated DEFAULT group for lock_path"

9 years agoMerge "Fix dynamic arp populate error for dvr routers"
Jenkins [Tue, 7 Apr 2015 18:28:26 +0000 (18:28 +0000)]
Merge "Fix dynamic arp populate error for dvr routers"

9 years agoEnhance TESTING.rst
Maru Newby [Tue, 24 Mar 2015 19:45:46 +0000 (19:45 +0000)]
Enhance TESTING.rst

Add detail about api testing and provide better visual separation
between the different types of testing.

The current testing guidelines are mainly about running tests, and
this change does little to fix that.  The intention is to add detail
about writing tests in subsequent changes.

Change-Id: I39d0439c91e5c6edb1d48d4da310443c99fb6d9e

9 years agoRemove check for bash usage
Maru Newby [Tue, 7 Apr 2015 15:00:25 +0000 (15:00 +0000)]
Remove check for bash usage

Arbitrarily restricting ourselves from using bash because developers on
platforms like netbsd don't want to install bash from ports doesn't
make sense.  Any non-trivial shell script is likely to use features
like arrays or string manipulation that are poorly supported (if at
all) by sh, and the continued bumping of the number of expected bash
scripts is an indication that the check is not serving its purpose
anyway.

Along with removing the check, all shebang references to /bin/bash
have been replaced with /usr/bin/env bash in an attempt to be more
compatible across different hosts.

Change-Id: Ief72dc380cc88af38959c330897e2c127e33c332
Closes-Bug: #1440824

9 years agoReturn from check_ports_exist_on_l3agent if no subnet found
Ed Bak [Mon, 9 Feb 2015 23:13:18 +0000 (23:13 +0000)]
Return from check_ports_exist_on_l3agent if no subnet found

The call to get_subnet_ids_on_router can return an empty list.
If the subnet_ids list is empty, the subsequent call to get
the ports on a subnet returns all ports.  If this occurs
when doing a remove_router_interface, the performance
of a remove_router_interface degrades significantly.  This change
returns immediately from check_ports_exist_on_l3agents if no
subnet is found.  A new unit test has been added to cover
the specific case of returning immediately without calling
get_ports when a remove_router_interface operation is performed.

Change-Id: I247d3bae152ab4f8ab7e00bd24d878eb08dca1ba
Closes-Bug: #1420032
Depends-On: I15bbf16fd4378c6431e9da8942d0968e7a012a91

9 years agoRemove tests from HA routers test framework
Assaf Muller [Tue, 7 Apr 2015 03:56:15 +0000 (23:56 -0400)]
Remove tests from HA routers test framework

The framework class should not contain tests. Running the module
was running an additional 9 tests that should not have been run.

Change-Id: Iabc6367e8bfda18e395d1a19809b07507200003d

9 years agolinuxbridge UT: Fix a regression of the recent ip_lib change
YAMAMOTO Takashi [Wed, 18 Mar 2015 04:27:15 +0000 (13:27 +0900)]
linuxbridge UT: Fix a regression of the recent ip_lib change

A recently merged change, I07d1d297f07857d216649cccf717896574aac301,
changed IPWrapper.get_devices to use /sys instead of executing ip command.
Unfortunately it broke linuxbridge unit tests, which seems to assume that
mocking utils.execute is enough in some places.  This commit fixes the
regression.

Closes-Bug: #1433417
Related-Bug: #1374663
Change-Id: I9570abe703b438a3fc358f747e25d023934d1ffd

9 years agoFix dynamic arp populate error for dvr routers
Swaminathan Vasudevan [Fri, 3 Apr 2015 00:25:39 +0000 (17:25 -0700)]
Fix dynamic arp populate error for dvr routers

Recent refactor to the L3 Agent have introduced
this problem. When we create a VM after we
attach an interface to a router or when we add
an interface with an existing VM to a router, in
both cases the arp entries for the dvr serviced
ports are not getting populated in the Router
Namespace.

Closes-Bug: #1438969

Change-Id: I4a82e2435d176f3d9336d7f0dab9726c063840b9
Co-authored-by: Armando Migliaccio <armamig@gmail.com>
9 years agoReorganize plugin test modules
Maru Newby [Mon, 6 Apr 2015 21:53:39 +0000 (21:53 +0000)]
Reorganize plugin test modules

This change moves plugin test modules to conform to the new rules on
unit test tree structure (see TESTING.rst).

Vendor plugin paths continue to be ignored, and unit test modules that
test features instead of modules are also ignored pending their
removal to the functional test tree.

Change-Id: I482c377ca72ffd58692ad84bd9692356513e4c98
Closes-Bug: #1440834

9 years agoMerge open source plugin test code modules
Maru Newby [Mon, 6 Apr 2015 21:51:23 +0000 (21:51 +0000)]
Merge open source plugin test code modules

The unit test reorg is about moving files around so a test module is
clearly associated with the code module it targets, but the test
modules in this change needed to be manually merged because they both
targeted the same module.

Change-Id: I80f4b97fadd318896e7fa4e7e7e939f924127b2a
Partial-Bug: #1440834