Commit Graph

39 Commits (6c9a282bcd36d744d1ad753afd8e7a219b1189c4)

Author SHA1 Message Date
Chengqian Liu c49cc2cde2 Reduce qos rpc times on the ovs-agent side
When multiple ports are bound to qos-policy with the same id,
ovs-agent should check whether the cache has policy information
instead of directly reading rpc when processing the port.

Change-Id: I88f9f5af95439f1536799169390764c89109f467
Closes-Bug: #1783559
(cherry picked from commit 7a27e24447)
5 years ago
Sławek Kapłoński 30fc4c4690 Extend QoS L2 drivers interface to handle ingress rule types
There is a need to extend QoS L2 drivers interface to allow
remove of ingress rules.

For that kind of rule types which have direction attribute
L2 drivers should provide handler method called
delete_<rule_type>_ingress

Partially-Implements: blueprint instance-ingress-bw-limit

Change-Id: I9ba309a0889f9b8fb4902203e9689218974eb463
6 years ago
Terry Wilson 1eec265ad0 Update to support the ovdsbapp 0.4.0 API
idl_factory was removed in favor of just passing in an Idl instance
as an Idl doesn't start a connection until its .run() is called.

The try/excepts will be removed when the ovsdbapp 0.4.0 constraint
changes are merged.

Change-Id: Id22faa1f6179c2fdf8a136972d65f10749c9fc2e
6 years ago
David Shaughnessy 21359e29ae Clear QoS rules from ports without a qos policy.
This patch addresses a bug where ports that had their QoS policy
removed did not have the rules deleted as the agent was restarting
and cleared the internal port info. This results in the policy still
being in effect while it has been cleared from the port qos-policy field.

Change-Id: I2e8e4aa96d2fd15b344220c4bf8a4713197fae4e
Closes-Bug: 1663908
6 years ago
Armando Migliaccio ca751a1486 Spin off context module
NeutronLibImpact

Partially-implements: blueprint neutron-lib

Change-Id: I48cf45dc1b07035d952152eac2548a3bd9fc2832
6 years ago
Denis Buliga 7fc79f43dc Refactors QosAgentDriver
QosAgentDriver has a method which uses linux specific module, which
is trying to import pyroute2.

Module pyroute2 tries to import a module from socket which does not
exists on windows (socket.inet_pton[1]). This can cause neutron
services to fail to start on windows[2].

[1]: https://docs.python.org/2/library/socket.html#socket.inet_pton
[2]: http://paste.openstack.org/show/593272/

Change-Id: I706368bfcaece380e1357e0c504fd3b9553ba49c
Related-Bug: #1492714
6 years ago
Kevin Benton cf6ffb78f6 Pass context and resource_type in RPC callback
Maintaining the context is important for keeping the request ID
and subsequently operator/developer sanity while debugging.
The resource_type is also helpful to have since a function could be
subscribed for multiple resources.

This maintains and deprecates the existing 'subscribe' method for
backwards compatibility with callbacks that don't support receiving
the context and resource type. A new 'register' method is added
for callbacks to use that are compatible with receiving the context.

Change-Id: I06c8302951c99039b532acd9f2a68d5b989fdab5
7 years ago
Gary Kotton 396abb8ccb neutron-lib: start using neutron-lib helpers
The following helpers are used:
	parse_mappings
	compare_elements
	safe_sort_key

Change-Id: I5947b473330fd29f8d4c1a08f03d007a52c8dfd9
7 years ago
Miguel Angel Ajo 7f617e6a21 Introduce bulk push to rpc callback mechanism
There are usage patterns which would benefit from having
the capability to send a list of resources in bulk instead
of using individual fanout messages.

From now on, the rpc callback subscriber receives a list of
resources (single or multiple), and the pushers must always
push a list.

Backwards compatibility for QoSPolicy consumers in mitaka
is provided by calling push with "resource" parameter for
single item lists during one release cycle. That will be
dropped when Ocata opens.

Partially-implements: blueprint vlan-aware-vms

