Commit Graph

214 Commits

Author SHA1 Message Date
Tony Breeds 9dabc49487 Retire Packaging Deb project repos
This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).

Change-Id: I1c6a990a723f748c67596a52c2306334ce72d5e8
2017-09-12 16:08:25 -06:00
Frank A. Zdarsky 9ef9a7a92d Add schema-based config data validation
This patch adds a jsonschema for os-net-config's configuration data
and a library function to validate configuration data based on this
schema. Adding schema-based validation allows catching a larger class of
errors (typos, missing required parameters, etc.) for all devices
configurable through os-net-config.

The validation is run in the os-net-config CLI after loading the config
file. If the config file fails to validate, the current default is to
just log a warning and try to continue. By providing the new CLI option
'--exit-on-validation-errors', this can be changed to log an error and
exist instead.

This validation is meant to be reusable, for example for pre-deployment
validation of network environments (see change
Ic16ee0bc353c46f8fe512454176a07ee95347346). Packaging with os-net-config
makes it easier to keep object model and schema in sync.

Change-Id: Ie4a905863b2d46c88d9cd6c3afc50e7d0a877090
Signed-off-by: Frank A. Zdarsky <fzdarsky@redhat.com>
2017-07-12 22:57:34 +02:00
Jenkins 03d3a5dea1 Merge "Continue bringing up interfaces even if one fails" 2017-06-27 02:25:14 +00:00
Jenkins 187c1e66d4 Merge "Multiqueue support for OvsDpdkBond" 2017-06-09 10:56:12 +00:00
Bob Fournier 58a913e155 Use os-net-config mapping file when interface in bond or bridge
Os-net-config was not using the user supplied mapping file to map
interface names for interfaces in bonds or bridges.  Fix is to set
the mapping file info when creating interface objects in bonds/bridges.

Closes-Bug: 1695122

Change-Id: I063256b93c44c2e7a05d9820b0c1f6bf5b73d7a0
2017-06-08 14:09:15 -04:00
Jenkins 9626b44cc9 Merge "Configure multi-queue value for DPDK Port" 2017-06-08 04:04:43 +00:00
Karthik S c8901b8ac3 Multiqueue support for OvsDpdkBond
This patch allows the Multiqueue setting for DPDK bonds. In case of DPDK
bonds, the Multiqueue setting needs to be done for each of the interfaces
attached to the bond.

Implements: blueprint ovs-2-6-features-dpdk
Signed-off-by: Karthik S <ksundara@redhat.com>
Change-Id: I21b46cee902a17f13df51d456648368e468aadb7
2017-05-31 05:29:33 -04:00
Karthik S cc7ff987ca MTU setting for OVSDpdkBond
This patch allows the MTU setting for DPDK bonds. In case of DPDK
bonds, the MTU setting needs to be done for each of the interfaces
attached to the bond.

Change-Id: Ida627313d14a674430b2aff3644fd62b2e0bcab7
Implements: blueprint ovs-2-6-features-dpdk
Signed-off-by: Karthik S <ksundara@redhat.com>
2017-05-31 02:42:55 -04:00
Ben Nemec 5c840c4941 Continue bringing up interfaces even if one fails
Currently os-net-config exits immediately if an interface fails to
come up.  This causes problems when we call it with a failsafe
configuration because it can result in working interfaces not
being configured if there are also non-functional interfaces, which
can leave a system unreachable over the network even though it may
have a working connection.

This change stores errors and handles them after all interfaces have
been processed to allow os-net-config to do what it can even with an
invalid configuration.  If any failures are detected it will still
cause os-net-config to report failure at the end.

Change-Id: I3bc75e217d0b7c5ae62900f4253ad57ee3720685
Closes-Bug: 1692725
2017-05-30 20:17:21 +00:00
Sanjay Upadhyay 2aa95a8810 Configure multi-queue value for DPDK Port
The multi-queue option for DPDK is applied via ovs-vsctl command
via ovs_extra params. This patch adds support for configuring the
rx_queue (multi-queue) value to the DPDK Ports.

Change-Id: Ib9faad5e9d49f78e3a0b45ef3ae0082f3e9d14a6
Co-Authored-By: Karthik S <ksundara@redhat.com>
implements: blueprint ovs-2-6-features-dpdk
2017-05-23 18:15:30 +05:30
Andreas Jaeger e7e81ac011 Remove unused Babel setup
This repo is not translated at all - and not setup for translation.
Remove Babel and Babel set up.

Change-Id: Ied2e0352f32108fed7b6e3e7355e9f4c029297f1
2017-05-16 14:54:58 +02:00
Sanjay Upadhyay e5cf068ad1 Configure mtu value for DPDK port
MTU value is already written to ifcfg file if provided on the interface,
but for dpdk port, we have to apply this to ovs-vsctl command via ovs_extra.
This patch is adding the support to configure the given mtu vlaue to the
dpdk port using ovs_extra.

