Project

Profile

Help

Issue #1957

Cannot upload content units

Added by Ichimonji10 over 5 years ago. Updated over 2 years ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Docker:
master
Platform Release:
Target Release - Docker:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

It should be possible to do the following:

1. Create a feed-less Docker repository.
2. Upload a content unit into the repository.

Unfortuately, step 2 fails for the current development version of Pulp 2.8.5. Specifically, Pulp encounters an exception when the client makes an HTTP POST call to {repository_path}/actions/import_upload/. Here's the task report a user sees:

>>> pprint(task_report)
{'_href': '/pulp/api/v2/tasks/42b2a548-f183-4f0b-ae7e-7d5be72b7c64/',
 '_id': {'$oid': '574d95e005d4fa4afde7c94f'},
 '_ns': 'task_status',
 'error': {'code': 'PLP0000',
           'data': {},
           'description': 'Pulp exception occurred: PulpExecutionException',
           'sub_errors': []},
 'exception': None,
 'finish_time': '2016-05-31T13:47:12Z',
 'id': '574d95e005d4fa4afde7c94f',
 'progress_report': {},
 'queue': 'reserved_resource_worker-21@pulp.example.com.dq',
 'result': None,
 'spawned_tasks': [],
 'start_time': '2016-05-31T13:47:12Z',
 'state': 'error',
 'tags': ['pulp:repository:b64b646f-8727-49c9-8186-0f7b7c26439a',
          'pulp:action:import_upload'],
 'task_id': '42b2a548-f183-4f0b-ae7e-7d5be72b7c64',
 'task_type': 'pulp.server.managers.content.upload.import_uploaded_unit',
 'traceback': '...',  # see below
 'worker_name': 'reserved_resource_worker-21@pulp.example.com'}