Change-Id: I1117925360a29ecbd1902fa527b2f24f94ce81ec
7 years ago
Edan David 7236d9cb9a Validate device to mac instead of port id to mac
When updating the Fdb table, validate if rule exists with
device to mac instead of port id to mac.
In case several devices are located on the same physnet each device
needs to be updated separately, therefor the validation of existing
Fdb rules should be device to mac.

Change-Id: I889cbb02a875403122d520357c38eae2af14ebbe
Closes-Bug: #1604838
7 years ago
Jenkins 122a971656 Merge "Generalize agent extension mechanism" 7 years ago
Nate Johnston 01a6c9c426 Generalize agent extension mechanism
This change generalizes agent extension code so that all agents can take
advantage of a common mechanism.

Co-Authored-By: Margaret Frances <margaret_frances@cable.comcast.com>

Partially-Implements: blueprint l3-agent-extensions

Change-Id: I9380343c09d28eec67077c9e6d77c33a195e516b
7 years ago
Edan David 151d94521f Replace device owners hard coded strings to neutron_lib constants
Change-Id: I821f0def82164ab1303188d3f1bdfd85473470cd
7 years ago
Edan David b6592c7372 Add dhcp to Fdb extension's permitted device owners
Change-Id: I8c15f340b82424de44f5477ce36b67efe76dee59
Closes-Bug: #1599473
7 years ago
Jenkins 78dc79146f Merge "Adding FDB population agent extension" 7 years ago
Edan David 2c8f61b816 Adding FDB population agent extension
The purpose of this extension is updating the FDB table upon changes of
normal port instances thus enabling communication between direct port
SR-IOV instances and normal port instances.
Additionally enabling communication to direct port
instances with floating ips.
Support for OVS agent and linux bridge.

DocImpact
Change-Id: I61a8aacb1b21b2a6e452389633d7dcccf9964fea
Closes-Bug: #1492228
Closes-Bug: #1527991
7 years ago
Inessa Vasilevskaya bdeb7bcc2b enable OVSDB native interface by default
- unit tests were fixed mainly by mocking
  Connection class of native implementation.

- some ovs-lib tests rely on direct ovs-vsctl
  output. Temporarily decorated with @vsctl_only.

UpgradeImpact

Change-Id: I2632b0e21edd61536867a9fc830a45d9899091e4
7 years ago
Sławek Kapłoński f766fc71be Add setting default max_burst value if not given by user
If user will not provide burst value for bandwidth limit rule there is
need to set such value on appropriate to ensure that bandwith limit
will work fine.
To ensure at least proper limitation of TCP traffic we decided to set
burst as 80% of bw_limit value.
LinuxBridge agent already sets is like that. This patch add same
behaviour for QoS extension driver in openvswitch L2 agent.

DocImpact: Add setting default max_burst value in LB and OvS drivers

Change-Id: Ib12a7cbf88cdffd10c8f6f8442582bf7377ca27d
Closes-Bug: #1572670
7 years ago
Henry Gessau ae5bad49cc Use exceptions from neutron-lib
Related-Blueprint: neutron-lib

Change-Id: Ia014468bd621c4ee6aea95bf19328c61070174c4
7 years ago
Cedric Brandily edc342be42 Remove unnecessary executable permissions
This removes executable permissions on python modules not requiring it.

Change-Id: I844afa45f9e3d634ad1bcb90c9999d4237dc7f36
7 years ago
David Shaughnessy a9a1943fde DSCP QoS rule implementation
This patch adds the front end and back end implementation of QoS DSCP.

Associated patches that are dependent on this one:

* python-neutronclient: https://review.openstack.org/#/c/254280
* openstack-manuals: https://review.openstack.org/#/c/273638
* API Guide: https://review.openstack.org/#/c/275253
* Heat:
  * Spec: https://review.openstack.org/#/c/272173
  * QoSDscpMarkingRule resource: https://review.openstack.org/#/c/277567
* Fullstack tests: https://review.openstack.org/#/c/288392/

APIImpact - The API now supports marking traffic egressing from a VM's
            dscp field with a valid dscp value.

