Commit Graph

44 Commits

Author SHA1 Message Date
Alfredo Moralejo b778eaa960 Use release CentOS SIGS repo to install openvswitch in C9S
After moving to C9S we started using testing repository for ovs and we
never switched to release one after NFV SIG started releasing packages
to the official mirrors.

Change-Id: I0f199c9fafe9d5ac3a47b9e55a2d33c4d6735604
2023-05-22 10:06:03 +02:00
Ian Wienand b2ae863f50
Add names to include tasks
Latest ansible-lint is finding this.  It seems reasonable enough to
ensure the task is named; it's always nice to have context about what
is happening as you read the file.

Change-Id: Ia7e490aaba99da9694a6f3fdb1bca9838221b30a
2022-11-07 10:37:53 +11:00
Alfredo Moralejo 78f1dfaf8a Use RDO wallaby repo to install openvswitch in CS9
We should use the oldest release where we run centos stream 9 jobs which
is wallaby. We set up xena in the past as we backported cs9 jobs to xena
first but now we should switch to wallaby or we may hit issues in
wallaby jobs when the ovs version in xena is higher that in wallaby (as
now).

Change-Id: I18dab9701e96b25396b45df221f54fe94c1ab36b
2022-08-04 16:36:18 +02:00
Ian Wienand 6d23d20f2f linters: add names to blocks
This is preparation for a later version of ansbile-lint, which finds
missing names on blocks.  This seems a reasonable rule, and the
Ansible manual says [1]

  Names for blocks have been available since Ansible 2.3. We recommend
  using names in all tasks, within blocks or elsewhere, for better
  visibility into the tasks being executed when you run the playbook.

This simply adds a name tag for blocks that are missing it.  This
should have no operational change, but allows us to update the linter
in a follow-on change.

[1] https://docs.ansible.com/ansible/latest/user_guide/playbooks_blocks.html

Change-Id: I92ed4616775650aced352bc9088a07e919f1a25f
2022-07-27 17:13:39 +10:00
James E. Blair a1e6229171 Remove "include:" usage from multi-node-bridge
This is deprecated, and include_tasks is sufficient and present
in all supported versions.

Change-Id: If88d9d6ce9fb40a9a8e42e7a32d473ffd51b780a
2022-05-23 14:44:12 -07:00
Chandan Kumar (raukadah) 8399dd1842 Donot Setup RDO gpg keys and repo for RHEL and Fedora
Currently in multi-node-bridge role, For RHEL and CentOS
distro, RDO repos are setted up and from where rdo-openvswitch
get pulled in RHEL deployment and causes unwanted failures.

Like a particular version of rdo-openvswitch is not yet available
in CentOS and it fails the job with nothing provides message.

Enabling RDO repos specifically for CentOS and other distros
except RHEL and Fedora will fix the
issue.

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: Id68f5904c4ec3d667a16e9f4f195d53b02d29cec
2022-04-18 21:51:15 +05:30
yatinkarel 8989684719 [multi-node-bridge] Allow to skip openvswitch installation
In neutron-multinode jobs where we use ovs/ovn from source,
we want to use multi-node-bridge role only for bridge
configuration but not for ovs installation. In the job
we install ovn and openvswitch before calling this role to
configure the bridges.

Adding a role var 'install_ovs' to allow skipping ovs
installation and service start, it's default to true so
no change in current behavior of the role.

It's an alternative approach to [1].

[1] https://review.opendev.org/c/zuul/zuul-jobs/+/762650

Related-Bug: #1904117
Change-Id: I64942679520681bdf7f953c0a3c7fc0d13e77856
2022-03-09 18:23:41 +05:30
Alfredo Moralejo 64fd772a32 Change RDO train repository for Centos 8 stream
After removing Centos 8 repositories [1], the repository has been
set to buildlogs server, which provides testing packages.
This commit is switching back repository to mirror.centos.org once we
have openvswitch in centos network and AFS mirrors.

[1] https://www.centos.org/centos-linux-eol/

Change-Id: I6e0dd26312c593a5c7fe5525a733be8e26faec9d
2022-02-01 11:39:09 +01:00
Alfredo Moralejo 62cc9b24e1 Install OVS from RDO Train Testing repository for CS8
CentOS Linux 8 repos have been removed from centos mirrors. We were
using that repo to install OVS in multi-node from train repo.

This patch is moving multi-node rolo to install ovs from the RDO testing
repo for train until we have it pushed to the official mirrors for CS8.

