96 Commits

Author SHA1 Message Date
Takashi Kajinami
2ffc7aedf4 Re-organize service definitions
None of supported operating systems have separate ovsdb-service, so
the logic to enable that separate service is unused and useless.

Also current definition of status and hasstatus are just redundant and
can be removed.

Change-Id: I361e55f144b4852f76c00b8dab26c4cec37b29c1
2023-06-19 13:32:22 +09:00
Takashi Kajinami
645e80a543 Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: I9549ee743a4b20d76a1a63e482f84a111e0dd69a
2023-03-01 16:23:57 +09:00
Takashi Kajinami
280106d809 Add helpers to generate certificates
... so that users can more easily generate and manage certificates
used by ovs and ovn.

Change-Id: Ie7f0c3b6d7e5b760e14adef973497810b06669cd
2023-02-26 23:34:26 +09:00
Zuul
2b10d0e53c Merge "Replace mocha by rspec-mocks" 2023-01-31 15:31:00 +00:00
Takashi Kajinami
200c8f10e7 Replace mocha by rspec-mocks
puppetlabs_spec_helper recommends rspec-mocks instead of mocha[1] and
it uses rspec-mocks by default instead of mocha since v 5.0.0[2]

This is the prep work to adapt to that migration.

[1] https://github.com/puppetlabs/puppetlabs_spec_helper/#mock_with
[2] 493f0cbc1c

Closes-Bug: #2004135
Change-Id: I843c72def83a79783d68c9bcf1036d9beddb0e5d
2023-01-30 13:27:24 +09:00
Takashi Kajinami
e0d86a8f57 Fix missing restart trigger for dpdk options
The ovs daemon should be restarted when some dpdk options are updated.
This change fixes the missing trigger for restart.

Closes-Bug: #2003158
Change-Id: Id7371e06d8faa09820cd16e1f34c5ed5824b7a11
2023-01-18 15:16:15 +09:00
Takashi Kajinami
10202ad22f vs_config: Fix broken idempotency with nil/empty value
If the value is nil or empty then the option should NOT exist. This
change fixes the logic to determine whether the option already exists
which is causing broken idempotency.

Closes-Bug: #1987419
Change-Id: I56f85ca35f8e9ee4e5e8d07c714b65f655b1e9ae
2022-08-24 08:56:32 +09:00
Zuul
0dabc235ad Merge "Add support for other_config:vhost-postcopy-support" 2022-08-01 16:07:14 +00:00
Zuul
0cb8438f86 Merge "Allow configuring PMD Auto Load Balancing" 2022-08-01 16:07:11 +00:00
Takashi Kajinami
28031fa700 Add support for other_config:vhost-postcopy-support
ovs v2.12.0 introduced the option to enable postcopy support[1]. This
adds the capability to manage the option.

[1] https://github.com/openvswitch/ovs/commit/30e834dcb5
Change-Id: Ie295a8207fdac4afb4eff37fe4eb49b3c942ea77
2022-07-29 08:32:37 +09:00
Takashi Kajinami
9d5c61630a Allow configuring PMD Auto Load Balancing
This change introduces a few parameters to enable and configure PMD
Auto Load Balancing feature in ovs-dpdk.

Change-Id: Idec390b4b01a2f79cbd885fd83c8bf902c9816e7
2022-07-29 08:17:50 +09:00
Takashi Kajinami
867b10bde9 vs_bridge: Support customizing mac table size
This change introduces the native property to the vs_bridge resource
type to customize mac table size, which is currently implemented in
puppet-ovn by the exec resources.

Closes-Bug: #1958873
Change-Id: I7c2f78aa5f281aa4b24c1fb12dbb38b8d97f64f4
2022-07-24 07:53:33 +09:00
Takashi Kajinami
9477398cab CentOS/RHEL: Fix missing external_ids
When vs_port is defined with a physical interface name and a bridge
the ovs_redhat provider manages the bridge by the network service.
However previously the cfg file generated doesn't include the required
option to set external ids and the property was unintentionally wiped
out.

