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

Support ansible-test integration tests for arm64 #906

Conversation

AndrewJDawes
Copy link
Contributor

SUMMARY

The ansible-test integration tests are currently failing when run with the --docker environment on a Debian-based OS running on arm64 architecture.

This is because the step that adds the Docker repository to apt is currently hardcoded to add only the amd64 repository.

So, in later steps when we try to use apt to find and install the docker-ce-cli package, this step fails on arm64 hosts with this error message: No package matching 'docker-ce-cli' is available.

This PR updates the test setup steps for Debian-based hosts to detect the host's architecture and add a repository that supports this architecture.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

tests/integration/targets/setup_docker/tasks/Debian.yml

ADDITIONAL INFORMATION

How to reproduce the issue:

  • Run ansible-test integration --docker on a Debian-based host with arm64 architecture
  • Expected: Tests should pass
  • Actual: Tests fail with this error:
TASK [setup_docker : Install Docker CE] ****************************************
fatal: [testhost]: FAILED! => {"changed": false, "msg": "No package matching 'docker-ce-cli' is available"}
BEHAVIOR BEFORE/AFTER THIS FIX

Before:

ansible-test integration --docker
...
...
...
TASK [setup_docker : Install Docker CE] ****************************************
fatal: [testhost]: FAILED! => {"changed": false, "msg": "No package matching 'docker-ce-cli' is available"}

After:

ansible-test integration --docker
...
...
...
TASK [setup_docker : Install Docker CE] ****************************************
changed: [testhost]

Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@AndrewJDawes
Copy link
Contributor Author

Hey, Felix!

I integrated your feedback - let me know if there's anything else I can help with on this!

@felixfontein felixfontein merged commit d98850e into ansible-collections:main Jun 30, 2024
127 checks passed
Copy link
Contributor

patchback bot commented Jun 30, 2024

Backport to stable-2: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-2/d98850e9e9ba6ccb73958e441c7428a33fc7ff90/pr-906

Backported as #907

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jun 30, 2024
* Support ansible-test integration for arm64

* Replace set_fact with inline templated conditional

(cherry picked from commit d98850e)
@felixfontein
Copy link
Collaborator

@AndrewJDawes thanks a lot for improving the tests :)

felixfontein pushed a commit that referenced this pull request Jun 30, 2024
* Support ansible-test integration for arm64

* Replace set_fact with inline templated conditional

(cherry picked from commit d98850e)

Co-authored-by: Andrew Dawes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants