15219 Commits

Author SHA1 Message Date
Andreas Scheuring
557e0c0a4c Terminate macvtap agent when physical_interface_mapping config not present
Starting the macvtap agent without specifying at least one
physical_interface_mappings does not make sense. As it only
supports layer2 networks (flat, vlan) an interface mapping is
mandatory. An existing agent deployment without an interface
mapping can not serve any networks to instances!

This patch terminates the agent when no mapping is
provided. As without this mapping the agent cannot serve any networks
for instances, this patch can't really break existing deployments.

UpgradeImpact Agent terminates when no physical_interface_mapping
configuration is provided.

Change-Id: I647cf4da55fda54e32b7047b84e0d7f671629fa7
Closes-Bug: #1587444
2017-02-01 07:08:20 +00:00
Jenkins
4f36d4e3fe Merge "cache_utils: fixed cache misses for the new (oslo.cache) configuration" 2016-07-14 11:39:39 +00:00
Jenkins
e7296183dc Merge "Updated from global requirements" 2016-07-14 08:21:02 +00:00
Jenkins
2be5eda9a7 Merge "Incorporate tweaks to subport validator" 2016-07-14 02:36:52 +00:00
OpenStack Proposal Bot
7a6fe8050f Updated from global requirements
Change-Id: Ie2d76963d9dc50f209f198d135123aeb9ea2d708
2016-07-14 02:25:17 +00:00
Jenkins
19b3101239 Merge "Add retry decorator to dhcp_ready_on_ports" 2016-07-13 22:56:41 +00:00
Jenkins
b6577fa71d Merge "ML2: don't use IntegrityError for duplicate detection" 2016-07-13 22:38:23 +00:00
Jenkins
e3a221df1e Merge "Ensure deferred IP fails when host is provided no IP allocated" 2016-07-13 21:20:45 +00:00
Henry Gessau
890c30fc52 Add retry decorator to dhcp_ready_on_ports
Enable DB retries for this provisioning blocks phase.

Closes-Bug: #1602833

Change-Id: Ie6444d6552b4c1e73c00d5624e3866417204c9e8
2016-07-13 16:17:23 -04:00
Jenkins
4b82d0a443 Merge "DVR: handle floating IP reassociation on the same host" 2016-07-13 12:43:26 +00:00
Jenkins
beee72044f Merge "Add an independent function to map segment to hosts" 2016-07-13 05:36:03 +00:00
Jenkins
4c8d6e33c6 Merge "Delete default route if no gateway in external net" 2016-07-13 01:13:44 +00:00
Jenkins
ed58510023 Merge "Allow unique keys to be used with get_object" 2016-07-12 16:31:01 +00:00
Jenkins
bec84341b4 Merge "Add object versioning to QoS DSCP." 2016-07-12 16:30:31 +00:00
Jenkins
76a133a018 Merge "Add function to remove constraints from database" 2016-07-12 16:28:11 +00:00
Ilya Chukhnakov
581b854a84 Allow unique keys to be used with get_object
This patch adds 'unique_keys' to NeutronDbObject and allows get_object
to lookup objects by unique keys in addition to primary keys.

Change-Id: I31f5603c116892390d1f8025d3c1893355ad0bac
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
2016-07-12 16:18:03 +03:00
David Shaughnessy
1bb95a4554 Add object versioning to QoS DSCP.
- Changes RULE_TYPE_DSCP_MARK to RULE_TYPE_DSCP_MARKING to conform
  with the rules name.
- Added object versioning to qos related objects.
 - qos/rule: Throws a QosRuleVersionUnavailable exception when
   the QosDscpMarkingRule version is < '1.1'.
- removed test object version incrementation TODO from test_policy.py
 - Object versioning can not be used to increment the object version.

Change-Id: I4f10ef3c1cbaa2a868de2b8e3abc4c39eb1f44c7
Partial-Bug: #1468353
2016-07-12 11:11:11 +01:00
Sławek Kapłoński
7a206a942f Add function to remove constraints from database
Function used in alembic database migration script to
remove foreign keys from table doesn't remove unique constraint
created for such fk in table.
Sometimes there is need to remove also such unique constraint during
database upgrade.
Removing unique constraint is little bit different in mysql and
postgresql databases because names of such constraints are different.
This patch introduces function to remove constraints from table
during migration.
It is also used in remove_fks_from_table() function to allow removal
unique constraints when fk is removed.