Change-Id: Id57e8e90903a0d468c6d3094fbbaf4840a368e2a
2022-01-31 11:11:58 +01:00
Sandeep Yadav a795073493 multi-node-bridge: repos to install ovs in C9
With this patch, Adding repos to install openvswitch
in Centos9 stream.

For Centos9 stream nodes we need to enable 2 repos:-
* nfv repo - Ussuri+ openvswitch is shipped as part of NFV SIG
* rdo xena repo - rdo-openvswitch(which provides openvswitch wrapper)
is available in OpenStack repo

Closes-Bug: #1947665
Change-Id: If5a32b30637296a070f2e75ba8feb6aa45d8ecac
2021-10-20 11:17:41 +05:30
Brian Haley a6f45c6942 Decrease MTU to account for IPv6 header
(MTU - 50) only supports VxLAN over IPv4, decrease it
to support IPv6 as well, which is 20 bytes larger.

Change-Id: Ifa2633169afe2dd73c78ca7bbfa1a0102caffc95
2020-11-06 17:31:06 -05:00
Sorin Sbarnea 086d1a9284 More E208 fixes
Change-Id: Iddda539a24e03ae33ef5e37630f98a7268f18dbe
2020-11-03 10:04:27 +00:00
Sagi Shnaidman 7975e874e8 Install openswitch and firewall if need a bridge only
In case of nodeset which doesn't have peers and switch there is
no need to install openswitch and firewall rules, because nothing
will be installed. Let's skip it if no need.
Change-Id: I98cf5ec390ee22e538baa076c9ab87eea6a44c9e
2020-10-13 14:25:37 +03:00
Alfredo Moralejo 1dbba7f70e Use Train repo to install openvswitch from multi-node-bridge in CentOS 8
Currently it's using master repo for CentOS 8. RDO s updating the version of
OVS in master to 2.13 while previous releases use version 2.12 so it's a
problem to install 2.13 for jobs gating reviews for Train or Ussuri.

This review is moving to use Train repository to install openvswitch in
all CentOS 8 jobs as it's the older version supported on CentOS 8. Note
that CI jobs running with this multi-node setup configure proper repos for
the tested release (ussuri, victoria or master) at a later stage and
update the version of OpenvSwitch to the one included on each specific
release repo.

Closes-Bug: #1896469

Change-Id: Ie30997f360b285131cb5051d582da2a15cca7205
2020-09-22 11:12:30 +02:00
Sorin Sbarnea 536e1f7f8c Make gentoo multinode job nv
Gentoo multinode job is consistently failing. To disable only this
job with current test framework, we need to adapt the test framework, so
that disabling of specific jobs is possible.

Also includes minor documentation fix which triggers affected jobs.

Co-Authored-By: Andreas Jaeger <aj@suse.com>
Change-Id: Ida9d1714f1f6c3f4fbee469ef940147f969d9466
2020-05-26 09:45:20 +02:00
Albin Vass 9062289151 Check for loop_control in with_ type loops
Change-Id: I191265df7709a6262b44a428d78fe28ffaeb4b75
2020-05-01 13:45:34 +02:00
Alfredo Moralejo c4c6958622 Use centos8 deps repo for RHEL8 nodes
CentOS8 deps should be compatible with RHEL and provide latest versions
of deps compared to the old rhel8 one. Let's switch to use it to install
openvswitch too.

Change-Id: I04090a179706c52e3db4e9118b74f7c7d5ad9776
2020-03-18 10:29:04 +01:00
Alfredo Moralejo 75d896ab97 Use CentOS8 dependencies repo to install openvswitch
Currently, centos8 jobs are using old RHEL repo. A repo with CentOS8
packages has been created by RDO, so let's switch to it.

Change-Id: I0df0950de5a42bb7a425609c3d5d065550d956f4
2020-02-24 18:08:14 +00:00
Matthew Thode a5ace834b1
set jobs for installing openvswitch
On Gentoo this allows multiple packages to compile/install at once.

Change-Id: I23fd629a351b4c6b2acc325611ed47cc04bca404
Signed-off-by: Matthew Thode <mthode@mthode.org>
2020-02-19 13:33:48 -06:00
Clark Boylan a554a401ea Use present for package state instead of installed
Ansible 2.9 does not accept the "installed" state so we need to update
occurences of that to "present".

Change-Id: I13c95794efc63697c2418334ded7c6912bd7b59f
2019-12-17 08:24:05 -08:00
Ian Wienand cfdf251140 Use RDO trunk repos work for openvswitch on centos8
This is a bit of a hack, but allows installation of openvswitch for
testing the multinode roles.  Official CentOS 8 RDO builds are still a
work in progress, but this will let us get a head-start on any
multi-node testing.