Co-Authored-By: Nate Johnston <nate_johnston@cable.comcast.com>
Co-Authored-By: Victor Howard <victor.r.howard@gmail.com>
Co-Authored-By: Margaret Frances <margaret_frances@cable.comcast.com>
Co-Authored-By: James Reeves <james.reeves5546@gmail.com>
Co-Authored-By: John Schwarz <jschwarz@redhat.com>
Needed-By: I25ad60c1b9a66e568276a772b8c496987d9f8299
Needed-By: I881b8f5bc9024c20275bc56062de72a1c70c8321
Needed-By: I48ead4b459183db795337ab729830a1b3c0022da
Needed-By: Ib92b172dce48276b90ec75ee5880ddd69040d7c8
Needed-By: I4eb21495e84feea46880caf3360759263e1e8f95
Needed-By: I0ab6a1a0d1430c5791fea1d5b54106c6cc93b937
Partial-Bug: #1468353

Change-Id: Ic3baefe176df05f049a2e06529c58fd65fe6b419
7 years ago
Gary Kotton 217a2adee0 QOS: get rid of warnings for unit tests
The QOS tests would have tons of warnings that real UUID's need to
be used. This patch fixes that.

We will not see any more:

    .../oslo_versionedobjects/fields.py:325: FutureWarning:
    fake_rule_id is an invalid UUID. Using UUIDFields with
    invalid UUIDs is no longer supported, and will be removed
    in a future release. Please update your code to input valid
    UUIDs or accept ValueErrors for invalid UUIDs.
    See http://docs.openstack.org/developer/oslo.versionedobjects/api/fields.html#oslo_versionedobjects.fields.UUIDField
    for further details "for further details" % value, FutureWarning)

TrivialFix

Change-Id: Iee36c7d1cd11b6a38ab67883f91dcb3bdb4d4344
7 years ago
Irena Berezovsky aee20b968a Ignore non rules related qos_policy changes
QoSAgentExtension should invoke QoSAgentDriver
to reflush qos policy rules only if there is any rules related change.
QoS policy changes, such as description change, should not cause
reconfiguration of the qos policy rules.

Closes-Bug: #1509232
Change-Id: I036b0449c7b5521adeb32602a0c0e6cf2d27510a
8 years ago
Brandon Palm 2503dfb239 Fixed a bunch of typos throughout Neutron
Went through all of the docstrings in Neutron and did
some cleanup.  I'm sure there are bunch more that I have missed.

Change-Id: Ib29d2de1c580880c89ed4fd069e1515d0977a3e7
8 years ago
Miguel Angel Ajo fe236bdaad No network devices on network attached qos policies
Network devices, like internal router legs, or dhcp ports
should not be affected by bandwidth limiting rules.

This patch disables application of network attached policies
to network/neutron owned ports.

Closes-bug: #1486039
DocImpact

Change-Id: I75d80227f1e6c4b3f5fa7762b8dc3b0c0f1abd46
8 years ago
Moshe Levi cc698b2ba5 QoS agent extension and driver refactoring
Moved some code common to all drivers into base
qos driver abstract class, so related bugfixes go all in one
place and we simplify the logic for every qos drivers.

Port/Policy mapping moved out to a separate class.

Support delete per rule_type or delete all rules.

Related-bug: #1486039

Co-Authored-By: Miguel Angel Ajo <mangelajo@redhat.com>
Partially-Implements: blueprint ml2-qos
Change-Id: Ia9d8638b9268b5aa8512cbb9d001413751f82649
8 years ago
Jenkins 6c92821b98 Merge "Removed configuration option for qos agent driver selection" into feature/qos 8 years ago
Ihar Hrachyshka ca0d7bce21 Removed configuration option for qos agent driver selection
There is no (general) use case to allow users to configure qos driver to
load by qos l2 agent extension. So instead of getting the driver name
from the configuration file, hardcode it and potentially reuse for other
extensions that may also be interested in splitting extension into
agent agnostic and agent specific pieces.

Added driver_type parameter to AgentCoreResourceExtension.initialize().
Also updated the method signature to reflect that we expect l2
extensions to receive connection.

Finally, removed #noqa import for openvswitch.common.config from qos
extension unit test since it seems unneeded.

Change-Id: Iae4dcc20c967d1da216772a3a3660e0421263527
Partially-Implements: quantum-qos-api
8 years ago
Moshe Levi 991bcd6711 Add delete_port api to agent extension manager
This commit add delete_port api to the agent
extension manager, the agent extension and the qos
etension, and it update the ovs agent to call it upon
delete port.

Change-Id: Ia4e96c7c734cf4abe9a35c813bd8330b15b68f4c
Partially-Implements: bluerint ml2-qos
8 years ago
Jakub Libosvar 088289acd2 Propagate notifications to agent consumers callbacks
The update policy works. We still need to track down the deletes which
don't work currently.

Change-Id: I48e04b42c07c34cf1daa17e7a29a6950453946ff
Partially-Implements: blueprint quantum-qos-api
8 years ago
Miguel Angel Ajo 11e22a435a neutron.api.rpc.callbacks interface rework
Split rpc.callbacks interface into consumer and producer parts.

Better terms are chosen for two RPC APIs we have:
- pull when a component actively requests a new object state;
- push when a component updates anyone interested about an object
  change.

Also, for callback registration, the following terms are used:
- subscribe when a component is registered in consumer registry;
- provide when a component is registered in provider registry.

Covered the registries with some unit tests.

Lots of existing tests utilize the registries now, and need to be
isolated from other tests that mess with the managers (that are
singletons), so introduced a common qos base test class to mock the
manager with per-test instance of it).

Co-Authored-By: Ihar Hrachyshka <ihrachys@redhat.com>
Partially-Implements: blueprint quantum-qos-api
Change-Id: I130cfbc8b78da6df4405b90ea1ab47899491ba41
8 years ago
Ihar Hrachyshka d5ee971d71 Moved l2/agent_extensions_manager into l2/extensions/manager.py
This is to keep manager more close to extensions. Also made some minor
renames in ovs agent attributes that seemed more beautiful.

Change-Id: Id5a356a595a052d0cf1f57d376ad8289e710a9b3
Partial-Implements: blueprint quantum-qos-api
8 years ago
Ihar Hrachyshka 4dd9841186 Moved extensions/qos_agent.py into extensions/qos.py
This file does not contain any separate QoS agent but just an extension
for existing l2 agents to reuse.

Change-Id: I0587d89b0e841e5fd19b91157602efb5aa97513e
Partially-Implements: blueprint quantum-qos-api
8 years ago
Moshe Levi ea02f25fbe Update OVS Agent to work with Agent Extension Mgr
Change-Id: I1887d402a4377babb648182727cf51b9f2627e1c
8 years ago
Jakub Libosvar c22cce92f8 Instantiate qos agent driver
Change-Id: Icd8a725f231e2749bb81da0bcad0f7ef95beb676
8 years ago
Jenkins a28769ff7e Merge "Small fixes in test_qos_agent UT" into feature/qos 8 years ago
Jakub Libosvar a1c05891a5 Add qos section to ovs agent config
[qos] section is introduced with qos driver for ovs agent. Similar
manner should follow for all l2 agents using qos with different default
drivers.

Change-Id: I3c6a3711d3cd9924d55cf6d0ed84be18c993c275
8 years ago
Jakub Libosvar 1ec79bad46 Small fixes in test_qos_agent UT
Change-Id: Ib09824552edd287ec1df3bdd6700c9ce8a02df29
8 years ago
Moshe Levi 9544ffb615 Qos Agent Extension
This patch introduces the following:
QosAgentExtension - implementation of AgentCoreResourceExtension
QosAgentDriver - interface class
This will allow any agent to implement their own low level driver for
Qos Agent Extension.

Co-Authored-By: Miguel Angel Ajo <mangelajo@redhat.com>

Change-Id: I9e388173dfe0eb43c961018bd687bc86f34c7a6a
8 years ago