>>> print(task_report['traceback'])
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 473, in __call__
    return super(Task, self).__call__(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 103, in __call__
    return super(PulpTask, self).__call__(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/managers/content/upload.py", line 219, in import_uploaded_unit
    if not result['success_flag']:
PulpExecutionException: Pulp exception occurred: PulpExecutionException

Here's what journalctl -u 'pulp*' captures on the target Pulp system:

May 31 15:26:45 pulp.example.com pulp[16802]: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._queue_reserved_task[868ce09e-c8ee-48e0-bf96-7464ec5c3ff2]
May 31 15:26:45 pulp.example.com pulp[16816]: py.warnings:WARNING: (16816-44768) /usr/lib64/python2.7/site-packages/pymongo/topology.py:74: UserWarning: MongoClient opened before fork. Create MongoClient with connect=False, or create client after forking. See PyMongo's documentation for details: http://api.mongodb.org/python/current/faq.html#using-pymongo-with-multiprocessing>
May 31 15:26:45 pulp.example.com pulp[16816]: py.warnings:WARNING: (16816-44768)   "MongoClient opened before fork. Create MongoClient "
May 31 15:26:45 pulp.example.com pulp[16816]: py.warnings:WARNING: (16816-44768)
May 31 15:26:45 pulp.example.com pulp[16816]: py.warnings:WARNING: (16816-44768) /usr/lib/python2.7/site-packages/mongoengine/document.py:324: DeprecationWarning: save is deprecated. Use insert_one or replace_one instead
May 31 15:26:45 pulp.example.com pulp[16816]: py.warnings:WARNING: (16816-44768)   object_id = collection.save(doc, **write_concern)
May 31 15:26:45 pulp.example.com pulp[16816]: py.warnings:WARNING: (16816-44768)
May 31 15:26:45 pulp.example.com pulp[16816]: kombu.transport.qpid:INFO: Connected to qpid with SASL mechanism ANONYMOUS
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.strategy:INFO: Received task: pulp.server.managers.content.upload.import_uploaded_unit[5e105a62-38bf-4da1-beda-00f41e4cf9fd]
May 31 15:26:45 pulp.example.com pulp[16816]: py.warnings:WARNING: (16816-44768) /usr/lib/python2.7/site-packages/pulp/server/db/model/__init__.py:536: DeprecationWarning: update is deprecated. Use replace_one, update_one or update_many instead.
May 31 15:26:45 pulp.example.com pulp[16816]: py.warnings:WARNING: (16816-44768)   TaskStatus._get_collection().update({'task_id': task_id}, update, upsert=True)
May 31 15:26:45 pulp.example.com pulp[16816]: py.warnings:WARNING: (16816-44768)
May 31 15:26:45 pulp.example.com pulp[16683]: py.warnings:WARNING: (16683-70560) /usr/lib64/python2.7/site-packages/pymongo/topology.py:74: UserWarning: MongoClient opened before fork. Create MongoClient with connect=False, or create client after forking. See PyMongo's documentation for details: http://api.mongodb.org/python/current/faq.html#using-pymongo-with-multiprocessing>
May 31 15:26:45 pulp.example.com pulp[16683]: py.warnings:WARNING: (16683-70560)   "MongoClient opened before fork. Create MongoClient "
May 31 15:26:45 pulp.example.com pulp[16683]: py.warnings:WARNING: (16683-70560)
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._release_resource[e5fa5dd0-6f58-437a-bbf0-a892ac401dfe]
May 31 15:26:45 pulp.example.com pulp[16802]: celery.worker.job:INFO: Task pulp.server.async.tasks._queue_reserved_task[868ce09e-c8ee-48e0-bf96-7464ec5c3ff2] succeeded in 0.0708984470002s: None
May 31 15:26:45 pulp.example.com pulp[16683]: py.warnings:WARNING: (16683-70560) /usr/lib/python2.7/site-packages/mongoengine/queryset/base.py:461: DeprecationWarning: update is deprecated. Use replace_one, update_one or update_many instead.
May 31 15:26:45 pulp.example.com pulp[16683]: py.warnings:WARNING: (16683-70560)   upsert=upsert, **write_concern)
May 31 15:26:45 pulp.example.com pulp[16683]: py.warnings:WARNING: (16683-70560)
May 31 15:26:45 pulp.example.com pulp[16683]: py.warnings:WARNING: (16683-70560) /usr/lib/python2.7/site-packages/mongoengine/document.py:324: DeprecationWarning: save is deprecated. Use insert_one or replace_one instead
May 31 15:26:45 pulp.example.com pulp[16683]: py.warnings:WARNING: (16683-70560)   object_id = collection.save(doc, **write_concern)
May 31 15:26:45 pulp.example.com pulp[16683]: py.warnings:WARNING: (16683-70560)
May 31 15:26:45 pulp.example.com pulp[16683]: py.warnings:WARNING: (16683-70560) /usr/lib/python2.7/site-packages/mongoengine/document.py:367: DeprecationWarning: update is deprecated. Use replace_one, update_one or update_many instead.
May 31 15:26:45 pulp.example.com pulp[16683]: py.warnings:WARNING: (16683-70560)   upsert=upsert, **write_concern)
May 31 15:26:45 pulp.example.com pulp[16683]: py.warnings:WARNING: (16683-70560)
May 31 15:26:45 pulp.example.com pulp[16683]: pulp.server.managers.content.upload:ERROR: (16683-70560) Error from the importer while importing uploaded unit to repository [1df9ad86-1ecb-425b-99a1-d31cf4468928]
May 31 15:26:45 pulp.example.com pulp[16683]: pulp.server.managers.content.upload:ERROR: (16683-70560) Traceback (most recent call last):
May 31 15:26:45 pulp.example.com pulp[16683]: pulp.server.managers.content.upload:ERROR: (16683-70560)   File "/usr/lib/python2.7/site-packages/pulp/server/managers/content/upload.py", line 219, in import_uploaded_unit
May 31 15:26:45 pulp.example.com pulp[16683]: pulp.server.managers.content.upload:ERROR: (16683-70560)     if not result['success_flag']:
May 31 15:26:45 pulp.example.com pulp[16683]: pulp.server.managers.content.upload:ERROR: (16683-70560) TypeError: 'NoneType' object has no attribute '__getitem__'
May 31 15:26:45 pulp.example.com pulp[16683]: pulp.server.async.tasks:INFO: Task failed : [5e105a62-38bf-4da1-beda-00f41e4cf9fd]
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560) Task pulp.server.managers.content.upload.import_uploaded_unit[5e105a62-38bf-4da1-beda-00f41e4cf9fd] raised unexpected: PulpExecutionException(TypeError("'NoneType' object has no attribute '__getitem__'",),)
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560) Traceback (most recent call last):
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560)     R = retval = fun(*args, **kwargs)
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 473, in __call__
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560)     return super(Task, self).__call__(*args, **kwargs)
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 103, in __call__
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560)     return super(PulpTask, self).__call__(*args, **kwargs)
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560)     return self.run(*args, **kwargs)
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560)   File "/usr/lib/python2.7/site-packages/pulp/server/managers/content/upload.py", line 219, in import_uploaded_unit
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560)     if not result['success_flag']:
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:ERROR: (16393-70560) PulpExecutionException: Pulp exception occurred: PulpExecutionException
May 31 15:26:45 pulp.example.com pulp[16393]: celery.worker.job:INFO: Task pulp.server.async.tasks._release_resource[e5fa5dd0-6f58-437a-bbf0-a892ac401dfe] succeeded in 0.00625120099994s: None

