Updates the import from neutron.agent.common.config to new location
neutron.conf.agent.common in repsonse to a change in neutron [1]
[1] https://review.openstack.org/#/c/343045/
Change-Id: I74746a92dbcac63e15fb0e0bebf7c68cb722a176
Invoke a heal_and_optimize if SR-IOV physical port config change events
are received.
Closes-Bug: #1658978
Change-Id: I1eb4bb1d802eee0a455acc9531f7547b48b331b0
The context.py file has been moved from neutron to neutron-lib.
This updates the import statement accordingly.
Change-Id: I061c0b64e19f1daedb506f3a4cc34edfc6306b4c
This patch refactors networking-powervm to use portbindings
from neutron-lib. For more details see [1].
NeutronLibImpact
[1] https://review.openstack.org/422210/
Change-Id: I05588f7a9dd9f495d879c7ebcf70b2c5616c3a46
Commit I886045ab4e6bdb8418fd1ccdcd811417ecb4ad4a moved the config option
[DEFAULT] pci_passthrough_whitelist to [pci] passthrough_whitelist.
This change set updates our devref accordingly.
Change-Id: Ide034a9b444a9a18ea312f63a8e2b7226a74a6c2
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
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 https://review.openstack.org/#/c/396739/ 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
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 (tox_install.sh) that edits
the upper-constraints file and replaces the pypowervm version pin
then sets pypowervm to be installed from source instead.
Change-Id: Ibd7052a62f7dfb85e6e18a5e1c4073bf43b88af4
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
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
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
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
Change the default pypowervm branch installed by devstack from 'master'
to 'develop'. The master branch is not useful.
Change-Id: Ia0d4182fb8adccdd4ae2c1bde72b916fd57f581f
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
module.
- 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
neutron.
- The vnic_required_vfs and vnic_vf_capacity conf options are moved to
sriov_agent.
- 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, prov_req.py. 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 (utils.py) 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
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
minutes.)
Closes-Bug: #1629559
Change-Id: I5fd640dfb799c51738aa3613852b4ac69decb31b
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
Per armax recommendation in https://review.openstack.org/#/c/374425/,
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
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
found.
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
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
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
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
devref.
Related-Bug: 1615128
Change-Id: I91dc7cf5820bbdd66af80e8f492a80d03c21c02e
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
vif.
This patchset also includes changes to setup.cfg. A console script
driver to setup networking-powervm-sriov-agent along with its sea
counterpart.
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
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
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
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 adapter.read() format to the wrapper get method.
Change-Id: If6f56d14f4161ea238d490ea44ecd74e4f468e8f
Closes-Bug: #1607338
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
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
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
Per bug https://bugs.launchpad.net/oslo.messaging/+bug/1586840, 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
Add a specs directory structure for networking-powervm and add in a
base spec template for creating new networking-powervm specs
Change-Id: I81b422f5a82a883bcbdcd39fd9daffea51c29842
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
"'__packag'"
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