Project

Profile

Help

Issue #1648

closed

v1 upload fails with AttributeError: 'Repository' object has no attribute 'repo_obj'

Added by rbarlow about 8 years ago. Updated about 5 years ago.

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

Description

While reviewing the recipes, I found that the v1 upload now fails:

(pulp_docker)[vagrant@dev docs]$ sudo docker pull busybox
(pulp_docker)[vagrant@dev docs]$ sudo docker save busybox > busybox.tar
(pulp_docker)[vagrant@dev docs]$ pulp-admin docker repo create --repo-id=busybox
Repository [busybox] successfully created

(pulp_docker)[vagrant@dev docs]$ pulp-admin docker repo uploads upload --repo-id=busybox -f busybox.tar
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: busybox.tar
... completed

Creating upload requests on the server...
[==================================================] 100%
Initializing: busybox.tar
... completed

Starting upload of selected units. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
canceled entirely using the cancel command.

Uploading: busybox.tar
[==================================================] 100%
1323008/1323008 bytes
... completed

Importing into the repository...
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Task Failed

Pulp exception occurred: PulpExecutionException

Deleting the upload request...
... completed

From the logs:

Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872) Error from the importer while importing uploaded unit to repository [busybox]
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872) Traceback (most recent call last):
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872)   File "/home/vagrant/devel/pulp/server/pulp/server/managers/content/upload.py", line 209, in import_uploaded_unit
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872)     unit_metadata, file_path, conduit, call_config)
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872)   File "/home/vagrant/devel/pulp_docker/plugins/pulp_docker/plugins/importers/importer.py", line 132, in upload_unit
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872)     upload_step.process_lifecycle()
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 562, in process_lifecycle
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872)     super(PluginStep, self).process_lifecycle()
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 159, in process_lifecycle
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872)     step.process()
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 256, in process
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872)     self.finalize()
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 1168, in finalize
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872)     repo_controller.rebuild_content_unit_counts(self.get_repo().repo_obj)
Feb 09 18:09:34 dev pulp[7094]: pulp.server.managers.content.upload:ERROR: (7094-75872) AttributeError: 'Repository' object has no attribute 'repo_obj'
Feb 09 18:09:34 dev pulp[7094]: pulp.server.async.tasks:INFO: Task failed : [f2a70110-3359-4497-a53f-1110fa6afdb8]
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872) Task pulp.server.managers.content.upload.import_uploaded_unit[f2a70110-3359-4497-a53f-1110fa6afdb8] raised unexpected: PulpExecutionException(AttributeError("'Repository' object has no attribute 'repo_obj'",),)
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872) Traceback (most recent call last):
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)     R = retval = fun(*args, **kwargs)
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)   File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 473, in __call__
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)     return super(Task, self).__call__(*args, **kwargs)
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)   File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 103, in __call__
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)     return super(PulpTask, self).__call__(*args, **kwargs)
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)     return self.run(*args, **kwargs)
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)   File "/home/vagrant/devel/pulp/server/pulp/server/managers/content/upload.py", line 209, in import_uploaded_unit
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)     unit_metadata, file_path, conduit, call_config)
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)   File "/home/vagrant/devel/pulp_docker/plugins/pulp_docker/plugins/importers/importer.py", line 132, in upload_unit
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)     upload_step.process_lifecycle()
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 562, in process_lifecycle
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)     super(PluginStep, self).process_lifecycle()
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 159, in process_lifecycle
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)     step.process()
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 256, in process
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)     self.finalize()
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 1168, in finalize
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872)     repo_controller.rebuild_content_unit_counts(self.get_repo().repo_obj)
Feb 09 18:09:34 dev pulp[6811]: celery.worker.job:ERROR: (6811-75872) PulpExecutionException: Pulp exception occurred: PulpExecutionException

This is a regression from Docker 1.x.


Related issues

Blocks Docker Support - Issue #1650: Uploading a v1 Docker Image causes AttributeError: 'UploadStep' object has no attribute 'v1_tags'CLOSED - CURRENTRELEASEpcreechActions

Also available in: Atom PDF