This change ensures the external ids are persisted, to avoid broken
idempotency.

Closes-Bug: #1959313
Change-Id: I9d2f540e165cad8dd5532a113431cde395138c86
2022-07-24 07:48:45 +09:00
Rajesh Tailor
f68f987557 Fix typos in parameter description and test
Change-Id: Ifbf562a2e7876b92d2b54ec5ee99b43e526c6d7a
2022-06-27 17:19:11 +05:30
Takashi Kajinami
bde509f8ad dpdk: TSO support
This change allows users to enable TSO support[1] in ovs-dpdk datapath.

[1] https://docs.openvswitch.org/en/latest/topics/userspace-tso/

Change-Id: Ib88dbcfc78e703a4249b942938c0f985f826b5b4
2022-06-06 17:06:09 +09:00
Takashi Kajinami
1545c55ca5 Ensure other_config:emc-insert-inv-prob is unset
... instead of leaving the configuration unmanaged.

Change-Id: Ifa7d6efd52c812cc9bfb073fd03dc01a6481cd38
2022-03-24 14:31:50 +09:00
Zuul
e260e264d0 Merge "Assert the exec resource to restart ovs service" 2022-03-11 16:14:51 +00:00
Takashi Kajinami
3ff72b5736 Deprecate usage of Dynamic Kernel Module Support
... because it was required for very old versions of Ubuntu and Debian
and no longer required in recent versions.

Change-Id: Ib5d3ab7cd79470e446a13475d5886c76048bfe5b
2022-02-27 22:43:47 +09:00
Takashi Kajinami
8fcd7596e4 vs_bridge: Fix missing external_ids after initial creation
It turned out the external_ids property is not reflected on the ovs
bridge after initial creation. This change fixes it and ensures that
the property is applied to the bridge.

Closes-Bug: #1958905
Change-Id: I7c1c2384b8d70b568caffe8d3cc82002cf2502f6
2022-01-25 08:51:54 +09:00
Takashi Kajinami
0785d6cbb3 Assert the exec resource to restart ovs service
This change implements unit tests for the exec resource which was added
by [1].

[1] 1fe71cf5e359c8f83f11b2673620be822423bf47

Change-Id: I1dd62d917783f66b11e953ab1c8be6a259553782
2022-01-13 13:56:55 +09:00
Zuul
4924354d51 Merge "Add support for other_config:dpdk-socket-limit" 2022-01-07 23:42:31 +00:00
Zuul
3ebae506d8 Merge "Accept array for dpdk-socket-mem" 2022-01-07 23:42:29 +00:00
Takashi Kajinami
7b91c5ebd7 Add support for other_config:dpdk-socket-limit
This change adds support for other_config:dpdk-socket-limit, which
is available since openvswitch 2.12.0[1].

[1] https://github.com/openvswitch/ovs/commit/8411b6ccec

Change-Id: I6a8c65685442477d368820cbb7fcc3a21cddbedd
2022-01-06 00:00:49 +09:00
Takashi Kajinami
5a009f686f Accept array for dpdk-socket-mem
dpdk-socket-mem accepts a comma-separated list of memory amounts per
socket. This change allows usage of native Array to define per-socket
amounts.

Change-Id: I8faeb44b708cf371e98b56a375a6dcc07d82df3e
2022-01-06 00:00:35 +09:00
Takashi Kajinami
becab37c5e vs_config: Accept integer and boolean for value
Some parameters like vlan_limit or hw-offload expect integer values
and boolean values. However current vs_config accepts only strings
and we need to convert integer or boolena to string in manifests
explicitly.

This change makes vs_config accept integers and booleans so that
we can use more "native" types to define values.

Change-Id: I6f1dfd33cc85d84a53e346f45359ce382e5fda26
2022-01-05 22:58:44 +09:00
Zuul
1d5398ae56 Merge "Ensure hardware offload is disabled" 2021-12-30 22:16:41 +00:00
Takashi Kajinami
c801c6e97b Ensure hardware offload is disabled
This change ensures hardware offload is disabled. Previously when
hw_offload is false, puppet-vswitch didn't manage the configuration,
thus offload was kept enabled if it was enabled in advance.

