In GitLab by @goshansp on Aug 21, 2020, 09:38
Scope
We are unable to upload or sync importlib_resources>=1.1.0 into our python repository (rhel7-pulp2.21-python2.7.5). Until version 1.0.2 this went fine.
Workaround rhel7-pulp2.21-python2.7.5 (Manual Upload to Pulp)
- delete / create pytho repo and dont add importlib_resources via feed
- download importlib_resources-1.0.2 from pypi
- upload / publish
- profit
other packages that dont cause said issue
ansible,ansible-base,ansible-lint,ansible-tower-cli,anyconfig,arrow,asn1crypto,aspy-yaml,atomicwrites,attrs,babel,backports-ssl-match-hostname,bcrypt,binaryornot,cerberus,certifi,cffi,cfgv,chardet,click,click_help_colors,click-completion,commonmark,colorama,configparser,contextlib2,cookiecutter,cryptography,dataclasses,debtcollector,distro,dnspython,docker,docker-py,docker-pycreds,dparse,entrypoints,enum34,fasteners,flake8,funcsigs,functools32,future,git-url-parse,identify,idna,importlib-metadata,infoblox-client,ipaddress,iso8601,jinja2,jinja2-time,jmespath,lxml,markupsafe,mccabe,molecule,monotonic,more-itertools,msgpack,netaddr,netifaces,nodeenv,ntlm-auth,oslo-config,oslo-context,oslo-i18n,oslo-log,oslo-serialization,oslo-utils,packaging,paramiko,pathlib2,pathspec,pbr,pexpect,pip,pluggy,poyo,pre-commit,prometheus-client,psutil,ptyprocess,py,pyasn1,pycodestyle,pycparser,pydf,pygments,pyflakes,pyinotify,pykerberos,pynacl,pyopenssl,pyparsing,pytest,python-dateutil,python-gilt,python-gitlab,python-memcached,python-slugify,pytz,pyup-tools,pyvmomi,pywinrm,pyyaml,requests,requests-kerberos,requests-ntlm,rich,rfc3986,ruamel-ordereddict,ruamel-yaml,ruamel-yaml-clib,safety,selinux,scandir,setuptools,sh,shellingham,six,stevedore,tabulate,testinfra,text-unidecode,toml,tree-format,typing,typing-extensions,urllib3,virtualenv,wcwidth,websocket-client,whichcraft,wrapt,xmltodict,yamllint,yq,zipp
suspected cause
There seems to be incompatibilities with the versioning. Possibly the importer gets 0.0.0 from two packages resulting in an error during sync. This may be due to setuptools==0.9.8
reproduction pulp sync fail
$ pulp-admin python repo create $pulp_proxy --repo-id python-test --feed https://pypi.org/ --package-names importlib_resources
$ pulp-admin python repo sync run --repo-id python-test
+----------------------------------------------------------------------+
Synchronizing Repository [python-test]
+----------------------------------------------------------------------+
This command may be exited via ctrl+c without affecting the request.
Downloading Python metadata.
[-]
... completed
Copying units already in pulp
[\]
... completed
Downloading and processing Python packages.
[\]
... completed
Task Succeeded
Task Failed
[Errno 17] File exists:
'/var/cache/pulp/[email protected]/c895ee09-f18d-417
8-85d6-95d26b0a5bc8/python-test/simple/importlib-resources'
$ rpm -qa | grep pulp
pulp-python-plugins-2.0.3-1.el7.noarch
pulp-server-2.21.0-1.el7.noarch
pulp-puppet-plugins-2.21.0-1.el7.noarch
python-pulp-bindings-2.21.0-1.el7.noarch
pulp-consumer-client-2.21.0-1.el7.noarch
pulp-puppet-admin-extensions-2.21.0-1.el7.noarch
pulp-selinux-2.21.0-1.el7.noarch
python-pulp-python-common-2.0.3-1.el7.noarch
python-pulp-rpm-common-2.21.0-1.el7.noarch
python-pulp-agent-lib-2.21.0-1.el7.noarch
python-pulp-oid_validation-2.21.0-1.el7.noarch
pulp-rpm-plugins-2.21.0-1.el7.noarch
pulp-rpm-admin-extensions-2.21.0-1.el7.noarch
python-isodate-0.5.0-4.pulp.el7.noarch
pulp-docker-admin-extensions-3.2.5-1.el7.noarch
pulp-python-admin-extensions-2.0.3-1.el7.noarch
python-pulp-repoauth-2.21.0-1.el7.noarch
python-pulp-client-lib-2.21.0-1.el7.noarch
pulp-agent-2.21.0-1.el7.noarch
pulp-rpm-handlers-2.21.0-1.el7.noarch
pulp-docker-plugins-3.2.5-1.el7.noarch
python-pulp-common-2.21.0-1.el7.noarch
pulp-admin-client-2.21.0-1.el7.noarch
pulp-rpm-consumer-extensions-2.21.0-1.el7.noarch
python-pulp-docker-common-3.2.5-1.el7.noarch
python-pulp-puppet-common-2.21.0-1.el7.noarch
pulp-rpm-yumplugins-2.21.0-1.el7.noarch
journal -f / publish fail
Aug 26 10:34:49 redacted pulp[1866]: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._queue_reserved_task[2e2d5a08-05e3-4673-9fcc-4bce3b8b86da]
Aug 26 10:34:49 redacted pulp[2223]: celery.worker.strategy:INFO: Received task: pulp.server.managers.repo.sync.sync[8266d2ef-391c-41a1-8b6d-c4ef8454d8a1]
Aug 26 10:34:49 redacted pulp[3098]: celery.app.trace:INFO: [2e2d5a08] Task pulp.server.async.tasks._queue_reserved_task[2e2d5a08-05e3-4673-9fcc-4bce3b8b86da] succeeded in 0.0141177220503s: None
Aug 26 10:34:49 redacted pulp[2223]: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._release_resource[28b04604-c48c-4d50-91d9-083c3429fb57]
Aug 26 10:34:49 redacted pulp[3074]: requests.packages.urllib3.connectionpool:INFO: Starting new HTTPS connection (1): pypi.org
Aug 26 10:34:49 redacted pulp[3074]: nectar.downloaders.threaded:INFO: Download succeeded: https://pypi.org/pypi/importlib_resources/json.
Aug 26 10:34:49 redacted pulp[3074]: pulp_python.plugins.importers.sync:INFO: Processing metadata retrieved from https://pypi.org/pypi/importlib_resources/json.
Aug 26 10:34:51 redacted pulp[1866]: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._queue_reserved_task[f2abd34d-6883-498d-9d39-49a7b976f3d4]
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:INFO: [8266d2ef] Task pulp.server.managers.repo.sync.sync[8266d2ef-391c-41a1-8b6d-c4ef8454d8a1] succeeded in 2.19935470994s: <pulp.server.async.tasks.TaskResult object at 0x7f96e4aebc10>
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:INFO: [28b04604] Task pulp.server.async.tasks._release_resource[28b04604-c48c-4d50-91d9-083c3429fb57] succeeded in 0.00107404403389s: None
Aug 26 10:34:51 redacted pulp[2223]: celery.worker.strategy:INFO: Received task: pulp.server.managers.repo.publish.publish[c895ee09-f18d-4178-85d6-95d26b0a5bc8]
Aug 26 10:34:51 redacted pulp[3098]: celery.app.trace:INFO: [f2abd34d] Task pulp.server.async.tasks._queue_reserved_task[f2abd34d-6883-498d-9d39-49a7b976f3d4] succeeded in 0.015954433009s: None
Aug 26 10:34:51 redacted pulp[2223]: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._release_resource[a8098104-c1e6-45a4-bd0b-5850aef21e40]
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) Exception caught from plugin during publish for repo [python-test]
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) Traceback (most recent call last):
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1259, in _do_publish
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) publish_report = publish_repo(transfer_repo, conduit, call_config)
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 894, in wrap_f
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) return f(*args, **kwargs)
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp_python/plugins/distributors/web.py", line 94, in publish_repo
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) return self._publisher.process_lifecycle()
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 573, in process_lifecycle
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) super(PluginStep, self).process_lifecycle()
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 164, in process_lifecycle
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) step.process()
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 257, in process
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) self._process_block()
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 304, in _process_block
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) self.process_main()
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp_python/plugins/distributors/steps.py", line 69, in process_main
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) self.write_simple_api(projects)
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp_python/plugins/distributors/steps.py", line 100, in write_simple_api
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) PublishMetadataStep._create_project_index(project_name, simple_path, packages)
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp_python/plugins/distributors/steps.py", line 118, in _create_project_index
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) os.makedirs(project_path)
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) File "/usr/lib64/python2.7/os.py", line 157, in makedirs
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) mkdir(name, mode)
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.controllers.repository:ERROR: [c895ee09] (3074-35488) OSError: [Errno 17] File exists: '/var/cache/pulp/reserved_resource_worker-3@redacted/c895ee09-f18d-4178-85d6-95d26b0a5bc8/python-test/simple/importlib-resources'
Aug 26 10:34:51 redacted pulp[3074]: pulp.server.async.tasks:INFO: [c895ee09] Task failed : [c895ee09-f18d-4178-85d6-95d26b0a5bc8]
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) Task pulp.server.managers.repo.publish.publish[c895ee09-f18d-4178-85d6-95d26b0a5bc8] raised unexpected: OSError(17, 'File exists')
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) Traceback (most recent call last):
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 367, in trace_task
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) R = retval = fun(*args, **kwargs)
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 686, in __call__
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) return super(Task, self).__call__(*args, **kwargs)
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 108, in __call__
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) return super(PulpTask, self).__call__(*args, **kwargs)
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 622, in __protected_call__
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) return self.run(*args, **kwargs)
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1110, in publish
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) result = check_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1207, in check_publish
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) result = _do_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1259, in _do_publish
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) publish_report = publish_repo(transfer_repo, conduit, call_config)
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 894, in wrap_f
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) return f(*args, **kwargs)
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp_python/plugins/distributors/web.py", line 94, in publish_repo
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) return self._publisher.process_lifecycle()
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 573, in process_lifecycle
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) super(PluginStep, self).process_lifecycle()
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 164, in process_lifecycle
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) step.process()
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 257, in process
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) self._process_block()
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 304, in _process_block
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) self.process_main()
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp_python/plugins/distributors/steps.py", line 69, in process_main
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) self.write_simple_api(projects)
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp_python/plugins/distributors/steps.py", line 100, in write_simple_api
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) PublishMetadataStep._create_project_index(project_name, simple_path, packages)
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib/python2.7/site-packages/pulp_python/plugins/distributors/steps.py", line 118, in _create_project_index
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) os.makedirs(project_path)
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) File "/usr/lib64/python2.7/os.py", line 157, in makedirs
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) mkdir(name, mode)
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:ERROR: [c895ee09] (3074-35488) OSError: [Errno 17] File exists: '/var/cache/pulp/reserved_resource_worker-3@redacted/c895ee09-f18d-4178-85d6-95d26b0a5bc8/python-test/simple/importlib-resources'
Aug 26 10:34:51 redacted pulp[3074]: celery.app.trace:INFO: [a8098104] Task pulp.server.async.tasks._release_resource[a8098104-c1e6-45a4-bd0b-5850aef21e40] succeeded in 0.00126324000303s: None
reproduction steps pulp upload fail
The following will fail for any version >=1.1.0
$ pulp-admin -vvvvv python repo upload --repo-id python-test --file importlib_resources-1.1.0.tar.gz
...
Task Failed
The importer python_importer indicated a failed response when uploading
python_package unit to repository python-test. Summary: 'expected string or
buffer'. Details: '{}'