Here's the packages installed on the system:

$ rpm  -qa | grep pulp | sort
pulp-admin-client-2.8.5-0.1.beta.git.1.a66230b.el7.noarch
pulp-docker-admin-extensions-2.0.3-0.1.beta.git.1.407dce5.el7.noarch
pulp-docker-plugins-2.0.3-0.1.beta.git.1.407dce5.el7.noarch
pulp-ostree-admin-extensions-1.1.1-1.el7.noarch
pulp-ostree-plugins-1.1.1-1.el7.noarch
pulp-puppet-admin-extensions-2.8.5-0.1.beta.git.1.96c7094.el7.noarch
pulp-puppet-plugins-2.8.5-0.1.beta.git.1.96c7094.el7.noarch
pulp-python-admin-extensions-1.1.1-1.el7.noarch
pulp-python-plugins-1.1.1-1.el7.noarch
pulp-rpm-admin-extensions-2.8.5-0.1.beta.git.1.8ef8038.el7.noarch
pulp-rpm-plugins-2.8.5-0.1.beta.git.1.8ef8038.el7.noarch
pulp-selinux-2.8.5-0.1.beta.git.1.a66230b.el7.noarch
pulp-server-2.8.5-0.1.beta.git.1.a66230b.el7.noarch
python-isodate-0.5.0-4.pulp.el7.noarch
python-kombu-3.0.33-5.pulp.el7.noarch
python-pulp-bindings-2.8.5-0.1.beta.git.1.a66230b.el7.noarch
python-pulp-client-lib-2.8.5-0.1.beta.git.1.a66230b.el7.noarch
python-pulp-common-2.8.5-0.1.beta.git.1.a66230b.el7.noarch
python-pulp-docker-common-2.0.3-0.1.beta.git.1.407dce5.el7.noarch
python-pulp-oid_validation-2.8.5-0.1.beta.git.1.a66230b.el7.noarch
python-pulp-ostree-common-1.1.1-1.el7.noarch
python-pulp-puppet-common-2.8.5-0.1.beta.git.1.96c7094.el7.noarch
python-pulp-python-common-1.1.1-1.el7.noarch
python-pulp-repoauth-2.8.5-0.1.beta.git.1.a66230b.el7.noarch
python-pulp-rpm-common-2.8.5-0.1.beta.git.1.8ef8038.el7.noarch
python-pulp-streamer-2.8.5-0.1.beta.git.1.a66230b.el7.noarch

This issue has been reproduced on Fedora 22, Fedora 23, RHEL 6 and RHEL 7.

History

#1 Updated by Ichimonji10 over 5 years ago

To reproduce this issue with Pulp Smash:

python -m unittest2 pulp_smash.tests.docker.api_v2.test_duplicate_uploads

#2 Updated by Ichimonji10 over 5 years ago

  • Status changed from NEW to CLOSED - WORKSFORME

This issue was not present in the most recent Jenkins test run. Closing. We can re-open this issue if appropriate.

#3 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF