Error on installing pulp

Hey there :slight_smile:
I doubt my problem is purely pulp related, but maybe somebody has an idea.

Problem:
I am trying to install pulp as a part of Ansible Private Automation Hub 2.1.
However the installation fails at

TASK [pulp.pulp_installer.pulp_common : Install Pulp plugins via dnf packages] ***
e[0;32mok: [ansibletowerhub.testdmz.atix] => (item={'key': 'pulp-container', 'value': {}}) => {"__pulp_common_package": {"key": "pulp-container", "value": {}}, "ansible_loop_var": "__pulp_common_package", "changed": false, "msg": "Nothing to do", "rc": 0, "results": []}e[0m
e[0;31mfailed: [ansibletowerhub.testdmz.atix] (item={'key': 'pulp-ansible', 'value': {}}) => {"__pulp_common_package": {"key": "pulp-ansible", "value": {}}, "ansible_loop_var": "__pulp_common_package", "changed": false, "failures": [], "msg": "Unknown Error occurred: Transaction test error:\n  file /usr/bin/distro from install of python38-distro-1.6.0-1.el8pc.noarch conflicts with file from package python3-distro-1.4.0-2.module+el8.1.0+3334+5cb623d7.noarch\n", "rc": 1, "results": []}e[0m
e[0;31mfailed: [ansibletowerhub.testdmz.atix] (item={'key': 'galaxy-ng', 'value': {'collectstatic': False, 'version': '4.4.0'}}) => {"__pulp_common_package": {"key": "galaxy-ng", "value": {"collectstatic": false, "version": "4.4.0"}}, "ansible_loop_var": "__pulp_common_package", "changed": false, "failures": [], "msg": "Unknown Error occurred: Transaction test error:\n  file /usr/bin/distro from install of python38-distro-1.6.0-1.el8pc.noarch conflicts with file from package python3-distro-1.4.0-2.module+el8.1.0+3334+5cb623d7.noarch\n", "rc": 1, "results": []}e[0m

The error can be reproduced by trying to install python38-distro manually

# sudo dnf install python38-distro
Error: Transaction test error:
  file /usr/bin/distro from install of python38-distro-1.6.0-1.el8pc.noarch conflicts with file from package python3-distro-1.4.0-2.module+el8.1.0+3334+5cb623d7.noarch

Pulpcore version:

Pulp plugins installed and their versions:

Operating system - distribution and version:
Rhel - 8.5

The error seems similar to the one found here:

1 Like

Here the contents of the two /usr/bin/distro files

python38-distro

#!/usr/bin/python3.8
# EASY-INSTALL-ENTRY-SCRIPT: 'distro==1.6.0','console_scripts','distro'
__requires__ = 'distro==1.6.0'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(
        load_entry_point('distro==1.6.0', 'console_scripts', 'distro')()
    )

python3-distro-1.4.0-2

#!/usr/libexec/platform-python
# EASY-INSTALL-ENTRY-SCRIPT: 'distro==1.4.0','console_scripts','distro'
__requires__ = 'distro==1.4.0'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(
        load_entry_point('distro==1.4.0', 'console_scripts', 'distro')()
    )

I believe the issue was answered here

2 Likes

Yup - there is a fix for foreman/katello in place. I guess for installing “pure” pulp or pulp as part of ansible automation platform a similar approach would make sense :slight_smile: I will fix it manually for now :slight_smile: thanks!

1 Like