Change-Id: I7e7732560984b1c1e45230434ddc4be8cf5ab630
Closes-Bug: #1599840
2016-07-12 07:26:18 +00:00
Jenkins
9cbafbb016 Merge "Add a hacking rule for string interpolation at logging" 2016-07-12 06:30:18 +00:00
Jenkins
95472a8969 Merge "Stable Branch URL Fixed" 2016-07-12 02:59:47 +00:00
Jenkins
681d64026b Merge "Add check that factory started in dispose" 2016-07-12 01:21:20 +00:00
Jenkins
1b6bcfafb3 Merge "Refactoring config options for dhcp agent" 2016-07-12 01:18:11 +00:00
Jenkins
c3ee77b787 Merge "Check for provisioning blocks before updating port up" 2016-07-12 01:12:35 +00:00
Jenkins
36f11fc98d Merge "Emit registry events on subport addition/removal" 2016-07-11 23:01:30 +00:00
Takashi NATSUME
5cef3f726e Add a hacking rule for string interpolation at logging
String interpolation should be delayed to be handled
by the logging code, rather than being done
at the point of the logging call.
So add a hacking rule for it.

See the oslo i18n guideline.

* http://docs.openstack.org/developer/oslo.i18n/guidelines.html

Change-Id: I91e8d59d508c594256d5f74514e62f8f928d1df5
Closes-Bug: #1596829
2016-07-11 22:54:56 +00:00
Ann Kamyshnikova
1d7a0334f3 Add check that factory started in dispose
Change-Id: I60d31277a698bd65d12f75e633ac4bd5230e6dcd
Partial-bug: #1600530
2016-07-11 21:29:35 +00:00
Jenkins
6087f1d121 Merge "Extension to tell when deferred binding is in effect" 2016-07-11 21:21:18 +00:00
Jenkins
d409d5f5b1 Merge "Address outstanding TODO for callback event" 2016-07-11 16:44:21 +00:00
Oleg Bondarev
b8a2cb8132 DVR: handle floating IP reassociation on the same host
The case when floating IP is reassociated from one VM to another
on the same host without doing disassociation, was not properly handled:
l3 dvr agent only checked that the floating address was present on the
device in router namespace and considered floating IP confiigured correctly.
This patch adds fip_mapping to router object so fixed IP change can be
detected and handled.

Closes-Bug: #1599089
Change-Id: I25c23bb9ad7b9a9b90f225f37417142e2304deb8
2016-07-11 13:56:32 +03:00
Jenkins
253bef21e0 Merge "Rename dvr portbinding functions" 2016-07-11 07:12:52 +00:00
Jenkins
f7292d4914 Merge "Deprecate option min_l3_agents_per_router" 2016-07-10 14:03:51 +00:00
Kevin Benton
2bf7211670 Check for provisioning blocks before updating port up
There is a race we need to check for where a port is created and
then updated with binding information via another API shortly
afterward that causes the bug referenced in this message.

* The port is created and a DHCP provisioning block is added.
* The DHCP agent finishes setting up the reservation and emits a
  message to clear the block.
* The _port_provisioned callback in ML2 is triggered.
* A port update comes in that binds the port and adds new blocks.
* The _port_provisioned callback now does a get_port and sees
  that the port is bound so it assumes everything is done and
  the port can be marked ACTIVE.
* The port is now ACTIVE before the L2 agent has had a chance to
  do its wiring and the VM boots.
* The L2 agent requests the details and the port flaps back to
  BUILD.
* The L2 agent finishes and clears the provisioning block a second
  time so the port goes back to ACTIVE.

This will randomly cause failures because the VM is booting before the
L2 agent is done and tempest may see the port in the BUILD state after
the agent grabs port details.

The fix is relatively simple. Just check for any new provisioning blocks
added *after* doing a get_port in the _port_provisioned callback to make
sure we don't update to ACTIVE if there are newly added blocks.

Closes-Bug: #1600396
Change-Id: I14f41a5fda0707e8bba064c5cd952553686c30cd
2016-07-09 18:00:18 +00:00
Jenkins
38e4070267 Merge "Fix typo in message string causing server exception" 2016-07-09 10:39:10 +00:00
venkata anil
89cd4d07d1 Rename dvr portbinding functions
As part of making DVR portbinding implementation generic, we rename
dvr portbinding functions as distributed portbinding functions.
In next patch we make dvr logic for port binding generic,
to be useful for all distributed router ports(for example, HA).

Partial-Bug: #1595043
Partial-Bug: #1522980
Change-Id: I402df76c64299156d4ed48ac92ede1e8e9f28f23
2016-07-09 08:21:17 +00:00
Jenkins
01e687bcdf Merge "Don't catch DBDuplicate in default SG creation" 2016-07-09 00:48:17 +00:00
Jenkins
0bf1517b10 Merge "Remove the deprecated config "quota_items"" 2016-07-09 00:41:46 +00:00
Jenkins
05f722c0c2 Merge "Pull stadium projects from governance.o.o in utility script" 2016-07-09 00:41:22 +00:00
Jenkins
7b055a9715 Merge "Grammar error fixed" 2016-07-08 23:30:51 +00:00
Rawlin Peters
9d04f187db Emit registry events on subport addition/removal
When a list of subports has been added or removed from a trunk, the
registry should emit a corresponding event and pass the list of added or
removed SubPort objects as the payload.

Trunk agent RPC callbacks can then be subscribed to these events in
order to relay subport information to the agents.

Partially-implements: blueprint vlan-aware-vms
Change-Id: Icb8da23cdd2244da5183058c31d8acef22d78eaa
2016-07-08 17:04:56 -06:00
Carl Baldwin
2974f779c7 Ensure deferred IP fails when host is provided no IP allocated
This formalizes that an IP will be allocated when host binding is
provided on port update or IpAddressGenerationFailure is generated and
the port update fails.  This was always the intent but no test was
added to cover the failure case.

Change-Id: Ice0cf2f88eefb15700b1385817e09db489a3bac4
Partially-Implements: blueprint routed-networks
2016-07-08 22:04:35 +00:00
Carl Baldwin
80be86de90 Extension to tell when deferred binding is in effect
This extension exists mainly to let Nova know when deferred port
binding is in effect and its okay for the port to not have any IP
addresses.

The extension is implemented by the segments service plugin with a
very simple implementation to begin with.  This implementation is
likely to evolve.

Change-Id: I591d32df512712e4de36fe20e389b3a14d58157f
Partially-Implements: blueprint routed-networks
2016-07-08 15:59:23 -06:00
Brian Haley
04b1979477 Fix typo in message string causing server exception
Trivialfix

Change-Id: I356a53b62047a189aca6df978e50fbb44e204d16
Closes-bug: #1599698
2016-07-08 15:21:45 -04:00
Jens Rosenboom
e82494f9cd Deprecate option min_l3_agents_per_router
As was discussed in [1], we should not only allow setting
min_l3_agents_per_router to one [2], but deprecate this option
completely.

[1] https://bugs.launchpad.net/bugs/1555042
[2] https://review.openstack.org/289925

Related-Bug: 1555042
Closes-Bug: 1599275
Change-Id: I518e12edd4bfb7a036b278d5f108cf0fc3de0353
2016-07-08 19:08:36 +00:00
Armando Migliaccio
48f6c9caa4 Address outstanding TODO for callback event
Change 2c8debdc5752fd4c01ed4a9ca8d2631e99aabbd5, so this can
be taken care of.

Change-Id: Ic1555ebb435543565613e1d0f8c25bc9dc48dd67
2016-07-08 11:13:43 -07:00
Jenkins
fb88d07bd1 Merge "Allow tox to be run with python 3" 2016-07-08 14:21:25 +00:00
Brandon Logan
b06c7e857e Allow tox to be run with python 3
The tox.ini has some unicode characters that cannot be
decoded, so just executing tox will immediately cause an error
because the tox.ini cannot be parsed.

Closes-Bug: #1600068
Change-Id: Ia01ae80d9321584845bb06c3f6673d13027bd2db
2016-07-08 06:35:48 +00:00
Armando Migliaccio
ee16137fe0 Incorporate tweaks to subport validator
Temporarily pull changes.

Depends-on: I56a66dab2393cdc43db916f6d8417361e3df6275
Change-Id: Iaa67235cd021542d5cc5676366b3c0a1ecb49bab
2016-07-07 21:27:54 +00:00
Jenkins
213167552e Merge "Fixed Typo in contribute.rst" 2016-07-07 15:47:08 +00:00
Jenkins
d78450e1fe Merge "Change tunnel MTU calculation to support IPv6" 2016-07-07 14:59:11 +00:00
Jenkins
576a2e1d35 Merge "List only admin_state_up auto-allocated resources" 2016-07-07 14:34:11 +00:00