Change-Id: I654c0f7f5a5efb845484cb610ff07effd4f33aa9
2021-12-28 17:29:52 +09:00
Takashi Kajinami
fb9a08d972 Use undef instead of $::os_service_default
$::os_service_default is not used in puppet-vswitch. This change
deprecates usage of it to prepare replacing it by undef, which is
commonly used instead.

Change-Id: Ibfe94720e28f5ce46977b2db2afa82a6888c28cb
2021-12-28 13:27:14 +09:00
Takashi Kajinami
1fe71cf5e3 Do not use service resource to restart openvswitch service
Closes-Bug: #1946985
Change-Id: Idac29b0ea6794a52ae9146da8105ebbaf65ee9a3
2021-10-18 08:36:52 +09:00
Takashi Kajinami
c6d27c16f9 Set fixture paths for unit tests
This change defines manifest_dir and module_path expicitly in unit
tests so that modules installed under fixtures directory is properly
loaded.

Closes-Bug: #1930403
Change-Id: I549c03eebd718994f39831d24387a928bc109c08
2021-06-02 14:35:48 +09:00
Zuul
b26f4153ae Merge "Do not restart ovs when updating other_config:emc-insert-inv-prob" 2021-04-27 10:42:02 +00:00
Zuul
c782ad9087 Merge "Remove old workaround to check service status in Ubuntu" 2021-04-27 07:15:25 +00:00
Takashi Kajinami
b91243937e Drop support for FreeBSD and Solaris
These two distros are never tested in gate, and there are almost no
activities to keep these support updated for a while.

Change-Id: I6110cd9a62f33e2d046fc2c835aaec73c4532889
2021-04-25 21:51:44 +09:00
Takashi Kajinami
1f63cee543 Remove old workaround to check service status in Ubuntu
Change-Id: Ie7e05985ac06c5536490d48de109d8de7b7c5722
2021-04-25 21:47:44 +09:00
Takashi Kajinami
95230113b2 Do not restart ovs when updating other_config:emc-insert-inv-prob
There are no requirement of service restart after updating
the cmd-insert-inv-prov parameter in ovs documentation[1], and
it seems that the parameter can be applied with keeping the service
running.
 [1] https://docs.openvswitch.org/en/latest/topics/dpdk/bridge/#emc-insertion-probability

Let's remove notify so that changing the value doesn't trigger
service restart.

Change-Id: I2e9f7d3b27547d33914f07005045b55d8ba82514
2021-03-12 17:57:54 +09:00
Takashi Kajinami
0d026451bd Add support for the hw-offload option in dpdk
This change implement support for the hw-offload option in dpdk. This
parameter is already supported in non-dpdk deployment but is also valid
for dpdk deployment.

Change-Id: Ibd285bf73fa10e6e9cd338625662063dc9a1d753
2021-03-11 10:53:47 +09:00
Takashi Kajinami
4887f4ccd6 Add support for vlan_limit option
This change introduces support for the vlan_limit option.
This parameter is currently set to 1 by default, but we should set
it to 2 to enable vlan_transparent, which requires nested vlans.

Related-Bug: #1918418
Change-Id: Id9aaab2a1e3ad2d2d43cd5cddf389d20abaf4461
2021-03-10 23:54:12 +09:00
Tobias Urdin
e1a7353395 Add Puppet Litmus
Depends-On: https://review.opendev.org/#/c/751890/
Change-Id: Ia13ddf28332053f08c8e7ecab6f41d8643260bf2
2020-09-14 23:42:42 +02:00
Takashi Kajinami
f7c13e404a Add CentOS8 to nodesets
Change-Id: Ia482693536994c0607861ff190aa5d16508473ad
2020-05-10 21:51:50 +09:00
Tobias Urdin
b90b698aa8 Convert all class usage to relative names
Change-Id: Iaad7694d527659713906ea9df89fd03e9fff790d
2019-12-08 23:25:14 +01:00
Yogananth Subramanian
97eb675dcc Provide option to disable EMC in puppet-vswitch
This patch disables EMC by setting emc-insert-inv-prob to 0.

