Commit Graph

83 Commits

Author SHA1 Message Date
John P Lettman 7929fc4909 add nagios checks
Updates charmhelpers for nrpe; adds metadata and config entries for nrpe relation; adds services and ovs liveliness nrpe checks.

Change-Id: I991fb6943d833d45e632358141b130c0f2225c09
2022-05-24 10:09:30 -04:00
Chris MacNaughton b9c66d81b9 Update description of dpdk-socket-cores
Closes-bug: #1905284
Change-Id: I8eb03cda1bff845b39b3fbab3a2e344889453993
2021-08-16 11:54:44 -05:00
Zuul e33d2a7cf3 Merge "Disable vrrp healthchecks by default" 2021-05-20 12:47:32 +00:00
Liam Young 9b11d24d40 Implementation of deferred restarts
Add deferred restart actions and config.

Change-Id: I334df5ca932e9f94e128d9fa66c1ab91d60233b4
2021-04-09 12:53:58 +00:00
Nobuto Murata e031b3520f Update worker-multiplier config description
Based on the change in charm-helpers:
https://github.com/juju/charm-helpers/pull/553

Related-Bug: #1843011
Change-Id: I9cc584226c68d3a6fa4af547a18e3f8c0c043fc4
2021-03-30 11:16:26 +09:00
Billy Olsen eb4e3e3bc3 Disable vrrp healthchecks by default
VRRP healthchecks were enabled by default starting in the 19.07 charm
release for network deployments which utilize l3ha or dvr+snat. The VRRP
healthchecks have specific expectations that may not be satisfied in
various data centers. This leads to problems with networks as failed
healthchecks lead to router failovers.

This change alters the default config option to disable the vrrp
healthchecks by default and require users to opt in to using them. The
description around the option has been updated to indicate that doing so
may lead to routers failing over if ICMP pings are missed.

Change-Id: Ie281a311a95ba394d72c2dfeeb0a1a0a12847e77
Closes-Bug: #192101
2021-03-24 12:52:43 -07:00
Rodrigo Barbieri bd851d4884 Improve documentation on data-port functionality
Update docs to clarify that manual removing of previous
values are required if the config changes.

Related-bug: #1915967
Change-Id: I99ffab5488a088c40c276ba5be0b60223e077eb6
2021-03-22 14:01:42 -03:00
Frode Nordahl a88259a768 SR-IOV: match on PCI address, don't do runtime config
Replace in-charm SR-IOV code with the common ``SRIOVContext``

Do not do run-time configuration of SR-IOV or hardware adaption
for hardware offload. In addition to being detrimental to any
virtual machine instance consuming the VF this will break NIC
firmware in some configurations.

The task is delegated to the installed packages and their systemd
services and configuration will occur at system bootup time.

We may consider adding an action to perform the configuration at
run-time if the operator really wants to, but it is very
complicated to get right. For example if you are using bonding
and hardware offload the virtual functions and hardware specific
setup has to happen _BEFORE_ netplan applies network configuration
to the system.

Closes-Bug: #1908351
Change-Id: Id0b81848658a3bd34470440bd68928ae9f6682e4
2021-02-16 11:45:53 +01:00
Corey Bryant 282f6af3db Add disable-mlockall config
By default, mlockall() is enabled for ovs-vswitchd. This results in
locking all of ovs-vswitchd's process memory into physical RAM and
prevents paging. This enables network performance but can lead to
memory exhaustion in memory-constrained environments. To disable
mlockall(), the disable-mlockall charm config option can be set to
True. If unset, disable-mlockall charm config will result in
disabling mlockall if running in a container.

The drop_config.append(OVS_DEFAULT) logic is no longer used as
it prevents a rewrite of the config template when charm config is
reset. For example, the new behavior results in
/etc/default/openvswitch-switch being written with comments only
when the corresponding config options are disabled (see template),
resulting in openvswitch-switch being restarted.

Due to the removal of drop_config.append(OVS_DEFAULT), pause/resume
actions need to explicitly remove openswitch-switch to maintain
prior behavior for non-DPDK deployments. In other words, pause/resume
will not restart openvswitch-switch.

