Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for ansible-builder #377

Merged
merged 15 commits into from
Sep 20, 2024
Merged

Conversation

cidrblock
Copy link
Contributor

@cidrblock cidrblock commented Sep 18, 2024

  • Change the server in container url to 0.0.0.0, which should be safer long-term and resolve some odd errors found with podman related to pasta.
  • Log the container run command for easier troubleshooting locally outside the test suite.
  • Add an execution environment build test

Note the failure in this test run:
opening file /sys/fs/cgroup/cgroup.subtree_control for writing: Read-only file system
https://github.com/ansible/ansible-dev-tools/actions/runs/10930266208/job/30342982168?pr=377

This is why unmask=/sys/fs/cgroup is added after the initial addition of the EE test which works for podman.

For docker based on: moby/moby#42275 (comment)
--privileged was added (not ideal, but few options)

On macOS/intel/podman desktop the following errors were found:
Error: crun: mknod /dev/null: Operation not permitted: OCI permission denied

the following was added to resolve this error:

--cap-add=mknod (docker gets this by default)

this allowed all tests to pass on macOS/intel/podman desktop

277.32s call     tests/integration/test_container.py::test_builder
6.21s call     tests/integration/test_container.py::test_nav_playbook
4.99s call     tests/integration/test_container.py::test_nav_collections
3.56s call     tests/integration/test_container.py::test_navigator_simple_c_in_c
3.18s call     tests/integration/test_container.py::test_nav_collection
2.77s call     tests/integration/test_container.py::test_navigator_simple
2.58s call     tests/integration/test_container.py::test_podman
1.23s call     tests/integration/test_container.py::test_nav_images
1.15s setup    tests/integration/test_container.py::test_nav_collections
0.78s setup    tests/integration/test_container.py::test_nav_playbook
======================================= 34 passed, 1 warning in 310.65s (0:05:10) =======================================

Additional changes necessary for Windows user include the addition of
"--cap-add=NET_ADMIN",
to avoid bpf query: Operation failed errors when building an EE

@cidrblock cidrblock requested a review from a team as a code owner September 18, 2024 21:17
@cidrblock cidrblock requested review from ssbarnea and shatakshiiii and removed request for a team September 18, 2024 21:17
@cidrblock cidrblock added the bug Something isn't working label Sep 18, 2024
@cidrblock cidrblock changed the title DNM Add test for ansible-builder Add test for ansible-builder Sep 19, 2024
@cidrblock cidrblock merged commit b7825c9 into ansible:main Sep 20, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants