Skip to content

Run CI in a CentOS 9 container using runcontainer.sh #137

Description

@nhosoi

I'm attempting to run CI tests using tox-lsr runcontainer.sh.

Here is the sample command line:

tox -e container-ansible-core-2.15 -- --erase-old-snapshot --parallel 1 ¥
  --image-name centos-9 tests/tests_*.yml

To make the command successfully complete I had to make changes to runcontainer.sh as well as many of the roles. The following text describes my work. In the attachment, first, I’m proposing to make some fixes on runcontainer.sh in tox-lsr. In the next summary section, I classified the roles based on the requirements to pass the tests.

runcontainer.sh

https://github.com/nhosoi/tox-lsr/tree/runcontainer

Modify runcontainer.sh

- Modify EXTRA_RPM to be installed as COMMON_PKGS.
  It is necessary to allow extra rpm packages to download
  from HA repositories.
- Modify EXTRA_SKIP_TAGS.
  *  Always skip tests tagged with tests::reboot
  *  Merge EXTRA_SKIP_TAGS into CONTAINER_SKIP_TAGS and
     pass the latter to ansible-playbook.
- Add tests/collection-requirements.yml to the loop to install the
  test requirements using `ansible-galaxy collection`.
- Add LSR_TOX_ENV_TMP_DIR to ANSIBLE_COLLECTIONS_PATHS if some
  collections are installed in the path.
- Add `--force` to `ansible-galaxy collection install` to make sure
  the collection is installed.

SUMMARY

  1. Tests that work with no changes

    • bootloader
    • kdump
    • keylime_server
    • systemd
    • tlog
  2. Tests that work by adding additional packages to tests/setup-snapshot.yml

  3. Tests that work by fixing a bug

  4. Tests that work by adding a missing file

  5. Tests that work by skipping tests with skip tags

  6. Tests that work by adding additional packages to tests/setup-snapshot.yml
    and skipping tests with skip tags

  7. Tests that work by making a fix in a test

  8. Tests that work by skipping tests with skip tags and
    making a fix in a test

  9. Tests that work by adding additional packages to tests/setup-snapshot.yml,
    and skipping tests with skip tags

  10. Tests that work by adding additional packages to tests/setup-snapshot.yml,
    skipping tests with skip tags, and making a fix in a test

    • network
      • skip_tag: tests::network_scripts
      • skip_tag: tests::container_bond_check
      • skip_tag: tests::container_op_not_permitted
      • skip_tag: tests::container_not_supported
      • fix: Skip installing network-scripts on CentOS 9
      • url: https://github.com/nhosoi/network/tree/runcontainer
  11. Tox config file (either pyproject.toml, tox.ini, setup.cfg) not found

    • image_builder
    • sshd
    • tuned
  12. Architecture is limited to x86_64(?)

    • mssql
      • There is no way to run the tests using non-x86_64 architecture?
  13. Kernel modules are missing in the container image

    • nbde_client
      • kernel_module: dm_mod
  14. All tests relies on selinux

    • postfix
    • selinux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions