Issue #2505
closedGetting an incorrect exception when trying to sync a local repo with bad permissions
Description
Here's the error I am seeing:
Dec 22 15:14:53 dev.example.com pulp[10582]: pulp_rpm.plugins.importers.yum.repomd.alternate:INFO: The content container reported: {'downloads': {'___/primary/___': {'total_failed': 1, 'total_succeeded': 0}},
'total_sources': 0} for base URL: file:///home/vagrant/zoolander/
Dec 22 15:14:53 dev.example.com pulp[10582]: pulp_rpm.plugins.importers.yum.sync:ERROR: (10582-05184) 'error_code'
Dec 22 15:14:53 dev.example.com pulp[10582]: pulp_rpm.plugins.importers.yum.sync:ERROR: (10582-05184) Traceback (most recent call last):
Dec 22 15:14:53 dev.example.com pulp[10582]: pulp_rpm.plugins.importers.yum.sync:ERROR: (10582-05184) File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/sync.py", line 268, in run
Dec 22 15:14:53 dev.example.com pulp[10582]: pulp_rpm.plugins.importers.yum.sync:ERROR: (10582-05184) self.update_content(metadata_files, url)
Dec 22 15:14:53 dev.example.com pulp[10582]: pulp_rpm.plugins.importers.yum.sync:ERROR: (10582-05184) File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/sync.py", line 553, in update_c
ontent
Dec 22 15:14:53 dev.example.com pulp[10582]: pulp_rpm.plugins.importers.yum.sync:ERROR: (10582-05184) if error[constants.ERROR_CODE] == constants.ERROR_KEY_ID_FILTER:
Dec 22 15:14:53 dev.example.com pulp[10582]: pulp_rpm.plugins.importers.yum.sync:ERROR: (10582-05184) KeyError: 'error_code'
Dec 22 15:14:53 dev.example.com pulp[10582]: pulp.server.async.tasks:INFO: Task failed : [d354cd87-1de3-4f49-9e43-3eafc68d41c3]
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) Task pulp.server.managers.repo.sync.sync[d354cd87-1de3-4f49-9e43-3eafc68d41c3] raised unexpected: PulpExecutionException('Imp
orter indicated a failed response',)
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) Traceback (most recent call last):
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) R = retval = fun(*args, **kwargs)
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 498, in __call__
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) return super(Task, self).__call__(*args, **kwargs)
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 105, in __call__
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) return super(PulpTask, self).__call__(*args, **kwargs)
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) return self.run(*args, **kwargs)
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) File "/home/vagrant/devel/pulp/server/pulp/server/controllers/repository.py", line 816, in sync
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) raise pulp_exceptions.PulpExecutionException(_('Importer indicated a failed response'))
Dec 22 15:14:54 dev.example.com pulp[10424]: celery.worker.job:ERROR: (10424-05184) PulpExecutionException: Importer indicated a failed response
Steps to recreate:¶
1. Create a local repo
2. chmod 700 one of the files
3. Try to sync the repo
CLI steps:
mkdir zoolander
cd zoolander
wget https://davidd.fedorapeople.org/repos/zoo-lander/cat-1.0-1.noarch.rpm
wget https://davidd.fedorapeople.org/repos/zoo-lander/camel-0.1-1.noarch.rpm
wget https://davidd.fedorapeople.org/repos/zoo-lander/bear-4.1-1.noarch.rpm
createrepo .
chmod 777 *
sudo chown root bear-4.1-1.noarch.rpm
sudo chmod 000 bear-4.1-1.noarch.rpm
pulp-admin rpm repo create --repo-id zoolander --feed file://`pwd`
pulp-admin rpm repo sync run --repo-id zoolander
Here's the link to where the error is occuring:
Here's what error looks like:
{'url': u'file:///home/vagrant/zoolander/cat-1.0-1.noarch.rpm', 'errors': ["[Errno 13] Permission denied: u'///home/vagrant/zoolander/cat-1.0-1.noarch.rpm'"]}
Updated by daviddavis over 7 years ago
- Project changed from Nectar to RPM Support
Updated by daviddavis over 7 years ago
- Subject changed from Improperly handled error in yum importer for permission denied to local file to Improperly handled permission denied error in yum importer
Updated by daviddavis about 7 years ago
- Subject changed from Improperly handled permission denied error in yum importer to Getting an incorrect exception when trying to sync a local repo with bad permissions
Updated by bizhang about 7 years ago
- Severity changed from 2. Medium to 1. Low
- Triaged changed from No to Yes
Updated by dalley about 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to dalley
- Priority changed from Normal to Low
Updated by dalley about 7 years ago
- Status changed from ASSIGNED to NEW
- Assignee deleted (
dalley)
Updated by daviddavis about 7 years ago
Note that my steps to reproduce don't work. I also had to change owner on the bear package:
sudo chown root bear-4.1-1.noarch.rpm
sudo chmod 000 bear-4.1-1.noarch.rpm # for good measure
Updated by dalley about 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to dalley
Updated by jortel@redhat.com about 7 years ago
The downloading support planned for pulp3 currently will result in a 403 which should be dealt with appropriately by the rpm importer. So, I don't think there is any need for a pulp3 story on this.
Updated by dalley about 7 years ago
- Status changed from ASSIGNED to POST
Added by dalley about 7 years ago
Updated by dalley about 7 years ago
- Status changed from POST to MODIFIED
Applied in changeset 3678b31298b7532ca949d9b50905fc1cdd3aa76a.
Updated by semyers about 7 years ago
- Platform Release set to 2.12.2
The POSTed pull request was not the commit that was merged. Despite showing as "closed" on github, the commit related to https://github.com/pulp/pulp_rpm/pull/1023/commits is present on 2.12-dev and master.
Updated by bizhang almost 7 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Fixes KeyError when Nectar download fails.
Pulp RPM is doing some wonky stuff with error reporting. It's set up to accept errors in a particular format which Nectar does not abide by. This causes a KeyError when Nectar encounters a download failure, because one of the fields it expects to find does not exist.
closes #2505