Commit Graph

193 Commits (a9f6adf3166fe7c033a5ca7ae511ad6ec2798ea8)

Author SHA1 Message Date
Eric Berglund a9f6adf316 Update neutron agent conf import
Updates the import from neutron.agent.common.config to new location
neutron.conf.agent.common in repsonse to a change in neutron [1]


Change-Id: I74746a92dbcac63e15fb0e0bebf7c68cb722a176
2017-03-16 14:21:18 +00:00
Cao Xuan Hoang bf650cccde Changed author and author-email
Changed author to OpenStack and author-email to

Change-Id: Ib37fa8d65b43c44b5c29ebb44fc3558c7fad2342
2017-03-15 16:30:30 +00:00
Eric Fried 7eac259b03 Event-driven heal_and_optimize for SR-IOV
Invoke a heal_and_optimize if SR-IOV physical port config change events
are received.

Closes-Bug: #1658978
Change-Id: I1eb4bb1d802eee0a455acc9531f7547b48b331b0
2017-03-09 13:49:51 -06:00
Jenkins f2a596f763 Merge "Bump to match latest global requirements" 2017-03-08 16:42:50 +00:00
Eric Berglund 240fa28d66 Import context from neutron_lib
The file has been moved from neutron to neutron-lib.
This updates the import statement accordingly.

Change-Id: I061c0b64e19f1daedb506f3a4cc34edfc6306b4c
2017-03-07 11:07:39 -06:00
Adam Reznechek c4b1db00f4 Bump to match latest global requirements
This bumps all reqs to match the latest upstream
from global requirements master.

Change-Id: Ib7c6644bc57235cf35bc66faa5d361cfc75285f1
2017-03-06 14:53:49 +00:00
Jenkins 759aeedf8b Merge "Use neutron-lib portbindings api-def" 2017-01-27 15:24:44 +00:00
Boden R ab9597f49f Use neutron-lib portbindings api-def
This patch refactors networking-powervm to use portbindings
from neutron-lib. For more details see [1].



Change-Id: I05588f7a9dd9f495d879c7ebcf70b2c5616c3a46
2017-01-26 10:45:32 -06:00
Eric Fried 4adbf4b05f Move deprecated pci_passthrough_whitelist
Commit I886045ab4e6bdb8418fd1ccdcd811417ecb4ad4a moved the config option
[DEFAULT] pci_passthrough_whitelist to [pci] passthrough_whitelist.
This change set updates our devref accordingly.

Change-Id: Ide034a9b444a9a18ea312f63a8e2b7226a74a6c2
2017-01-23 10:49:41 -06:00
Jenkins 90e0719250 Merge "Update to match latest global-requirements" 2017-01-18 17:43:50 +00:00
Adam Reznechek 90dc56c07b Update to match latest global-requirements
Update requirements to the levels defined in OpenStack
global-requirements on 2016-1-10.

Change-Id: Id723a199b198758df027df7bd176adf6659c8114
2017-01-10 17:24:59 -06:00
Sridhar Venkat e64928fd16 Physical network not included in vif details
SR-IOV mechanism driver in networking_powervm/plugins/ml2/drivers/
mech_pvm_sriov.PvmSRIOVMechanismDriver does not include
'physical network' in the custom vif details. Method
customize_vif_details prepares a dictionary like this :
{'redundancy': 1, 'physical_ports': [u'U78C9.001.WZS05TG-P1-C5-T1'],
'vlan': '2200', 'port_filter': False, 'capacity': 0.02}
It does not include physical_network.
This is not a bug, but SR-IOV vif plug mechanism in
nova_powervm/virt/powervm/vif.PvmVnicSriovVifDriver.plug can use
physical_network value to calculate physical ports in migration
scenario (future work in nova_powervm).

Above mentioned plug mechanism currently uses get_physical_network method
in nova/network/model.VIF class. This method expects physical_network in
custom vif details prepared by mechanism driver.

This patchset fixes this by adding physical_network to vif details by
getting it from network segment.

Unit tests added.

Change-Id: I379c9deceb72e4d5ea17891120d065230578d59e
Closes-Bug: #1651129
2016-12-21 08:35:03 -05:00
Sridhar Venkat a5f5fccdc0 ProvisionRequest does not distinguish event source
VIFEventHandler creates ProvisionRequest and passed down to agents for
processing. Currently, there is nothing in ProvisionRequest to
distinguish it between CNA or VNIC related. Due to this, SEA agent
gets VNIC related ProvisionRequests and processes to provision vlan
on SEA. This needs to be avoided. This patchset introduces vif_type
attribute into ProvisionRequest.

