Commit graph

839 commits

Author SHA1 Message Date
Rich Megginson
e13482e650 docs(changelog): version 1.16.3 [citest skip]
Update changelog and .README.html for version 1.16.3

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-08-20 16:36:34 -06:00
Rich Megginson
fe439dbe4d test: use is-active instead of is-enabled to check for firewalld
Need to test if firewalld is running - the is-active test is
for that, not is-enabled

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-08-20 11:16:28 -06:00
Rich Megginson
1cba1dbc61 docs(changelog): version 1.16.2 [citest skip]
Update changelog and .README.html for version 1.16.2

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-08-19 16:45:26 -06:00
Rich Megginson
e55e2a77ab test: allow dhcp service if firewall is active
If firewall is active, the dhcp services do not work.  Change the test
to add and remove the dhcp services if firewall is active.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-08-17 17:30:00 -06:00
Rich Megginson
757081e06a docs(changelog): version 1.16.1 [citest skip]
Update changelog and .README.html for version 1.16.1

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-08-16 08:08:44 -06:00
Jakub Haruda
3841192f9f Tests: Use EPEL-7 from archive
Signed-off-by: Jakub Haruda <64086699+jharuda@users.noreply.github.com>
2024-08-16 07:52:44 -06:00
Rich Megginson
89d7148e81 ci: fix and improve integration container testing
Use the vault for centos 7 and centos stream 8

Exclude tests/tests_team_plugin_installation_nm.yml since
tests/tests_team_nm.yml is excluded.

Use grouping to group log lines for better readability.
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#grouping-log-lines

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-08-15 16:48:40 -06:00
Rich Megginson
931cdb335d test: skip integration pytest on fedora 39 and later
Something has changed in python, similar to the change between
el8 and el9, that causes the test to fail on f39 and later, so
skip it.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-08-15 09:26:54 -06:00
Rich Megginson
5082921cf9 docs(changelog): version 1.16.0 [citest skip]
Update changelog and .README.html for version 1.16.0

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-08-09 11:57:14 -06:00
Wen Liang
8195188d29 feat: Add the support for the optional route source parameter in nm provider
Enhancement: Add the optional route source parameter for the nm provider

Reason: In a scenario where you have a machine with multiple public IP
addresses, typically due to a multi-WAN setup, the src parameter in the
context of routes allows you to specify which source IP address should
be used when sending packets via a specific route.  This is crucial when
you want to ensure that outbound traffic uses a specific IP address tied
to a particular network interface, especially when dealing with multiple
WAN connections.

Result: Adding support for the src parameter in routes results in a
more powerful and flexible network configuration capability, especially
important in environments with multiple network interfaces or multiple
IP addresses, it provides better control over traffic routing.

Resolves: https://issues.redhat.com/browse/RHEL-3252

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2024-08-05 11:58:23 -04:00
Sergei Petrosian
098e5e1efb ci: Fix missing slash in ARTIFACTS_URL
Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2024-08-05 08:19:33 +02:00
Sergei Petrosian
f38d43628b
ci: Add workflow for ci_test bad, use remote fmf plan (#712)
* Remove plan from role dir, it's too complicated and long to run tests from tmt
* Use plan from linux-system-roles/tft-tests
* Move getting datetime to testing-farm job where it's used
* Add a workflow for running [citest_bad]
* Bump sclorg/testing-farm-as-github-action to v3
* Move concurrency group to first job
* Dump GitHub context

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2024-08-02 15:41:17 +02:00
Rich Megginson
9bbbca5d95 docs(changelog): version 1.15.6 [citest skip]
Update changelog and .README.html for version 1.15.6

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-08-01 17:07:08 -06:00
dependabot[bot]
d9381bc24e ci: bump sclorg/testing-farm-as-github-action from 2 to 3
Bumps [sclorg/testing-farm-as-github-action](https://github.com/sclorg/testing-farm-as-github-action) from 2 to 3.
- [Release notes](https://github.com/sclorg/testing-farm-as-github-action/releases)
- [Commits](https://github.com/sclorg/testing-farm-as-github-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: sclorg/testing-farm-as-github-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 16:32:44 -06:00
Sergei Petrosian
773d1c17a2
ci: Update fmf plan to add a separate job to prepare managed nodes (#708)
* Add a preparation job to run on managed nodes
* Update instructions to run tests locally
* From tft workflow, remove condition for commenter author_association.
  This would require us to add all trusted users, running workflow is not dangerous.
* Keep the plan minimal, only run prep steps required to install beakerlib

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2024-07-30 17:03:57 +02:00
Rich Megginson
b7c6a253ab test: fix some Ansible warnings not caught by lint
Do not use templating in `when:`, `that:`, `until:`.  These
are evaluated as Jinja statements.  In cases where the string
used is long or awkward to generate in-line, use an
intermediate var for the value.

Use a unique loop var instead of `item` in cases where a loop
may be called in a nested context.

Fix some formatting.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-07-25 08:35:17 -06:00
Sergei Petrosian
f45b70a8f5 ci: Add tft plan and workflow
This change is for running tests in Testing Farm CI. This is a replacement for
BaseOS CI that we are currently using. Running it Testing Farm gives us more
control.

It adds a workflow for running tests, and a plans directory containing a test
plan and a README-plans.md with some info.

Note that this workflow runs from the main branch. This means that changes to
the workflow must be merged to main, then pull requests will be able to run it.
This is because the workflow uses on: issue_comment context, this is a security
measure recommended by GitHub. It saves us from leaking organization secrets.

The functionality is WIP, so await future fixes and updates.

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2024-07-25 10:48:44 +00:00
Rich Megginson
a2dd3ce11a test: team plugin test does not clean up properly
The team plugin test does not clean up properly causing the following team
test to fail.  The fix is to use the network standard run_test.yml interface
to ensure proper preconditions and cleanup for the team plugin test.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-07-24 15:49:08 -06:00
Rich Megginson
50df8b1963 docs(changelog): version 1.15.5 [citest skip]
Update changelog and .README.html for version 1.15.5

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-07-16 15:14:26 -06:00
Rich Megginson
80fb52b09b fix: network_state must be defined in defaults/main.yml
As part of the public API, `network_state` must be defined in
defaults/main.yml, and it must be defined with the correct
type `dict`, so the correct default value must be `{}` the
empty dict.

All checking for `network_state` must check for a value of
`{}` to mean "network_state not set or empty".

Fix the test which looks for teaming configuration in EL10
to correctly look for the value in `network_state`.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-07-08 09:24:18 -06:00
Rich Megginson
f1ba7dc3d0 docs(changelog): version 1.15.4 [citest skip]
Update changelog and .README.html for version 1.15.4

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-07-02 12:18:16 -06:00
Rich Megginson
9e6e150a6e fix: add support for EL10
According to the Ansible team, support for listing platforms in
role `meta/main.yml` files is being removed.
Instead, they recommend using `galaxy_tags`

https://github.com/ansible/ansible/blob/stable-2.17/changelogs/CHANGELOG-v2.17.rst
"Remove the galaxy_info field platforms from the role templates"
https://github.com/ansible/ansible/issues/82453

Many roles already have tags such as "rhel", "redhat", "centos", and "fedora".
I propose that we ensure all of the system roles have these tags.
Some of our roles support Suse, Debian, Ubuntu, and others.
We should add tags for those e.g. the ssh role already has tags for "debian" and "ubuntu".

In addition - for each version listed under `platforms.EL` - add a tag like `elN`.

Q: Why not use a delimiter between the platform and the version e.g. `el-10`?

This is not allowed by ansible-lint:

```
meta-no-tags: Tags must contain lowercase letters and digits only., invalid: 'el-10'
meta/main.yml:1
```

So we cannot use uppercase letters either.

Q: Why not use our own meta/main.yml field?

No other fields are allowed by ansible-lint:

```
syntax-check[specific]: 'myfield' is not a valid attribute for a RoleMetadata
```

Q: Why not use some other field?

There are no other applicable or suitable fields.

Q: What happens when we want to support versions like `N.M`?

Use the word "dot" instead of "." e.g. `el10dot3`.
Similarly - use "dash" instead of "-".

We do not need tags such as `fedoraall`.
The `fedora` tag implies that the role works on all supported versions of fedora.
Otherwise, use tags such as `fedora40` if the role only supports specific versions.

Teaming support is dropped in EL10.  Provide an error to users who attempt
to use teaming and suggest that they use bonding instead.  Skip teaming
tests on EL10.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-07-02 09:09:05 -06:00
Rich Megginson
5e384bbe8d test: debug deprecated bond test failures
When the test fails, gather additional information to help
diagnose the failure.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-07-02 09:02:23 -06:00
Rich Megginson
008fe5cd3b ci: ansible-lint action now requires absolute directory
the change made for
b4018c22f8
means that ansible-lint now needs an absolute path for the working directory

Go ahead and make ansible-test use absolute path too just in case they decide
to make the same change.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-06-26 08:53:58 -06:00
maritu
0ba8dd7073 docs: network_connections module is only meant for internal usage by the role
Signed-off-by: maritu <marehone12@gmail.com>
2024-06-11 15:03:42 -04:00
Israel'[s Repo
d98948b31e docs: Add documentation for specifying VLAN ID
Signed-off-by: Israel'[s Repo <108451228+Precious000@users.noreply.github.com>
2024-06-11 14:20:06 -04:00
Rich Megginson
973a515d26 docs(changelog): version 1.15.3 [citest skip]
Update changelog and .README.html for version 1.15.3

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-06-11 11:11:23 -06:00
Rich Megginson
5b8d09795c ci: Add supported_ansible_also to .ansible-lint
This fixes the breakage of ansible-test.

We want to advertise support for ansible 2.14 since some of
our collections will be supported for a long time on this
version.  The latest version of ansible-lint requires 2.15
in meta/runtime.yml, but it also adds support for a way to
tell ansible-lint other versions which are acceptable, using
the new `supported_ansible_also` configuration option
in .ansible-lint

With this fix, we can support both the latest version of
ansible-test and ansible-lint.

See https://github.com/linux-system-roles/auto-maintenance/pull/341
for more information.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-06-05 14:46:27 -06:00
Rich Megginson
a8d381751a fix ansible-lint issues in example code
Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-06-04 18:09:20 -06:00
Rich Megginson
0f3f437e72 disable pylint warning caused by use of python3 pylint
Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-06-04 18:09:20 -06:00
Rich Megginson
b2fdc87366 fix python black formatting
Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-06-04 18:09:20 -06:00
Rich Megginson
b0517d1cfb ci: tox-lsr 3.4.0 - fix py27 tests; move other checks to py310
The latest version of virtualenv does not support creating
python 2.7 virtualenvs.  Change our CI tests to restrict the version
of virtualenv<20.22.0 and tox<4.15 for py27 environments

Move pylint, flake8, and black checks to the py310 environment
which is currently supported by ansible-core 2.17 and its related
checkers such as ansible-lint and ansible-test

pylint now uses ansible-core 2.17 and restricts the version of
pylint to 3.1.0 which is the version used by ansible-test 2.17

Remove `extends: default` for .yamllint.yml.  The latest version
of ansible-lint will automatically incorporate local yamllint
settings unless there is an `extends:`.

The above changes require some fixes to the role code.

For more information, see
https://github.com/linux-system-roles/tox-lsr/pull/168
and
https://github.com/linux-system-roles/tox-lsr/pull/170

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-06-04 18:09:20 -06:00
Rich Megginson
03e3b788ff ci: use tox-lsr 3.3.0 which uses ansible-test 2.17
Upgrade ci tests to use tox-lsr 3.3.0

tox-lsr 3.3.0 uses ansible-test 2.17

Create the ansible-test ignore file for 2.17

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-05-31 09:10:47 -06:00
Sergei Petrosian
34d1f2d53e docs(changelog): version 1.15.2 [citest skip]
Update changelog and .README.html for version 1.15.2

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2024-04-04 15:19:37 -06:00
dependabot[bot]
b4174b837f ci: Bump mathieudutour/github-tag-action from 6.1 to 6.2
Bumps [mathieudutour/github-tag-action](https://github.com/mathieudutour/github-tag-action) from 6.1 to 6.2.
- [Release notes](https://github.com/mathieudutour/github-tag-action/releases)
- [Commits](https://github.com/mathieudutour/github-tag-action/compare/v6.1...v6.2)

---
updated-dependencies:
- dependency-name: mathieudutour/github-tag-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-02 10:56:39 -04:00
maritu
4bc36b3484 docs: Add MAC VTAP example
Signed-off-by: maritu <marehone12@gmail.com>
2024-03-28 13:22:41 -04:00
Rich Megginson
ab77dd159e test: improve name text for skipped ostree tests
Improve the name text for skipped ostree tests to explain
why the test is skipped.
Add tests/tasks/ostree_systems_check.yml for use by test
playbooks that may be skipped on ostree systems.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-03-25 17:30:00 -06:00
Wen Liang
44f937d82b tests: Consent to restart network when specifying wireless or team connections
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2024-03-15 17:33:36 -04:00
Wen Liang
66c3eef7e3 fix: Ask user's consent to restart NM due to wireless or team interfaces
If updates for network packages are available and wireless or team
connections are specified, NetworkManager must be restarted, the role
requires user's consent to restart NetworkManager. Otherwise, there
might be property conflicts between NetworkManager daemon and plugin, or
NetworkManager plugin is not taking effect.

`update_cache` is enabled in the module tasks to check if updates for
network packages are available due to wireless or team interfaces, in
that case, NetworkManager needs user's explicit consent to be restarted
after the network package updates. And using `state: latest` for
checking the network package updates because we have to guarantee that
NetworkManager and its plugin have the same and most recent version for
configuring the network connections settings in the backend. It is
worthwhile to mention that we have both tasks using dnf and yum module
for checking available updates for network packages. Because checking
package cache update is not supported in Ansible package module, Fedora
and RHEL8+ use DNF package manager by default, RHEL7 uses yum package
manager by default.

This commit will address the situation that users forget to explicitly
specify `network_allow_restart: true` when specifying wireless or team
connections.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2024-03-15 17:33:36 -04:00
Wen Liang
94aeedb64a docs: Update the description about the variable network_allow_restart
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2024-03-15 17:33:36 -04:00
Wen Liang
b90e123708 tests: Team interface is indeed supported on Fedora
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2024-03-14 17:07:34 -04:00
dependabot[bot]
4aef173aea
ci: Bump ansible/ansible-lint from 6 to 24 (#677)
Bumps [ansible/ansible-lint](https://github.com/ansible/ansible-lint) from 6 to 24.
- [Release notes](https://github.com/ansible/ansible-lint/releases)
- [Commits](https://github.com/ansible/ansible-lint/compare/v6...v24)

---
updated-dependencies:
- dependency-name: ansible/ansible-lint
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-01 15:46:58 +01:00
Rich Megginson
e681c3fea5 test: improve bond test failure debugging
Improve bond test failure debugging
* put test setup into block/always so that cleanup happens for setup failures
* trace shell commands so that we can determine exactly which command failed
* add error reporting so that when certain commands fail, we can determine the error code

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-02-27 13:17:16 -05:00
Rich Megginson
4b12e154a6 docs(changelog): version 1.15.1 [citest skip]
Update changelog and .README.html for version 1.15.1

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-02-14 20:32:54 -07:00
Wen Liang
c6be8dfde5 test: Purge DNS config at the end of tests_network_state.yml
Without purging the DNS testing config at the end
`tests_network_state.yml`, the managed hosts can not properly resolve
certain hosts (e.g. mirrors.fedoraproject.org, mirrors.centos.org )
in the package installation task of other tests.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2024-02-14 20:20:49 -07:00
Wen Liang
b4f51e2691 test: Add DNS, routes and network connectivity checks during cleanup
In order to guarantee each test is cleaned up properly in the end, it
is important to add a post-test check to each test checking that:

- Routes and DNS are restored.
- Network connectivity to certain hosts are preserved.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2024-02-14 20:20:49 -07:00
Wen Liang
ae9f212086 test: Retry until success when installing package
Sometimes the rpm download returns a 403, which is likely caused by
too many parallel jobs attempt the download from the same controller in
too short a period of time, so the epel server throttles additional
downloads - use a retry here to mitigate.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2024-02-14 20:20:49 -07:00
Wen Liang
910ddd20a9 test: Rewrite tests_bond_options.yml in the new testing format
The new testing format is more concise and easier to debug when test
failure happens.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2024-02-14 20:20:49 -07:00
Rich Megginson
6c74dee859 ci: fix python unit test - copy pytest config to tests/unit
This is fixed by tox-lsr 3.2.2 - all actions that use tox-lsr are updated to
3.2.2, not just the python unit tests, even though the fix is only related to
pytest.  All roles are updated to use tox-lsr 3.2.2 for the sake of consistency
even if not affected by the pytest issue.

Something changed recently in the way github actions provisions systems which
means some of the directories are not readable by the python unit test actions.
In addition, the python unit tests were causing a lot of unnecessary directory
traversal doing collection/discovery of unit test files, because of using
`pytest -c /path/to/tox-lsr/pytest.ini` Unfortunately, with `pytest`, the
directory of the config file is the root directory for the tests and tests
discovery, and there is no way around this.

Therefore, the only solution is to copy the tox-lsr `pytest.ini` to the
`tests/unit` directory, which makes that the test root directory.

See also https://github.com/linux-system-roles/tox-lsr/pull/160

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-02-05 17:14:33 -07:00
dependabot[bot]
779eb87a31 ci: Bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 14:36:29 -07:00