Closes-Bug: #1906280
Related-Bug: #1908615
Change-Id: I2e3153e90c7a4a1b7dec7d6df427b33a449f414d
2021-01-07 21:27:28 +00:00
zhhuabj 6f7a915b9b config option to set of_inactivity_probe
This patch adds support for setting of-inactivity-probe in
/etc/neutron/plugins/ml2/openvswitch_agent.ini

[ovs]
of_inactivity_probe = 10

Change-Id: Idb3ab6b0e82200226e3063065192b4346d0c5206
Closes-Bug: 1852582
2020-09-16 10:10:57 +03:00
Edward Hope-Morley 5d83c2c702 Add keepalived-healthcheck-interval config option
Defaults to 30s (i.e. enabled) but also allows disabling
healthchecks by setting to 0.

Change-Id: I5bb7d362f0d957237e24f79f1f82583661bed470
Closes-Bug: #1890900
2020-08-20 13:21:41 +01:00
Aurelien Lourot 03c44248b4 Fix missing SR-IOV packages on Trusty
Also re-enable the Zaza tests for trusty-mitaka and get them green.

Change-Id: I3d7b0fa38f7e525a0e00c701a392deae84258f76
Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/259
Closes-Bug: #1876888
2020-05-06 11:28:40 +02:00
James Page ab5de86972 Enable support for hardware offload
Enable support for use of hardware offload via OVS; this requires
OpenStack Stein or later in conjunction with the latest HWE kernel
for Ubuntu 18.04 LTS.

Change-Id: I4ce47b1712e79bfbed9ac708cc521840b3709724
2020-03-19 11:44:29 +00:00
James Page 7ba64f9412 Refactor SR-IOV support
Refactor SR-IOV VF configuration support to use sriov-netplan-shim
to configure VF's on PF's so the charm simply writes out the required
interfaces.yaml file and restarts the sriov-netplan-shim service
which is fully idempotent.

Change-Id: I7a3ddf91d4b2ae6aa0806d97c45b59e8a951f67f
2020-03-18 10:59:21 +00:00
David Ames 4075af6a11 Make ovs_use_veth a config option
This was originally fixed in commit 7578326 but this caused problems. It
was subsequently reverted in commit 6d2e9ee.

This change uses a common DHCPAgentContext and takes care to check for a
pre-existing setting in the dhcp_agent.ini. Only allowing a config
change if there is no pre-existing setting.

Please review and merge charm-helpers PR:
https://github.com/juju/charm-helpers/pull/422

Partial-Bug: #1831935

func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/157
Change-Id: I4848a3246d3450540acb8d2f479dfa2e7767be60
2020-01-30 07:50:54 -08:00
Frode Nordahl 4b2935d5a6
Don't enable DVR services when deployed in container
Also set upper constraint for ``python-cinderclient`` in the
functional test requirements as it relies on the v1 client
which has been removed.  We will not fix this in Amulet, charm
pending migration to the Zaza framework.

Change-Id: If4d3b3cd79767b37fe6b74a1d6d399076c122bc8
Closes-Bug: #1843557
2019-11-27 15:20:20 +01:00
James Page 9b0de9bbff Add support for FWaaS v2 logging
Enable support for configuration of FWaaS v2 firewall group
logging.

Configuration options mirror those for neutron-openvswitch
for security group logging.

This feature is currently only enabled for FWaaS v2 at Stein
for the charms (but is supported back to Queens in Neutron).

Change-Id: Ic60ee47078089c59ccb09b8659422e7ad7081149
Partial-Bug: 1831972
2019-06-25 16:53:24 +01:00
Sahid Orentino Ferdjaoui 380adb7271 pci: use sriov-device-mappings when configure sriov devices
When 'sriov-numvfs' is configured in 'auto', only the devies set in
'sriov-device-mappings' are discovered and automatically configured.