Change-Id: I02dc94dbf4d9cee365b230a82dd5d5616d21406b
Closes-Bug: #1821821
2019-03-29 07:06:55 +05:30
Alex Schultz
d9a54416f9 Fix test facts for alternative OSs
We're referencing some additional $::os facts that we need to properly
set for openstacklib to work with.

Change-Id: I00e5caf3cf5409ec4a12695750960900e721e9f5
2019-03-28 09:22:36 -06:00
Tobias Urdin
a545a444d7 modulesync: sync and add nodepool-bionic for beaker
Change-Id: I5a2b93ab13cc4dbbd6dec01e509f436eda56035b
2018-07-23 12:27:26 +00:00
Saravanan KR
3d91514806 Remvoved OvS2.5 specific changes as it is no longer required
In pike release, we have migrated manifests from ovs2.5 to ovs2.6 and
retained the backward compatibility. Removing the ovs2.5 changes
in this cycle as it is no longer used.

Change-Id: I286b2f4d090dda34ec95f24f77baefcb7687ff85
2018-02-13 11:24:25 +05:30
Tim Rozet
6e3d77e9e4 Adds SSL custom type/provider
New type for configuring SSL in OVS.  Bootstrap mode allows the switch
to accept an initial CA certificate offered by the controller.
Otherwise specify the location of the CA certificate to use in comparing
the controller's cert.  OVS only supports a single instance of SSL
configuration so the provider limits the resource declaration to a
single instance named 'system'.

Partially-Implements: blueprint opendaylight-ssl-support

Change-Id: Ic026ee0bc4f385e0f8cd7076b3044feeb935ae45
Signed-off-by: Tim Rozet <trozet@redhat.com>
2018-01-09 18:18:22 -05:00
Moshe Levi
0da1882689 add support for ovs hw-offload
Ovs 2.8 has support for hardware offload [1]
This patch provides an option to configure it.

[1] https://patchwork.ozlabs.org/patch/767853/

Change-Id: I3c0d24a31f0a1cac2cb8c5da8125051d4348eed6
2017-09-27 22:18:12 +03:00
Karthik S
c751135c68 Enable dpdk after setting all other dpdk parameters
In OvS 2.7, setting dpdk-init=true enables DPDK
and reconfigures the vswitch with the dpdk parameters
earlier configured in ovsdb. In order to avoid
restarting openvswitch after enabling DPDK and to
use this feature, all the dpdk parameters shall be
configured in ovsdb before enabling DPDK.

Change-Id: I3a33f8287bbabe2bcaf7f4556dd78d5b9d6914b6
Signed-off-by: Karthik S <ksundara@redhat.com>
2017-07-17 03:46:35 -04:00
Karthik S
677415b7d3 Added test case for the function range_to_mask()
Change-Id: Id189f19616a51485b104ecbef7cb5fce6356895d
Signed-off-by: Karthik S <ksundara@redhat.com>
2017-06-14 07:11:31 -04:00
Karthik S
74bac67ae3 Added parameter validation for socket_mem parameter
Change-Id: I886b08c4c7bf419313bece5f9e8b4c93a7e61aa1
Closes-Bug: #1689936
Signed-off-by: Karthik S <ksundara@redhat.com>
2017-05-10 20:33:27 -04:00
karthik s
b58bd4844a OVS2.6 changes for DPDK
Configuration of DPDK parameters pmd-cpu-mask, dpdk-lcore-mask,
dpdk-socket-mem are addressed as per OVS2.6, while maintaining
backward compatibility with OVS 2.5

Implements: blueprint ovs-2-6-dpdk

Change-Id: I3227189691df85f265cf84bd4115d8d4c9f979f3
Signed-off-by: karthik s <ksundara@redhat.com>
2017-04-04 08:59:50 -04:00