implements: blueprint ovs-2-6-features-dpdk

Change-Id: Ic01ed8cee2edbd648de0b64dc7f01da80c153d81
2017-04-28 20:38:03 +05:30
Jenkins 9d27aece86 Merge "Removed vlan port on ovs_user_bridge in dpdk bond samples" 2017-04-25 06:14:32 +00:00
Jenkins 52c59fbb55 Merge "os_net_config should map nics that are down if nic is in mapping file" 2017-04-13 17:23:54 +00:00
Saravanan KR ed0f6e61d2 Removed vlan port on ovs_user_bridge in dpdk bond samples
vlan port is not supported on the netdev bridges. But the
dpdk bond sample contains this wrong configuration. Removing
the vlan port on the ovs_user_bridge.
Closes-Bug: #1674280

Change-Id: I1acc8a3b8bbacc613344207b43684b0f86ff4a15
2017-04-11 16:52:54 +05:30
Bob Fournier b905e0d803 os_net_config should map nics that are down if nic is in mapping file
Currently os-net_config will map nics from a user-supplied mapping file
only if the nic is active (operstate = up).  This can cause problems
if a nic is in a bond and one of the bond's nics has no carrier.
This fix will map the nic from the mapping file if the nic is defined
on the system, regardless of the operstate status.

The fix implements a new function to return a list of available nics
(no check of operstate) for use if a mapping file is supplied.  The
list of active nics must still be used in the default case when
numbering nics (no mapping file supplied).  There is also some
cleanup to check if a user-supplied mac is in the mapping file before
attempting to convert the mac to a nic.

Change-Id: Ia5d8c8b49b7ac0b51ee42a754f06e5e53587a5f6
Closes-Bug: 1679787
2017-04-10 10:05:42 -04:00
Jenkins d12f1615cc Merge "Handle bools-as-strings nm_controlled values" 2017-04-07 05:14:42 +00:00
Jenkins fc4be60106 Merge "Correct the test code to remove 'pass' where it is not needed" 2017-04-06 12:44:31 +00:00
Jenkins f26b56c8f2 Merge "Add support for VPP interface" 2017-04-05 17:31:14 +00:00
Ben Nemec 1b83afb07d Fix coverage tox config
By default coverage looks for os-net-config, but since that's not
a valid python package name the actual package is called
os_net_config.  This change correctly specifies that.

Change-Id: I5949ad2380942440f74397c2d74c94bc6ef3c55d
2017-03-31 17:45:11 +00:00
Ben Nemec 8d8f96ac1a Updated from global requirements
It appears os-net-config is not in the sync list for g-r.  We should
add it, but in the meantime this will get us up to date.

Change-Id: I828a394ce72824eaabe904b563f73734a88c21f8
2017-03-31 17:45:11 +00:00
Feng Pan c5e11bbfcd Add support for VPP interface
Vector Packet Processing (VPP) is a high performance packet processing
stack that runs in user space in Linux. VPP is used as an alternative to
kernel networking stack for accelerated network data path. VPP uses DPDK
poll-mode drivers to bind system interfaces rather than kernel drivers.
VPP bound interfacees are not visible to kernel networking stack and
therefore require different configuration steps in os-net-config.

VPP interface will be used in Openstack by either Neutron ML2 driver
networking-vpp as an alternative to OVS, or by Opendaylight SDN
controller with Honeycomb agent.

This patch adds interface configuration support to os-net-config.
The kernel nic specified to be VPP interface type will be bound to
VPP with a DPDK poll-mode driver. Note that os-net-config will only
configure those settings that affect interface binding, all other
configurations for VPP will be configured throught TripleO Heat
Templates.

Implements: blueprint fdio-integration-tripleo

Change-Id: Iebb40b7c5b252c51e86b6f44bcf36ed206101390
Signed-off-by: Feng Pan <fpan@redhat.com>
2017-03-21 15:28:35 -04:00
Saravanan KR 34df7f5748 Correct the test code to remove 'pass' where it is not needed
'pass' is added on a valid function, which is not required
for a stub function which has some implementation.

Change-Id: I8c35790a8b2a378231df535663c3e6f3a5fe5491
2017-03-20 16:10:20 +05:30
Brent Eagles 9033caa332 Handle bools-as-strings nm_controlled values
Fixes an issue where string values for nm_controlled were not converted
to the appropriate boolean values.

Closes-Bug: #1673878

Change-Id: I912ca2ef54d1d1f97e76b3922b7c2fecc77040ff
2017-03-17 17:59:27 -02:30
Jenkins 7a65a0de1f Merge "H803 hacking have been deprecated" 2017-03-15 02:35:24 +00:00
Dan Sneddon 5f0145b885 Allow setting NM_CONTROLLED=yes in os-net-config ifcfg files
This change adds a flag to the base interface type, nm_controlled.
If this flag is true, the ifcfg file will contain NM_CONTROLLED=yes.
Since this flag is applied at the base it applies to any interface
type.

Note that not all interface types are supported by NetworkManager
at this time, so this option should be used with caution.

A demonstration of the usage is included in the
linux_bond_networkmanager.yaml file in the sample directory.

Change-Id: I2df6ce5b4bdb04651f27fc5daa64aa752e47f3b1
Closes-Bug: 1671888
2017-03-10 14:32:43 -08:00
karthik s ab0e0d433f Restart Openvswitch after adding DPDK ports
OvS needs to be restarted after adding a DPDK port. This change
shall be removed on migration to OvS 2.7 where DPDK Hotplug support
is available.
Co-Authored-By: Saravanan KR <skramaja@redhat.com>
Closes-Bug: #1668375
Signed-off-by: karthik s <ksundara@redhat.com>

Change-Id: I250bb8e9a8e50874a82bf7f159e5a9d5677ef5ac
2017-03-01 00:20:13 +05:30
Jenkins 3a113c0c0c Merge "Network service is failing with DPDK" 2017-02-14 08:07:22 +00:00
Jenkins a08a85cc40 Merge "Drop py33 support and add py35" 2017-01-31 09:50:02 +00:00
Dan Sneddon 354abb5b6e Allow ovs_extra to be specified as either a string or list
This change allows the commands in ovs_extra to be expressed
as a string or as a list. If a string is passed, it will be
treated as a list with a single element, and other ovs_extra
elements will be appended to the same list, such as fail_mode.
In order for more than one command to be passed as a string,
the commands will need to be separated with double-dashes,
similar to the format used by OVS command-line utilities.

Change-Id: I3f69e7ab96ff6e06953c3838b3e187b93545d623
2017-01-27 15:02:15 -08:00
Jenkins 60f043152d Merge "Add check that ovs_extra is passed as list" 2017-01-27 16:57:26 +00:00
Jaganathan Palanisamy d1db332350 Network service is failing with DPDK
Network service is failing and not started when interface is binded
with dpdk driver and interface config file is available.
In such case, removing config file for the interface which is binded with
dpdk driver.

Change-Id: Id445fbfe7abdd54c2ea522960224c7f0e412dd30
Closes-Bug:  #1657661
2017-01-27 02:09:36 -05:00
Jenkins b4ecaa5c34 Merge "Exclude SR-IOV VFs in the nic numbering" 2017-01-23 11:02:24 +00:00
Sanjay Upadhyay f40b61ed67 Remove child members activation for OVS-DPDK bond
While creating DPDK bond, if-up of the bond interface
itself will activate the member interfaces. Individual
members should not be called for ifup.

Additionally, removing the option to select the primary
active-slave member for the bond, because of #1654975.
Once it is fixed, primary selection from the network
config will be added.

Change-Id: I83527ada4a3618927d55b7aa06d436686b12d5b8
Closes-Bug: #1643026.
2017-01-18 15:56:19 +05:30
Frank A. Zdarsky 8c841946d4 Add check that ovs_extra is passed as list
This patch adds a check that ensures the ovs_extra option, if present,
is passed in as list and raises an InvalidConfigException if not.
It addresses the issue that a user may mistakingly pass the value as
string, which would cause an error later when appending the failure
mode or when formatting the ovs_extra parameter.

Note: Also fixes a sample file in which ovs_extra was passed as string.

Change-Id: I9e8e47390b63d284de10d27b1db2c2cc54c86924
Closes-Bug: #1654196
2017-01-05 12:55:55 +01:00
Frank A. Zdarsky 81d2a7d871 Make os-net-config pass tox py3 tests
This patch improves Python 3 compatibility by replacing .iteritems()
with .items() for iterating over dicts and fixing two tests to use
portable string comparison.

Change-Id: I8e1acafe372f1696823561d6aa8aae5437d34025
Closes-Bug: #1654187
2017-01-05 10:35:35 +01:00
Saravanan KR 3a0c8dabfa Exclude SR-IOV VFs in the nic numbering
SR-IOV Virtual Functions will be present as an interface in the
directory '/sys/class/net'. As these are virtual interface created
during the deployment process, it has to be ignored in the nic
numbering logic.
Closes-Bug: #1653097