Change-Id: I1be61a19639d366d787fb92815c3a8a5c302fbda
Closes-Bug: #1818975
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-05-23 09:58:02 +02:00
Edward Hope-Morley 9b094b8ef8 Fixup commit 00ca87f
Add net.netfilter.nf_conntrack_buckets as per [1].

[1] https://bugs.launchpad.net/charm-neutron-gateway/+bug/1780348/comments/8

Change-Id: I6c143230943668c31378349d2f4f92de537ced64
Related-Bug: #1780348
2019-03-18 09:22:39 +00:00
Pete Vander Giessen 00ca87fec3 Added gc_threshold overrides to sysctl.conf
When clouds have a large number of hosts, the default size of the ARP
cache is too small. The cache can overflow, which means that the
system has no way to reach some ip addresses.

Setting the threshold limits higher addresses the situation, in a
reasonably safe way (the maximum impact is 5MB or so of additional RAM
used). Docs on ARP at http://man7.org/linux/man-pages/man7/arp.7.html,
and more discussion of the issue in the bug.

Change-Id: I329ec51eff85a2a99a929c67ff0c68b3b36d7273
Closes-Bug: 1780348
2019-02-28 11:55:05 +01:00
Dmitrii Shcherbakov 1486c83a1f Allow dvr_snat l3 agent mode to be used with DVR
Currently it is a requirement to have a network node with an l3 agent
running in the dvr_snat mode even for DVR deployments that do not use
SNAT or have a very limited usage of SNAT.

It is not possible to disable snat completely:
https://bugs.launchpad.net/neutron/+bug/1761591

Neutron creates a network:router_centralized_snat port and if it is not
possible to find a dvr_snat agent to schedule it on there are various
side-effects which are not seen at first. For example, Designate stops
creating records for floating IPs and Neutron/Designate integration is,
therefore, not functional.

The Neutron DVR documentation says that dvr_snat should be used on
network nodes. However, there is nothing restricting a DVR deployment
from using dvr_snat l3 agents on every compute node and not having
dedicated network nodes.

This change modifies neutron-openvswitch to optionally enable dvr_snat
l3 agent mode (this includes supporting L3HA routers if enabled). As a
result, it is possible to have deployments without neutron-gateway thus
saving on the amount of required nodes. Care should be taken when a
large amount of L3HA routers is used and using DVR routers without L3HA
is a recommended.

Change-Id: Iad3a64967f91c81312911f6db856ce2271b0e068
Closes-Bug: #1808045
2018-12-12 00:37:29 +03:00
Vladimir Grevtsev 40701500b5 Enable support for security group logging
Add support to enabling logging of security groups for
OpenStack Queens or later; this feature is enabled via
the neutron-api charm, with local charm configuration
options to allow control of rate and burst limits and to
set a local log output directory if require (allowing log
data to be written to a separate partition for example).

The feature is only compatible with the openvswitch firewall
driver and will not be enabled if this configuration option
is not set.

Basic deployment tests changes is included here since
nova-cloud-controller unit and relation was missing before,
and it leads to CI constantly failing.

Corresponding charm-helpers change:
https://github.com/juju/charm-helpers/pull/228

Change-Id: Id6ed09f714981e87838186d51a4f5e693bedb1d3
Closes-Bug: #1787397
Depends-On: https://review.openstack.org/602355
2018-10-09 18:55:04 +03:00
Edward Hope-Morley 9e1018bcfb Add instance-mtu config opt
This brings this charm inline with the neutron-gateway charm
in terms of configurability when using a local dhcp agent.

Change-Id: Idc4f7735aaa9236d8a476fd3bae6aaf52b9dc043
Closes-Bug: 1777888
2018-07-27 08:42:27 +00:00
Nikolay Nikolaev 587de9197e ovs-dpdk: add dpdk-bond-config config option
This allows more fine grained control over the bond mode
and LACP settings. Directly mapped to what OVS-DPDK configuration
exposes.

Change-Id: I1cca1043058f1ec99f194c1bdb611ebd603d646d
2018-06-21 12:38:02 +03:00
Nikolay Nikolaev 8225b4dca9 Add dpdk-bond-mappings configuration option
The current charm does not support creating and managing bonded network
interfaces. They are managed externaly. This is not possible when DPDK
is enabled. In this case OVS exposes the DPDK bond PMD which enslaves
the corresponding attached bond interfaces.

The new dpdk-bond-mappings configuration option allows such configuration
where mac:bond is specified. When the data-port configuration is processed
dpdk-bond-mappings are consulted to identify if the port belongs to a bond.
If this is true - then the bond is created with the mac designated interface
and the bond is added to the bridge. Subsequently more interfaces can be
added to the same bond.

Change-Id: I0224caaa1c2431c793c4f64caa7fc9e95b972fd7
2018-06-21 12:38:01 +03:00
Nikolay Nikolaev 7d5126e1c3 ovs-dpdk: change dpdk-driver default to None
Some NICs do not work with vfi-pci or uio_pci_generic. E.g. mxl4/mlx5
which uses relies on the OFED or Kernel drivers (post 4.14).
In this cases we don't want to generate entries in /etc/dpdk/inerfaces.

Here we change the configuration processing behavior. The charm will omit
adding entries in the aforementioned file when the value is not set.

The default value is changed to empty (i.e. None)

Change-Id: I2fb9f0404adbbee0f298729467794e172bae2d98
2018-06-12 14:21:47 +03:00
Michael Skalka 07254a5c59 Enable IPFIX exporting for OVS bridges.
Adds a config option and calls to enable IPFIX exporting on all OVS
bridges created on a system by the OVS charm.

Closes-Bug: 1768016

Change-Id: Id2591ac5f39319d50ba235f6b9b5d493e7885d3a
2018-05-09 12:32:05 -04:00
James Page fe9633856b Remove deploy from source support
Drop support for deployment from Git repositories, as deprecated
in the 17.02 charm release.  This feature is unmaintained and has
no known users.

Change-Id: Ib954ddd1fb63d409af77949d8e76a6d6da8f2cde
2018-01-10 12:01:23 +00:00
Billy Olsen 460602489d Add dns-nameservers config option for upstream dns servers
Adds a dns-servers config option for specifying the forwarding
dns servers to be used by the dnsmasq services on the neutron
dhcp agent. This enables services using internal dns to also
specify the forwarding dns servers in order to resolve hosts
outside of the neutron network space.

Note: this option only takes effect when the
enable-local-dhcp-and-metadata flag is set to True.

Change-Id: I510d163dd9738477b15497b25266e73a50368539
Implements: blueprint internal-dns
Closes-Bug: #1713721
2017-08-31 09:24:01 -07:00
Jenkins 6421d19b98 Merge "Add deprecation notice for prevent-arp-spoofing" 2017-08-24 20:29:50 +00:00
Frode Nordahl 4ffbc2fe25 Fix handling of SR-IOV interface configuration
SR-IOV interfaces are currently only configured on charm
installation and not after seubsequent reboots.

The VFs need to be configured before the Neutron SR-IOV
agent is started. Charms should also really not be involved
in boot time system configuration. Due to these factors
this commit adds a init script and corrensponding systemd
unit file and upstart job to handle the boot-time configuration.

Keep configure_sriov function for runtime configuration. Add
warning about runtime configuration disrupting network service.

Add restart of Neutron SR-IOV agent after runtime configuration.

Cap value of sriov-numvfs at each interfaces sriov_totalvfs value.

Change-Id: I7bde7217bf027db09ded35a262c214ccb11d6d86
Closes-Bug: #1697572
2017-08-24 12:34:58 -07:00
Edward Hope-Morley 3c2553b055 Add deprecation notice for prevent-arp-spoofing
Config option will have no effect for >= Ocata.
Also adds log WARNING.

Change-Id: I06b78152a9e42e5411d6a426073641ce474573ff
Closes-Bug: 1691080
2017-08-24 13:57:33 +01:00
Edward Hope-Morley fbed3f3d7a Support configurable metadata_workers
Adds config option worker-multiplier to allow
configuring the number of workers used for the
metadata api when using local dhcp.