Change-Id: I2eb1a16e9995a19d61e309aa59b232577184b527
2019-11-25 08:27:50 +01:00
Clark Boylan 121baa0d77 Revert "Use import_role on persistent-firewall"
This reverts commit 46b7b6e1c9.

This didn't end up changing the incidence of the iptables-save command
task failures.

Change-Id: I02e725d7330bc9b438a9864ea49510cca7fee524
2019-10-01 09:11:02 -07:00
Clark Boylan 46b7b6e1c9 Use import_role on persistent-firewall
Previously to persist the filewall we were including the
persistent-firewall role. This seems to occasionally break because the
second invocation of the role (on multinode jobs after setting up the
multinode bridge) fails with an RC of -13 when listing ipv4 iptables
roles. Then when we try to write them to disk the variable is empty.

One thought is that dynamically loading the role multiple times may be
confusing ansible. Use import_role to statically load the role instead
and see if this helps.

Change-Id: I2458f8eb4c2e4638336fa14e436e13b5a2263cce
2019-09-30 10:39:02 -07:00
Bogdan Dobrelya db6677a867 Fix evaluating nodepool_ip and switch_ip facts
In I32fb17bae98f13f735da4d5b9a6a01e948f21678, the evaluated facts
should also fallback to public_ipv4, when private_ipv4 is "empty-like",
e.g. contains no valid IP but something like '\n'.

It also restores the lost switch_private_ip fact just in case.

Change-Id: I139272746129213994f298a4a9178b4441d439af
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
2019-09-10 17:54:17 +02:00
Ronelle Landy e1ebeefecb Only use RHEL8 deps repo on Red Hat systems newer than 7
cecf9e902c
broke Openstack jobs running on Red Hat 7.

This review includes the ansible_distribution_major_version
when deciding which repos to include for openvswitch.

Change-Id: I6ec32e2913843adb0778a63133296bb26a0b5e6e
2019-08-30 15:11:01 -04:00
Zuul 634fa42920 Merge "Don't install centos repos on RHEL" 2019-08-09 08:31:22 +00:00
Jeremy Stanley 2711d10186 Be consistent about spaces before and after vars
With the arrival of ansible-lint 4, Jinja2 variable expansions must
include spaces before and after the variable name inside the
brackets.

Adjust the new violations accordingly and remove the rule
206 exclusion.

Change-Id: Ib3ff7b0233a5d5cf99772f9c2adc81861cf34ffa
2019-08-07 20:17:41 +01:00
Sagi Shnaidman cecf9e902c Don't install centos repos on RHEL
For running job on RHEL use openvswitch from RHEL8 deps repo,
because centos queens openvswitch causes conflicts with RHEL8
version.

Change-Id: Ia09227cb28ec4a4f9bdbb664b9c7caf714043e31
2019-08-07 10:36:44 +00:00
Andreas Jaeger 311a3a84ed Fix Gentoo ovs install
openvswitch on gentoo needs another packaging hint, add it.

For failure, see https://review.opendev.org/668249

Co-Authored-By: Matthew Thode <mthode@mthode.org>
Change-Id: I0a43dbf2fa63fa93bd7bf73db210ba4685b28127
2019-06-30 10:38:21 +02:00
Ronelle Landy 9853d3608f Default private_ipv4 to use public_ipv4 address when null
The static zuul driver returns only a public_ipv4 address for
nodes in use. The multinode bridge role accesses the node
private_ipv4 address. As such, when the private address is
empty/null the role fails.

This review defaults that private address so that the role
uses the public address when the private address is null.

Change-Id: I32fb17bae98f13f735da4d5b9a6a01e948f21678
2019-01-23 10:30:20 +01:00
David Moreau Simard 68375810ee
Vendor the RDO repository configuration for installing OVS
Installing OVS on CentOS requires one RDO repository and the
centos-release-openstack packages sets up two additional repos which
aren't required.

In addition, we removed the centos-release-openstack package but this
did not remove the two extra repositories, causing them to "leak" into
the jobs.

This sets up the one repository we need and ensures it is removed after
OVS is installed.

Change-Id: Ida2299a4356282d23b79fac6753b6171211a7651
2018-12-12 19:18:06 -05:00
Zuul b61bca7f1e Merge "use find instead of ls to list interfaces" 2018-09-26 00:26:03 +00:00
Matthew Thode cfd13c561c
use find instead of ls to list interfaces
find is used instead of ls as we can select the 'link' type with find
only the link type is needed because files do not have interface
properties and directories are not used for this area of /sys
As an example, the bonding_masters exists in /sys/class/net/ as a file
without any 'subdirectory' of information to it.