Refer to for a change in
nova_powervm. vif_type is now part of the event generated when a vif
is plugged or unplugged. This patchset uses the newly introduced
vif_type in the event while generating ProvisionRequest.

A new abstract property has been added to base_agent to carry
corresponding vif_type. Both sea_agent and sriov_agent have been
updated to return appropriate vif_type property. If vif_type in
incoming event does not match with vif_type supported by agent,
ProvisionRequest is not generated. And so, agent is not notified to
provision device.

For example, in the case of SR-IOV based plug, event carries
vif_type as pvm_sriov, and SEA agent supports vif_type as pvm_sea.
No ProvisionRequest is generated and sea_agent provison device
function is not invoked, so no vlan is provisioned.

Change-Id: Ifccaf4ee9ce492a295958393baf48bb383319805
Closes-Bug: #1640564
2016-11-18 08:30:16 -05:00
Adam Reznechek 222d6ef8c7 Add for pypowervm upper-constraints workaround
With the recent addition of pypowervm to upper-constraints, installs
of networking-powervm are now by default enforcing the version set there.
Since the master branch of networking-powervm depends on the develop
version of pypowervm, this causes installs to fail.

This changeset adds a wrapper script ( that edits
the upper-constraints file and replaces the pypowervm version pin
then sets pypowervm to be installed from source instead.

Change-Id: Ibd7052a62f7dfb85e6e18a5e1c4073bf43b88af4
2016-11-16 20:00:27 +00:00
Eric Berglund c509f398a7 Import exceptions from neutron_lib
exceptions was previously being imported from neutron.common. This
has now been deprecated in favor of importing from neutron_lib.
This change updates to the correct import.

Change-Id: Ic8175983ea3634139a12eebe94138ded5b146276
2016-11-11 12:38:53 -06:00
Jenkins 8479a73d72 Merge "Use upper constraints" 2016-10-31 13:53:18 +00:00
Drew Thorstensen a6bded724e Use upper constraints
This changes the tox command to use the upper constraints.  This avoids
hitting known issues with newer versions of libraries.

Change-Id: Ida4d9cabcff079a587d61b390cb50443a1cf7398
Closes-Bug: 1637938
2016-10-31 09:35:44 -04:00
Jenkins 8e8d184a24 Merge "Add extra logging to bridge mapping updates" 2016-10-27 14:57:11 +00:00
Eric Fried 6f93250c34 Add extra logging to bridge mapping updates
Add debug logs for when the agent reports updated bridge mappings back
to neutron.  If a vNIC gets deployed on backing devices with the wrong
label (physical network name), these logs help figure out why.

Change-Id: I955a58b4da264dc5d7b38bc7d821a311363cdfcf
2016-10-26 21:18:05 +00:00
Ravi Kota c9f2863d82 Translation files for supported languages
Updated the po translation files for supported languages.

Change-Id: I9a131c58b38154db6920a0b99da6c171bd346087
Closes-Bug: #1636140
2016-10-24 08:06:13 -04:00
Eric Fried 64238d8d94 Restore setup_adapter to BasePVMNeutronAgent
Removal of the setup_adapter helper via Change-Id
Ie8a13da0b0cdc29d350ed91d96ff2384430c2676 introduced compatibility
issues; this change set restores it.  The setup_adapter method simply
assigns self.adapter a valid pypowervm.adapter.Adapter.

Change-Id: Ib3520c130119335f68d58b77fa3442322f6bfb2d
Closes-Bug: #1634526
2016-10-18 09:37:11 -05:00
Eric Fried 39db3df4cd Change devstack pypowervm branch to develop
Change the default pypowervm branch installed by devstack from 'master'
to 'develop'.  The master branch is not useful.

Change-Id: Ia0d4182fb8adccdd4ae2c1bde72b916fd57f581f
2016-10-13 10:27:42 -05:00
Jenkins f53880d40f Merge "Refactor, consolidate, and clean up agents" 2016-10-12 18:59:43 +00:00
Eric Fried c35eb18de1 Refactor, consolidate, and clean up agents
This change set represents a major refactor of the neutron SEA and
SR-IOV agents.

- Proper abstract properties/methods allow much code to be consolidated
  into the BasePVMNeutronAgent from the individual subclasses.
- Conversely, CNA-specific code, such as helpers for the
  sea_agent-specific heal_and_optimize loop, is moved to the sea_agent
- PVMRpcCallbacks methods are folded into the agent base class itself.
  The agent is now the thing that's registered for those callbacks.
- The network_delete callback is gone (it wasn't being used).
- The port_update callback is a no-op by default.  In the SR-IOV agent,
  it's refreshing the physical port label:physloc mappings back to
- The vnic_required_vfs and vnic_vf_capacity conf options are moved to
- There is no longer a short timer in the rpc_loop; everything is
  event-driven.  Thus, the polling_interval conf option is removed.
- The rpc_loop is common to both agents.  It only runs
  heal_and_optimize, on the configurable interval (default 30min).
- ProvisionRequest is moved into its own module,  It is now
  a factory class capable of producing ProvisionRequest instances for:
  - Custom VIF Events from the nova-powervm VIF driver;
  - pypowervm Wrappers of VIF types (CNA, VNIC);
- The VIFEventHandler (formerly CNAEventHandler) is now driven by VIF
  events produced by the nova-powervm VIF driver.  This entails a
  significant processing/performance/load improvement over the previous
  code, which acted on all LPAR events.
- Utility methods ( are renamed and genericized to handle all
  VIF types (CNA, VNIC) rather than just CNAs.
- Obsolete utility methods and their unit tests are removed.
- Unit tests overhauled and extended.

Closes-Bug: #1632400

Change-Id: Ie8a13da0b0cdc29d350ed91d96ff2384430c2676
2016-10-12 18:24:29 +00:00
Jenkins b3d3c48238 Merge "Merge tag '1.0.0'" 2016-10-12 14:21:36 +00:00
Eric Fried 7820ccd920 Time out port update waiting for vif plug
When the SR-IOV agent receives a port update notice from neutron, it
polls the server waiting for the corresponding vNIC to be created before
marking the port as active.  If the vNIC create errors or doesn't
happen, the agent would keep polling for that vNIC indefinitely.

With this change set, if the vNIC doesn't spring into existence within
20 minutes, the agent gives up and stops polling.  (If whatever caused
the vNIC not to be created hasn't already triggered rollback/cleanup of
the corresponding compute process, that process also times out after 20

Closes-Bug: #1629559
Change-Id: I5fd640dfb799c51738aa3613852b4ac69decb31b
2016-10-04 18:09:51 +00:00
Ravi Kota 82665cc2d9 Translation files for supported languages
Updated the po translation files for supported languages.

Change-Id: I94f78c08f64569da5869ccdc87f7506f3691428e
2016-09-27 11:58:21 -04:00
Eric Fried a4785bad10 Remove remaining references to PVID looper
Commit 0fcfc379de removed the PVID looper,
but left references to the corresponding config option.  This change set
removes the config option from sea_agent and references thereto from the
usage.rst and devstack README.rst.

Change-Id: I8e50e9455b53489af2a05b5223c2dd8d51e4758d
Closes-Bug: 1626257
2016-09-21 23:24:13 +00:00
Eric Fried 2bb923e9c0 Switch hacking.checks from neutron to neutron_lib
Per armax recommendation in,
moving away from the neutron hacking checks, using neutron_lib hacking
checks instead.

We need to bypass N530 (direct neutron imports not allowed) for the
forseeable future.

Change-Id: I05804844445575a55ab33273b88fd3a5ff9df179
Closes-Bug: #1626298
2016-09-21 18:18:20 -05:00
Eric Fried e75050c4fb Wait to activate port until vNIC vif is plugged
The PowerVM SR-IOV neutron agent was sending update_device_up (almost)
immediately in response to the update_port push from neutron.  If the
resulting network-vif-plugged event arrives at the compute process
*before* the PlugVifs task starts waiting for it, we'll miss it and thus
time out "waiting" for the vif to get "plugged" (even though the vNIC
gets created successfully).

With this change set, when the sriov_agent's rpc_loop pulls a port off
the queue, it will search the REST server for a vNIC with the matching
MAC address.  If not found, it'll push the port back on the queue and go
back to sleep.  It only sends the update_device_up once the vNIC is

This is not an ideal solution for a number of reasons, including:
1) We have no way to know if the VNIC creation failed, in which case we
may wind up with stale port entries in the queue forever.
2) The current mechanism for finding the vNIC is very heavy: a feed GET
of all LPARs followed by a VNIC feed GET on each.  We should find a more
lightweight way of doing this.

Change-Id: I99b3d36e3aabd145f598e5c5dbcaa3e64df00fc5
2016-09-08 17:29:54 -05:00
Jenkins eb5f02faa7 Merge "Remove the PVID Looper" 2016-09-06 21:10:26 +00:00
Jenkins dc36dc8dbb Merge "Add expected devstack functions" 2016-08-31 17:22:36 +00:00
Eric Berglund 12f23fea0c Add expected devstack functions
Devstack expects that there are certain plugin function names which we
have not defined. This defines these function names. They are just
empty functions to aviod command not found errors and provide no
additional functionality.

Change-Id: I281abee72370a583282f3d9ad7c3b572496d025a
2016-08-31 14:08:07 +00:00
Drew Thorstensen 0fcfc379de Remove the PVID Looper
With the ability to pass the VLAN over to nova, via the mechanism driver
and vif binding details, we no longer need the PVID Updater.

Previously the function would wait for nova to provision a VIF on VLAN
1.  Then the sea networking agent would detect this new port, update the
SEA to support the VLAN (if needed) and then update the VLAN on the VIF.

Now that we can pass the VLAN to Nova at the VIF create time, that last
step is not needed.

Change-Id: Ifc5bfe8b5e118f02faf0556cc3e67d11a66e2b25
2016-08-29 10:53:13 -04:00
Eric Fried 37378e0bb6 capacity from binding:profile => ml2 conf => None
Previously, the VF capacity for SR-IOV-backed vNICs had to come from the
vif's binding:profile; else it would default to None (allowing the
platform to default it).

With this change, the capacity can also be specified in the ml2
configuration file via the new 'vnic_vf_capacity' option in the AGENT
section.  The binding:profile value takes precedence, followed by the
configuration value.  The configuration default is None if unspecified.

Since binding:profile values will not be supported in the current
release (see Related-Bug), references thereto are removed from the

Related-Bug: 1615128

Change-Id: I91dc7cf5820bbdd66af80e8f492a80d03c21c02e
2016-08-26 15:59:17 -05:00
Jenkins 387f101ccb Merge "Mechanism driver & agent for powervm SR-IOV" 2016-08-24 13:17:38 +00:00
Sridhar Venkat d4897df6ab Mechanism driver & agent for powervm SR-IOV
A new mechanism driver is included in this patchset. This has a
corresponding SR-IOV agent implementation as well.

The mechanism driver supports vnic_type direct. Both flat and vlan
network types are suported. The mappings reference maintained by this
driver is derived from agent configuration.  Agent periodically updates
mechanism driver with a list of physical networks derived from port
labels of physical ports of SR-IOV adapters. Mechanism driver validates
incoming port for binding if it has valid physical network attached to
it.  To do this, the check_segment_for_agent method is used by
try_to_bind_segement_for_agent. Under the covers, mappings from the
agent are matched with physical network attribute of the segment.

This mechanism driver also provides vlan information during binding to
vif plug mechanism on nova side. To do this, this mechanism driver
provides binding:vif_details with vlan id. On nova side, during vif plug
operation, vlan can be retrieved from ['details']['vlan'] attribute of

This patchset also includes changes to setup.cfg. A console script
driver to setup networking-powervm-sriov-agent along with its sea

setup.cfg changes also include Mechanism driver setup in ml2.conf
and entry_points.txt file in runtime environment.

Implements: bp/powervm-sriov
Change-Id: I87f6ed095d62afe4c683c2688fa27ddf367a19f6
2016-08-23 13:58:54 -05:00
Jenkins 1b2a414394 Merge "Checkin blueprint for networking-powervm for SR-IOV VIFs support" 2016-08-22 15:22:28 +00:00
Drew Thorstensen 882868c4a9 Enforce limit of VLAN clean ups in each pass
If the system has an excessive amount of VLANs to clean up, the heal and
optimization path can block the requests coming in for an extensive
period of time.  This may eventually lead to VIF plugging timeouts on
the nova component.

This change set will stop doing deletes of VLANs after three passes.  It
logs the remaining VLANs that need to be cleaned up, but does not
actually execute the delete.  It assumes the next pass through will do
the appropriate cleanup.

Change-Id: I97d74531b542177b105ca2625949075b1c8fbf24
Closes-Bug: #1612047
2016-08-18 12:59:20 -04:00
Drew Thorstensen 897ba209f2 Fix bridge mapping change
The related_href was used to parse out the bridge_mappings table.
Unfortunately, *how* you queried for the data identified what the URI
would be.  An earlier change to remove some host_uuid's ended up
malforming the URI and breaking the bridge_mapping logic.

This change fixes how we look at the URIs to see if a SEA is on a given
VIOS.  This should be more reliable moving forward.

Change-Id: I98f76a44db0f61d3e8ed4d3204c1e086bfe00fab
Closes-Bug: #1612047
2016-08-17 12:53:01 -04:00
Drew Thorstensen 6391abbed6 Simplify host_uuid and gets
This change set reduces the number of host_uuids being passed around in
networking-powervm.  It also switches many of the calls from the very
verbose format to the wrapper get method.

Change-Id: If6f56d14f4161ea238d490ea44ecd74e4f468e8f
Closes-Bug: #1607338
2016-08-05 16:06:44 -04:00
Sridhar Venkat 71fb2ac840 Checkin blueprint for networking-powervm for SR-IOV VIFs support
This is the blueprint to implement SR-IOV VIFs in networking-powervm

Change-Id: I16932d3063440acfcde97a15eeb8dcacb142ef04
2016-08-01 11:43:18 -04:00
Drew Thorstensen 3a24253f4b Support VIOS CNAs
The VIOS type element can be running true Client Network Adapters (VEAs
without additional trunk adapters) on it.  The heal and optimize code
should take these adapters into account.

This change set updates some of the utility methods to account for VIOS
types.  It also updates the heal and optimize code to take these VEAs
into account for the whole system (LPARs and VIOSes).

Change-Id: If21246b1d9c140a9b97201ced95f578a86b5c62d
2016-07-26 20:49:17 -04:00
eshaseth 4df3e50301 Support returning non-mgmt LPAR UUIDs
This change allows for the utils list_lpar_uuids to take in a new
parameter that can exclude the mgmt UUID.  This is an important change
because we may wish to explicitly exclude it to avoid erronerous logging
messages.  This differs from pypowervm's base implementation where it
explicitly includes it (if that explicit include is not set to True, it
does not explicitly exclude it).

Reworks to use the pypowervm get_partitions method where able.

Closes-Bug #1602598

Change-Id: Ic47b4f20c04a7f98517a77cdb31d044a1f8f63e8
2016-07-26 12:50:55 -04:00
Drew Thorstensen 63d318d6a3 Update requirements/Remove deprecations
This change set re-aligns the networking-powervm source code with
the global requirements.  It also removes some of the deprecations from
that were popping up from neutron.

Change-Id: Id44d6bea9a68de45ec4ebc7f183de340815b76f7
2016-06-20 11:10:28 -04:00
Eric Fried c5475f3b42 Global amqp and hacking requirements
Per bug, the most
recent amqp version is not backward compatible, and breaks various
things along the oslo_messaging chain.  This manifests in
networking-powervm as an import failure for 'vine'.  This problem is
resolved by updating the amqp requirement to align with
global-requirements per If7e130a70f31a2eb1d9df6b5f46f88c90880e254.

The hacking checks for neutron also rely upon
hacking.core.off_by_default.  This is satisfied by the global
requirement for this package.

Change-Id: I7981e89710690cad3edbc8b953aac7cc07457f4e
Partial-Bug: 1586840
2016-06-02 14:44:52 -05:00
Jenkins 8fa77b7199 Merge "Fix package reference in version code" 2016-05-26 17:44:22 +00:00
adreznec 8bb527cb55 Add networking-powervm spec dir and template
Add a specs directory structure for networking-powervm and add in a
base spec template for creating new networking-powervm specs

Change-Id: I81b422f5a82a883bcbdcd39fd9daffea51c29842
2016-05-26 08:51:45 -05:00
Eric Fried b431d9e12b Fix package reference in version code
The package version file erroneously contained quotes here:

version_info = pbr.version.VersionInfo('__package__')

This caused docs builds using setuptools at or beyond 20.2 to fail with:

pkg_resources.RequirementParseError: Invalid requirement, parse error at

This change set remedies the line to refer to __package__ (a builtin
variable which resolves to the package name) rather than the literal
string '__package__':

version_info = pbr.version.VersionInfo(__package__)

...and updates the requirements file to use a setuptools version at or
beyond 16.0 to align with openstack's global requirements.

Change-Id: Ib90ed24cbc5738af8db275337af597585751baa9
Closes-Bug: 1585027
2016-05-26 13:46:55 +00:00
Sridhar Venkat c4a51c6a3e Avoid invoking get_device_details_list when no ports to update
Periodic rpc loop ends up invoking get_device_details_list even
if there are no ports to update. This makes an unnecessary call to
neutron server. This fix avoids such a call if there are no ports
to update.

Existing unit test test_build_prov_requests_from_neutron already
handles empty port list scenario.

Change-Id: I1a664b466107875361095764e188fba0d0738e5c
Closes-Bug: 1573180
2016-05-24 14:15:15 -04:00