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

Role does not work with Fedora with only dnf5 installed #472

Open
tiny-pangolin opened this issue Oct 18, 2024 · 5 comments
Open

Role does not work with Fedora with only dnf5 installed #472

tiny-pangolin opened this issue Oct 18, 2024 · 5 comments

Comments

@tiny-pangolin
Copy link

I receive the following output when I import this role on Fedora 40 with only dnf5. The role behaves correctly on Fedora 40 with dnf4 installed

PLAY [Docker Host] ***********************************************************************************************************************

TASK [Gathering Facts] *******************************************************************************************************************
ok: [kenny.local.shiftsystems.net]

TASK [Install Docker] ********************************************************************************************************************

TASK [geerlingguy.docker : Load OS-specific vars.] ***************************************************************************************
ok: [kenny.local.shiftsystems.net]

TASK [geerlingguy.docker : include_tasks] ************************************************************************************************
included: /home/mathias/.ansible/roles/geerlingguy.docker/tasks/setup-RedHat.yml for kenny.local.shiftsystems.net

TASK [geerlingguy.docker : Ensure old versions of Docker are not installed.] *************************************************************
fatal: [kenny.local.shiftsystems.net]: FAILED! => {"changed": false, "failures": ["No packages to remove for argument: docker-common", "No packages to remove for argument: docker-engine", "Problem: problem with installed package \n  - package docker-ce-3:27.3.1-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:26.0.0-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:26.0.1-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:26.0.2-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:26.1.0-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:26.1.1-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:26.1.2-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:26.1.3-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:26.1.4-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:27.0.1-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:27.0.2-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:27.0.3-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:27.1.0-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:27.1.1-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:27.1.2-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:27.2.0-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:27.2.1-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - package docker-ce-3:27.3.0-1.fc40.x86_64 requires docker-ce-cli, but none of the providers can be installed\n  - conflicting requests"], "msg": "Depsolve Error occurred", "rc": 1}

Running sudo dnf5 remove docker docker-common docker-engine executes correctly.

$ sudo dnf5 remove docker docker-common docker-engine
No packages to remove for argument: docker
No packages to remove for argument: docker-common
No packages to remove for argument: docker-engine

I believe this is the task where the failure occurs is Ensure old versions of Docker are not installed in this file tasks/setup-RedHat.yml

@tiny-pangolin tiny-pangolin changed the title Role does not work Fedora with only dnf5 installed Role does not work with Fedora with only dnf5 installed Oct 18, 2024
@tiny-pangolin
Copy link
Author

I also noticed that the docker_obsolete_packages variable is not used for RedHat. Would it be possible to change the hard coded list to use this variable? Using the variable instead of the hard coded variable would allow me to work around the issue and make the behavior consistent between Debian and RedHat family distros.

@cschindlbeck
Copy link
Contributor

cschindlbeck commented Nov 4, 2024

This behavior has been adressed in ansible/ansible#80550 but i think it is only included in 2.18

As for your second suggestion, yes, you can replace the hardcoded list, see here #474

@cschindlbeck
Copy link
Contributor

Upgrading to ansible-core 2.18 does not resolve this unfortunately

@tiny-pangolin
Copy link
Author

is there a reason you closed your PR, and would it possible for me to reopen it?

@cschindlbeck
Copy link
Contributor

is there a reason you closed your PR, and would it possible for me to reopen it?

Yes, it didn't pass the ci, once it is working, we can reopen it for sure, but feel free to fork my branch and fix/improve it

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

No branches or pull requests

2 participants