Change-Id: Id31fcfb858c6abff4d44444e019f0d48e4f3c671
2018-09-24 01:57:03 -05:00
Matthew Thode 7311980404
create the pacage.use file...
Change-Id: I7e2483f38270f7d51214a89037539325fd8ab0b3
2018-09-23 21:20:29 -05:00
Matthew Thode ea5c35e8c4
lay down gentoo use file for openvswitch
Change-Id: I9d5637b0a00e3b302f98c18c113790c5a8801699
2018-09-23 15:22:23 -05:00
Matthew Thode 3566a6e9f1
add Gentoo vars for ovs
Change-Id: I732612b4d0cb08e851a00c7f7f85df2c9b67fcd2
2018-09-21 17:35:54 -05:00
Paul Belanger e24fd6b7c0
Switch to centos-release-openstack-queens for ovs
Drop the dependency on RDO infra in favor of latest OVS releases in
centos-7. This means we'll be bumping to 2.9.0.

This still isn't the best, as we are pinning to a specific release of
openstack. However, until there is the OVS SIG in centos, this is the
best we can do.

Change-Id: Ic8a7ee26ebe0ef4f8c2dcecf9bcfce03b55422e5
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-07-10 13:02:23 -04:00
Clark Boylan 258a0d6ec7 Dynamically determine overlay network mtu
Not all clouds will provide us with MTUs of 1500. Instead of assuming a
1500 - 50 byte MTU to accomodate for vxlan overhead we list all
interface MTUs, filter by those that appear to be "real" interfaces (to
avoid those we ourselves may have created), take the smallest one and
subtract it by 50 to accomodate for vxlan overhead. You can still set an
explicitl bridge_mtu value if necessary.

Change-Id: If899a1bee3b4b69df8c2905a219b41e119d8f652
2018-06-28 13:47:03 -07:00
Mohammed Naser fbb58ddfde Add PATH to `ip` command execution
It seems that there has been a recent change where the PATH used
has changed somehow.  This adds it and make sure that it covers
all 3 major distros location where `ip` is stored.

Change-Id: Ic3c255bd24d1202fec436d4fcc484ce420110518
2018-06-18 17:37:10 -04:00
David Moreau-Simard 0bb84bc58e
Persist iptables rules
We configured iptables rules but did not persist them.
This meant that rules would be flushed when restarting iptables or
the instance.

Change-Id: I9d90f55323a33d6a0f0dda1f7ab25d10984fa6cb
2017-10-31 17:39:32 -04:00
David Moreau-Simard efd90dd2f9
Authorize the multi-node-bridge network in iptables if there's one
This allows packets to flow freely between things that bind IPs on the
network bridge.

Change-Id: Iaacdca31b27b7033ec08499bcea7061b9d3ec279
2017-10-31 14:25:56 -04:00
David Moreau-Simard 337835ad20
Don't set up RDO repositories on Fedora
The RDO community doesn't meaningfully test their packages on
Fedora and openvswitch is also available in Fedora base
repositories at a recent enough version.

Change-Id: I30713e1ecd70d03d8a520e31bdccdfbe08482699
2017-10-15 12:54:44 -04:00
David Moreau-Simard e375ddc738
Append /sbin and /usr/sbin to $PATH for 'ip' commands
While the 'iproute' package is installed on our CentOS images, it
was found that '/sbin/ip' was not in PATH and thus resulting in a
command not found error.
This is because 'become: yes' may not include '/sbin' and '/usr/sbin'
paths [1].

This can also occur on other distributions so let's include this all
the time.

[1]: http://git.openstack.org/cgit/openstack/diskimage-builder/tree/diskimage_builder/lib/common-defaults?id=22e03f98209be206a1e9e60f0b9cd9381317096e#n46

Change-Id: Ia7480dab0f357b5710d1962a40499381837942b3
2017-09-26 15:32:07 -04:00
David Moreau-Simard 645a3935ee
Multi-node: Set up connectivity with default OVS bridge
This sets up a default 'br-infra' bridge between nodes in a multi-node
job. Two groups are expected in order for this to be set up:
- switch
- peers

The 'switch' group, with only one expected member, will be set up as
the switch node while the 'peers' group will be connected to the switch
node with virtual ports.

The default settings such as the bridge name, the IP range used, the MTU
and so on can be overridden at the job level by setting vars.

Change-Id: If5a3f512837e5b235bd2f6dbfdbb454435aa983e
2017-09-26 15:32:02 -04:00