Project

Profile

Help

Issue #7219

closed

pulp-rpm package fails to install when running the installer and PyPI source

Added by david.macneil@actual-experience.com over 3 years ago. Updated over 3 years ago.

Status:
CLOSED - NOTABUG
Priority:
Normal
Assignee:
-
Category:
Installer - Moved to GitHub issues
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
CentOS 7
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Hi

I've got a fresh install of Centos 7.8.2003 running on aws in eu-west-1 and I'm attempting to run the installer with the following plugins enabled using the ansible galaxy collection:

pulp_install_plugins:
  pulp-certguard: {}
  pulp-deb: {}
  pulp-file: {}
  pulp-rpm:
    prereq_role: "pulp.pulp_installer.pulp_rpm_prerequisites"

The installation fails with the following:

failed: [10.15.0.110] (item={'key': 'pulp-rpm', 'value': {'prereq_role': 'pulp.pulp_installer.pulp_rpm_prerequisites'}}) => {
    "ansible_loop_var": "item",
    "changed": false,
    "cmd": [
        "/usr/local/lib/pulp/bin/pip",
        "install",
        "-c",
        "/usr/local/lib/pulp/pip_constraints_for_plugins.txt",
        "pulp-rpm"
    ],
    "invocation": {
        "module_args": {
            "chdir": null,
            "editable": false,
            "executable": null,
            "extra_args": "-c /usr/local/lib/pulp/pip_constraints_for_plugins.txt",
            "name": [
                "pulp-rpm"
            ],
            "requirements": null,
            "state": "present",
            "umask": null,
            "version": null,
            "virtualenv": "/usr/local/lib/pulp",
            "virtualenv_command": "/usr/bin/python3.6 -m venv",
            "virtualenv_python": null,
            "virtualenv_site_packages": false
        }
    },
    "item": {
        "key": "pulp-rpm",
        "value": {
            "prereq_role": "pulp.pulp_installer.pulp_rpm_prerequisites"
        }
    },
    "msg": "stdout: Collecting pulp-rpm\n  Using cached https://files.pythonhosted.org/packages/37/81/19729de1625a4d6c7b1eeed2113f36c8acb17bcc313bbc72b2858b1a078f/pulp_rpm-3.5.0-py3-none-any.whl\nCollecting django-readonly-field (from pulp-rpm)\n  Using cached https://files.pythonhosted.org/packages/fe/b1/0a18c9545dc0d9538d27e08e70e02df2f77d37afd8536d6dde71b9c90e88/django_readonly_field-1.0.5-py2.py3-none-any.whl\nCollecting productmd>=1.25 (from pulp-rpm)\n  Using cached https://files.pythonhosted.org/packages/c3/0f/c5a61da84bf992c0e29191951d44613dfe509ac8231ad05332e99e8c6ede/productmd-1.26-py3-none-any.whl\nCollecting jsonschema>=3.0 (from pulp-rpm)\n  Using cached https://files.pythonhosted.org/packages/c5/8f/51e89ce52a085483359217bc72cdbf6e75ee595d5b1d4b5ade40c7e018b8/jsonschema-3.2.0-py2.py3-none-any.whl\nCollecting PyGObject~=3.22 (from pulp-rpm)\n  Using cached https://files.pythonhosted.org/packages/93/41/bf9ab8929f51dac2979ae81bb094728bacee3ceb049def72d3fc1bcb4241/PyGObject-3.36.1.tar.gz\n  Installing build dependencies: started\n  Installing build dependencies: finished with status 'done'\n  Getting requirements to build wheel: started\n  Getting requirements to build wheel: finished with status 'error'\n  Complete output from command /usr/local/lib/pulp/bin/python3.6 /usr/local/lib/pulp/lib64/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpjz1yoz_6:\n  Traceback (most recent call last):\n    File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pip/_vendor/pep517/_in_process.py\", line 207, in <module>\n      main()\n    File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pip/_vendor/pep517/_in_process.py\", line 197, in main\n      json_out['return_val'] = hook(**hook_input['kwargs'])\n    File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pip/_vendor/pep517/_in_process.py\", line 48, in get_requires_for_build_wheel\n      backend = _build_backend()\n    File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pip/_vendor/pep517/_in_process.py\", line 39, in _build_backend\n      obj = getattr(obj, path_part)\n  AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'\n  \n  ----------------------------------------\n\n:stderr: Command \"/usr/local/lib/pulp/bin/python3.6 /usr/local/lib/pulp/lib64/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpjz1yoz_6\" failed with error code 1 in /tmp/pip-install-1zzw8wdk/PyGObject\nYou are using pip version 19.0.2, however version 20.2b1 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\n"
}

Obviously this is related to the following https://github.com/pypa/setuptools/issues/1694 and as a result I have checked that setuptools is upgraded to > 40.8.0 within the venv that the installer uses:

(pulp) [pulp@ip-10-15-0-110 pulp]$ bin/python -m pip install --upgrade setuptools
Requirement already up-to-date: setuptools in ./lib/python3.6/site-packages (49.2.0)
(pulp) [pulp@ip-10-15-0-110 pulp]$ bin/python -c 'import setuptools, setuptools.build_meta, pathlib; print(pathlib.Path(setuptools.__file__).resolve().parent); print(setuptools.build_meta.__file__); print(setuptools.build_meta.__legacy__)'
/usr/local/lib/pulp/lib/python3.6/site-packages/setuptools
/usr/local/lib/pulp/lib64/python3.6/site-packages/setuptools/build_meta.py
<setuptools.build_meta._BuildMetaLegacyBackend object at 0x7fc370d69e10>

There is a the system default setuptools which is present on the system by default which doesn't support __legacy__ in setuptools.build_meta which is, I presume, the setuptools that's actually being loaded when running the installer but short of removing python 3.6 there's not much that can be done about that.

I'm not sure what can be done in this case as it's quite possibly an upstream issue for centos but I wanted to bring it to your attention and hopefully find out if this was a known issue (can't find it on here) or whether there was something that could be done to work around this issue.

I managed to get the installer to run to completion by symlinking an alternative python3.6 library directory but that's obviously a worrying way to install things.

ln -s /usr/local/lib/python3.6 /usr/lib/python3.6
ansible 2.9.5
  config file = None
  configured module search path = ['/Users/david.macneil/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)]
Actions #1

Updated by david.macneil@actual-experience.com over 3 years ago

Just to add I removed the prereq_role: "pulp.pulp_installer.pulp_rpm_prerequisites" and the result was the same

Actions #2

Updated by mdepaulo@redhat.com over 3 years ago

Hi, a couple of questions:

  1. What version of the installer are you using?
  2. Do you have pulp_use_system_wide_pkgs set to true? Or have you in the past? (In the past, it was set to true by the pulp_rpm_prerequisites role.) You can check /usr/local/lib/pulp/pyvenv.cfg (it has a slightly different name there.)
Actions #3

Updated by mdepaulo@redhat.com over 3 years ago

  • Status changed from NEW to CLOSED - NOTABUG

Hi David,

We are unable to reproduce this.

Feel free to re-open or comment on this when you can work with us on doing so.

-Mike

Also available in: Atom PDF