Project

Profile

Help

Issue #1735

Downloading the CentOS base repository fails with lazy and --verify-all

Added by jcline@redhat.com over 4 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.8.1
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Trying to download the CentOS 7 base repository after it has been synced with `on_demand` results in

celery.worker.job:ERROR: (11904-06560) Task pulp.server.controllers.repository.download_repo[ce48455d-3b49-4685-9916-89001d8fdd15] raised unexpected: AttributeError("'PackageCategory' object has no attribute 'list_files'",)
celery.worker.job:ERROR: (11904-06560) Traceback (most recent call last):
celery.worker.job:ERROR: (11904-06560)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
celery.worker.job:ERROR: (11904-06560)     R = retval = fun(*args, **kwargs)
celery.worker.job:ERROR: (11904-06560)   File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 473, in __call__
celery.worker.job:ERROR: (11904-06560)     return super(Task, self).__call__(*args, **kwargs)
celery.worker.job:ERROR: (11904-06560)   File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 103, in __call__
celery.worker.job:ERROR: (11904-06560)     return super(PulpTask, self).__call__(*args, **kwargs)
celery.worker.job:ERROR: (11904-06560)   File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
celery.worker.job:ERROR: (11904-06560)     return self.run(*args, **kwargs)
celery.worker.job:ERROR: (11904-06560)   File "/home/vagrant/devel/pulp/server/pulp/server/controllers/repository.py", line 1184, in download_repo
celery.worker.job:ERROR: (11904-06560)     download_requests = _create_download_requests(missing_content_units)
celery.worker.job:ERROR: (11904-06560)   File "/home/vagrant/devel/pulp/server/pulp/server/controllers/repository.py", line 1238, in _create_download_requests
celery.worker.job:ERROR: (11904-06560)     for file_path in content_unit.list_files():
celery.worker.job:ERROR: (11904-06560) AttributeError: 'PackageCategory' object has no attribute 'list_files'

To reproduce:

  1. pulp-admin rpm repo create --repo-id=centos7 --download-policy=on_demand --serve-http=true --feed=http://ftp.linux.ncsu.edu/pub/CentOS/7/os/x86_64/
  2. pulp-admin rpm repo sync run --repo-id=centos7
  3. pulp-admin repo download --repo-id=centos7 --verify-all

Associated revisions

Revision 2d11de36 View on GitHub
Added by Jeremy Cline over 4 years ago

Move list_files() from FileContentUnit to ContentUnit.

Move the list_files() method definition to ContentUnit. This is convenient when receiving a list of ContentUnit derivatives that may or may not have inherited from FileContentUnit. The default implementation on ContentUnit returns an empty list unless _storage_path is defined, so a user can call list_files on any ContentUnit subclass when dealing with content files.

closes #1735

Revision 2d11de36 View on GitHub
Added by Jeremy Cline over 4 years ago

Move list_files() from FileContentUnit to ContentUnit.

Move the list_files() method definition to ContentUnit. This is convenient when receiving a list of ContentUnit derivatives that may or may not have inherited from FileContentUnit. The default implementation on ContentUnit returns an empty list unless _storage_path is defined, so a user can call list_files on any ContentUnit subclass when dealing with content files.

closes #1735

History

#1 Updated by jcline@redhat.com over 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jcline@redhat.com

#3 Updated by Anonymous over 4 years ago

  • Status changed from ASSIGNED to MODIFIED
  • % Done changed from 0 to 100

#4 Updated by jcline@redhat.com over 4 years ago

  • Platform Release set to 2.8.1
  • Triaged changed from No to Yes

#5 Updated by dkliban@redhat.com over 4 years ago

  • Status changed from MODIFIED to 5

#6 Updated by semyers over 4 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#7 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF