community.zabbix icon indicating copy to clipboard operation
community.zabbix copied to clipboard

RHEL9 zabbix-agent package upgrade fails when installed with community.zabbix.zabbix_agent

Open juresaht2 opened this issue 8 months ago • 2 comments

SUMMARY

When installing zabbix-agent using the community.zabbix.zabbix_agent role, subsequent upgrades on the OS using dnf upgrade fail, because of this bug: https://support.zabbix.com/si/jira.issueviews:issue-html/ZBX-21363/ZBX-21363.html

In the bug the suggested solution is an alteration of the install procedure which this role should use:

As a workaround, we can exclude zabbix packages from epel.repo:

[epel]
...
excludepkgs=zabbix*
ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.zabbix.zabbix_agent

ANSIBLE VERSION
ansible [core 2.16.2]
  config file = /home/user/dev-jsah/ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.11/site-packages/ansible
  ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.11.5 (main, Oct 25 2023, 14:45:39) [GCC 8.5.0 20210514 (Red Hat 8.5.0-21)] (/usr/bin/python3.11)
  jinja version = 3.1.2
  libyaml = True
CONFIGURATION
CONFIG_FILE() = /home/user/dev-jsah/ansible.cfg
DEFAULT_NO_LOG(/home/user/dev-jsah/ansible.cfg) = False
DEFAULT_ROLES_PATH(/home/user/dev-jsah/ansible.cfg) = ['/home/user/dev-jsah/roles', '/usr/share/ansible/roles']
DEFAULT_STDOUT_CALLBACK(/home/user/dev-jsah/ansible.cfg) = yaml
HOST_KEY_CHECKING(/home/user/dev-jsah/ansible.cfg) = False
OS / ENVIRONMENT / Zabbix Version

Target OS: Rocky Linux release 9.4 (Blue Onyx)

STEPS TO REPRODUCE
- name: "Run zabbix-agent role from collection"
  include_role: 
    name: "community.zabbix.zabbix_agent"
  tags: always

...afterwards:

    - name: Host - update
      package:
        name: "*"
        state: latest
EXPECTED RESULTS

OS upgraded without issue.

ACTUAL RESULTS
fatal: [r9.test]: FAILED! => changed=false 
  failures: []
  msg: |-
    Unknown Error occurred: Transaction test error:
      file /usr/bin/zabbix_sender from install of zabbix-1:6.0.30-1.el9.x86_64 conflicts with file from package zabbix-sender-6.4.15-release1.el9.x86_64
      file /usr/bin/zabbix_get from install of zabbix-1:6.0.30-1.el9.x86_64 conflicts with file from package zabbix-get-6.4.15-release1.el9.x86_64
  rc: 1
  results: []

juresaht2 avatar Jun 14 '24 13:06 juresaht2