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

dnf does not upgrade to dedicated package version on rhel8 (except allow_downgrade: yes is set) #74209

Closed
Slm0n87 opened this issue Apr 9, 2021 · 4 comments
Labels
affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_info This issue requires further information. Please answer any outstanding questions. P3 Priority 3 - Approved, No Time Limitation python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@Slm0n87
Copy link

Slm0n87 commented Apr 9, 2021

Summary

I want to update an rpm to a dedicated version using the buildin dnf task.
The version is specified in the "name:" field, but the rpm stays at the old version and ansible does not upgrade the package to the defined version.

Issue Type

Bug Report

Component Name

dnf

Ansible Version

Tested with two version:

Ansible 2.9.14 
and:
$ ansible --version
ansible 2.10.7
  config file = /Users/xxxxx/git/ansible/ansible.cfg
  configured module search path = ['/Users/xxxxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/3.2.0/libexec/lib/python3.9/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.9.2 (default, Mar 26 2021, 23:27:12) [Clang 12.0.0 (clang-1200.0.32.29)]

Configuration

$ ansible-config dump --only-changed
ANSIBLE_PIPELINING(/Users/xxxxx/git/ansible/ansible.cfg) = True
DEFAULT_CALLBACK_WHITELIST(/Users/xxxxx/git/ansible/ansible.cfg) = ['profile_tasks']
DEFAULT_FORKS(/Users/xxxxx/git/ansible/ansible.cfg) = 20
DEFAULT_HOST_LIST(/Users/xxxxx/git/ansible/ansible.cfg) = ['/Users/xxxxx/git/ansible/hosts']
DEFAULT_LOG_PATH(/Users/xxxxx/git/ansible/ansible.cfg) = /var/log/ansible/ansible.log
DEFAULT_MANAGED_STR(/Users/xxxxx/git/ansible/ansible.cfg) = Ansible managed
DEFAULT_TRANSPORT(/Users/xxxxx/git/ansible/ansible.cfg) = smart
HOST_KEY_CHECKING(/Users/xxxxx/git/ansible/ansible.cfg) = False
PERSISTENT_CONNECT_TIMEOUT(/Users/xxxxx/git/ansible/ansible.cfg) = 30

OS / Environment

RHEL 8

Steps to Reproduce

# variables rpm_name and rpm_version needs to be defined
- name: Rollout rpm to a dedicated version
  dnf:
    name: "{{ rpm_name }}-{{ rpm_version}}.el{{ ansible_distribution_major_version }}"
    update_cache: yes
  1. Install an older version of an package
  2. Install a newer version of an package

Expected Results

Ansible should update the rpm to the version specified at step 2.

Actual Results

Ansible Output after Step 2 is:
ok: [myrhel8host]

Code of Conduct

I agree to follow the Ansible Code of Conduct

@Slm0n87
Copy link
Author

Slm0n87 commented Apr 9, 2021

I found a workaround: If allow_downgrade: yes is defined for the dnf task then the package gets upgraded.
Of course this is still an unexpected behaviour.

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Apr 9, 2021
@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Apr 13, 2021
@samdoran
Copy link
Contributor

Can you provide the version of the installed packaged and the version trying to be installed?

needs_info

@samdoran samdoran added needs_verified This issue needs to be verified/reproduced by maintainer P3 Priority 3 - Approved, No Time Limitation labels Apr 13, 2021
@ansibot ansibot added the needs_info This issue requires further information. Please answer any outstanding questions. label Apr 13, 2021
@ansibot
Copy link
Contributor

ansibot commented May 15, 2021

@Slm0n87 This issue is waiting for your response. Please respond or the issue will be closed.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Jun 16, 2021

@Slm0n87 You have not responded to information requests in this issue so we will assume it no longer affects you. If you are still interested in this, please create a new issue with the requested information.

click here for bot help

@ansibot ansibot closed this as completed Jun 16, 2021
@ansible ansible locked and limited conversation to collaborators Jul 14, 2021
@sivel sivel removed the needs_verified This issue needs to be verified/reproduced by maintainer label Feb 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_info This issue requires further information. Please answer any outstanding questions. P3 Priority 3 - Approved, No Time Limitation python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

No branches or pull requests

4 participants