Change-Id: Ie3a7d6aab0d9902a6637637fbf75b2df3ec084b1
Closes-Bug: 1707618
2017-08-11 18:20:13 +01:00
Mario Splivalo b5e1153385 Cleanup config.yaml
Change-Id: Ie5269f1d3e8cd462c838c0afdf235769465a5416
2017-07-05 18:59:58 +01:00
Billy Olsen 9ce4995205 Add dnsmasq-flags to charm-neutron-openvswitch
Add a new option to provide the ability to specify flags in the
dnsmasq.conf file. This allows users to configure the dnsmasq
processes used by the neutron-dhcp-agent when local dhcp and
metadata are enabled for provider networks.

Change-Id: I2bab8a00322afb0f81986001c86f0ef4fc535651
Closes-Bug: #1684231
2017-05-02 15:54:24 -07:00
Jenkins 0fb6c60db4 Merge "Add support of a linuxbridge bridge in data-port config" 2017-05-01 00:57:28 +00:00
James Page f22e6e9d1e Add support for firewall driver configuration
Neutron has supported use of a native openvswitch firewall driver
for a few releases; OpenStack Mitaka on Ubuntu 16.04 has the
required kernel and openvswitch versions to support this feature.

Add a new firewall-driver configuration option to support use
of the openvswitch native firewall; the default remains as the
iptables_hybrid driver, and users can switch to the openvswitch
driver if they are deployed on Ubuntu Xenial or later.

Change-Id: I4c228c5cbbff7f9673c1028ee4b075edba1fdc13
Closes-Bug: 1681890
2017-04-27 11:32:02 +01:00
Matt Rae f832f1073d Add support of a linuxbridge bridge in data-port config
When configuring data-port parameter with "ovs-bridge:linuxbridge"
a veth pair will be created to connect these two bridges. Name of
these virtual interfaces will be "veth-ovsbridge_name" and
"veth-linuxbridge_name".

Problem: When deploying neutron-openvswitch charm on a node contain
only one interface, we are not able to connect an ovs Bridge to
the physical interface because it is assigned to juju Bridge.

Change-Id: I5be72b9cc5948f5f791d522d1b46fd27e7303613
Closes-Bug:#1635067
2017-03-17 10:22:00 -07:00
James Page 790819c237 Update SR-IOV support for >= Mitaka
SR-IOV network for OpenStack release later than Mitaka requires the
use of the neutron-sriov-agent to support management of SR-IOV PF
and VF interface state by Neutron - said interfaces are still
consumed directly by nova-compute/libvirt via PCI device allocation
scheduling for instances.

Add new configuration options to the neutron-openvswitch charm to
support enablement of the SR-IOV agent; this could have been done
automatically from data presented from neutron-api, but its possible
that cloud deployments may only have subsets of compute nodes that
are SR-IOV enabled in terms of hardware.

Enabling this option ('enable-sriov') will install and configure
the neutron-sriov-agent; configuration of SR-IOV PF's are made
using the 'sriov-numvfs', which by default automatically configures
all SR-IOV devices on every machine to the maximum number of VF's
supported by the device.  This option can be used to configure
devices at an individual level as well.

Finally, neutron needs to understand what underlying provider
network each SR-IOV device maps to - this is configured using the
sriov-device-mappings configuration option.

Change-Id: Ie185fd347ddc1b11e9ed13cefaf44fb7c8546ab0
2017-02-07 14:55:32 +01:00
Ryan Beisner 0ca5eb7122 Update amulet test definitions for Newton
- Remove Precise-Icehouse Amulet test definitions if they exist.

- Add Xenial-Newton Amulet test definitions.

- Add Yakkety-Newton Amulet test definitions.

- Use the percona-cluster charm in tests instead of the mysql charm.

Change-Id: Id9ca2fc92aebd310c03c9e0f11ef7354a641d2fa
2016-10-07 13:47:27 -05:00
Corey Bryant faaf51e7ba Add systemd init support for deploy from source
systemd is used instead of upstart by default since Ubuntu 15.10
(Wily).  This adds systemd init file support for nova services
that are deployed from source.