Change-Id: I118a7314d496b531c52be45521d393123cdfe915
2017-01-04 11:42:59 +05:30
Jenkins d929214c7a Merge "Add support for enabling hotplug on interfaces" 2017-01-03 21:24:55 +00:00
xhzhf 4170e3fc56 H803 hacking have been deprecated
H803 hacking have been removed.
https://github.com/openstack-dev/hacking/blob/master/setup.cfg
Closes-Bug: #1650741

Change-Id: I915f80e1ef5a04f627fae9d60644b191e9e1cbed
2016-12-21 22:47:59 +08:00
Tony Xu cb020bd8b7 Drop py33 support and add py35
"Python 3.3 support is being dropped since OpenStack Liberty."
written in following URL.
https://wiki.openstack.org/wiki/Python3

And already the infra team and the oslo team are dropping py33
support from their projects.

Since we rely on oslo for a lot of our work, and depend on infra
for our CI, we should drop py33 support too.

Change-Id: Ia11cf4c1e7ec2a2c90c4feb75f2530359087210f
2016-12-21 10:38:39 +08:00
Flavio Percoco d621022954 Show team and repo badges on README
This patch adds the team's and repository's badges to the README file.
The motivation behind this is to communicate the project status and
features at first glance.

For more information about this effort, please read this email thread:

http://lists.openstack.org/pipermail/openstack-dev/2016-October/105562.html

To see an example of how this would look like check:

b'https://gist.github.com/6e1f554da51706211030df28d00626fb\n'

Change-Id: Ibe8f007638ae8530cfe4f4a9f8356104fc7e3e48
2016-11-25 14:28:12 +01:00
Jenkins 6878d9ced7 Merge "Add sample files for fail_mode and ovs_extra template" 2016-11-21 14:23:00 +00:00
Brent Eagles 433a0f3cbe Add support for enabling hotplug on interfaces
This patch adds support for enabling hotplugging on interfaces (disabled
by default). This is useful for configuring SR-IOV root devices so that
they "return" to the system when no longer used by a VM.

Note: also updates an invalid value in the interface and ib_interface
sample files.

Partial-Bug: #1639901
Change-Id: Idfc17d6f20bb306271838895bc53f4b109dd664d
2016-11-18 14:38:45 -03:30
Jenkins 9971eb3af9 Merge "Stop dhclient in os-net-config if interface not set for DHCP" 2016-11-16 22:52:31 +00:00
Bob Fournier fceeece767 Stop dhclient in os-net-config if interface not set for DHCP
As described in https://bugs.launchpad.net/tripleo/+bug/1640598,
there are situations in which the dhclient instance started by
dhcp-all-interfaces runs even after the interface is no longer
configured for DHCP.  This change will terminate the instance
using the '-r' argument if 'BOOTPROTO' is not set to 'dhcp' in
the ifcfg file for the interface.  The dhclient will only be
stopped if a dhclient pid file exists, the pid file will be
removed after stopping dhclient.

Co-Authored-By: Dan Sneddon <dsneddon@redhat.com>
Change-Id: I8a52ef5fb8052f185c01dcc27a1ecd70f5d630c8
Closes-Bug: 1640598
2016-11-15 17:44:33 -05:00
Brent Eagles 71ba53264d Add sample files for fail_mode and ovs_extra template
This patch adds sample json and yaml for:
- setting the OVS bridge fail mode using the new ovs_fail_mode option
- using the {name} replacement feature for ovs_extra data for inserting
  the bridge name in configuration data

Change-Id: I2af32edbba0b635207888ad0502b2296f502c274
2016-11-15 16:26:28 -03:30
Brent Eagles e479535b50 Add ovs_fail_mode option for OVS bridges
This patch adds an option "ovs_fail_mode" with a default value of
'standalone'. This is written to the interface configuration data as
part of the ovs_extra options.

Closes-Bug: #1640812

Change-Id: I2f30e56ff9fbda7beac21d95d15dbde0b01ba451
2016-11-15 10:25:33 -03:30
Brent Eagles 38a4ffbfe0 Add support for name replacement in OVS_EXTRA
While primarily to work around a heat issue that prevents intrinsic
functions from being used for parameters being passed to NetworkConfig
resources, this could be generally useful in other ways.

Partial-Bug: #1640812
Change-Id: Ie9001f1d41f514666a44c8d9295b78a13e2108dc
2016-11-15 10:25:33 -03:30
Jenkins 3199064d4d Merge "Raise NotImplementedError instead of NotImplemented" 2016-11-15 00:18:48 +00:00
Pierre Blanc 469c0ab91a Add support for ethtool_opts option
This patch add an optional option to specify
the ETHTOOL_OPTS for each interface.

ETHTOOL_OPTS option will be written to the ifcfg file.

Change-Id: I6b594e89ba6b4c17e8df79def997f6c9ea427a3a
2016-11-11 13:06:36 -05:00