Change-Id: I7d031e86853a3fb8b91501dc6bbd7f5f1b67701d
2016-07-13 19:25:46 +00:00
Corey Bryant 9ad5cf9637 Add defaults for openstack-origin-git config option
openstack-origin-git currently only supports YAML that specifies
the git repositories to deploy from.

This adds support for default openstack-origin-git values. The
default values supported are: icehouse, kilo, liberty, mitaka,
and master.  For example: openstack-origin-git=master.

Change-Id: I032cb58283d54a9ccfcc268a7fd70b460a03aa58
2016-06-20 09:42:16 -04:00
James Page 85cf60219b Support new style (and multiple) external networks
Note that this change only impacts use of this charm when
Distributed Virtual Routing is enabled in a deployment.

Switch the generated configuration to use "new" style external
networks when ext-port is not set.  In this case we configure:

  external_network_bridge = (intentionally blank)
  gateway_external_network_id = (blank)

The current template configures external networks by using the default
external_network_bridge=br-ex (implied when not set).  This activates
legacy code which assumes that a single external network exists on
that bridge and the L3 Agent directly plugs itself in.
provider:network_type, provider:physical_network and
provider:segmentation_id are ignored.  You cannot create multiple
networks and you cannot use segmented networks (e.g. VLAN)

By setting external_network_bridge = (intentionally blank) the L2
Agent handles the configuration instead, this allows us to create
multiple networks and also to use more complex network configurations
such as VLAN.  It is also possible to use the same physical connection
with different segmentation IDs for both internal and external
networks, as well as multiple external networks.

Legacy/existing configurations where ext-port is set generate the same
configuration as previous and should continue to work as before.
Migration from legacy to new style configuration is not supported.

Change-Id: I3d06581850ccbe5ea77741c4a546e663b2957a91
Closes-Bug: #1536768
2016-06-15 20:45:20 +01:00
James Page acd617f4ca Add support for DPDK userspace networking
Add full support for DPDK; this includes a number of configuration
options to allow the number of cores and memory allocated per
NUMA node to be changed.  By default, the first core and 1024MB of
RAM of each NUMA node will be configured for DPDK use.

When DPDK is enabled, OVS bridges are configured as datapath type
'netdev' rather than type 'system' to allow use of userspace
DPDK packet processing; Security groups are also disabled, as
iptables based rules cannot be applied against userspace sockets.

DPDK device binding is undertaken using /etc/dpdk/interfaces and
the dpdk init script provided as part of the DPDK package; device
resolution is determined using the data-port configuration option
using the <bridge:<mac address> format - MAC addresses are used
to resolve underlying PCI device names for binding with DPDK.

It's assumed that hugepage memory configuration is either done as
part of system boot as kernel command line options (set via MAAS)
or using the hugepages configuration option on the nova-compute
charm.

Change-Id: Ieb2ac522b07e495f1855e304d31eef59c316c0e4
2016-04-07 12:42:16 +01:00
James Page 68e4110548 Fixup typo 2016-02-10 15:42:35 +00:00
James Page e27ef245fb Make this a configuration knob 2016-02-10 10:30:30 +00:00
Edward Hope-Morley 926241e3c6 update config.yaml 2015-12-14 16:22:09 +00:00
James Page 7d0fdfc24d [gnuoy,r=james-page] Add support for local DHCP and Metadata agents
This change allows nova-compute nodes to also run Neutron DHCP and Metadata
agents, allowing deploying without the neutron-gateway charm in VLAN and
flat networking configurations.

Only useful if l3 routing, vpnaas, fwaas and lbaas services are not required.
2015-09-15 08:47:30 +01:00
Liam Young 8f41b9a722 Fix new config option description following mp feedback 2015-09-12 10:02:12 +01:00
Liam Young 8a01f1ee27 Add discription to enable-local-dhcp-and-metadata config option 2015-09-09 11:07:43 +01:00