Issue #2280
Updated by ttereshc over 8 years ago
Create and sync DRPM repo with `validate` option enabled for importer and the feed for which size verification of DRPMs will fail, for now it is https://repos.fedorapeople.org/pulp/pulp/fixtures/drpm/ Tested on Pulp 2.9.3. <pre> $ pulp-admin rpm repo create --repo-id drpm --feed https://repos.fedorapeople.org/pulp/pulp/fixtures/drpm/ --validate true </pre> Sync task will just succeed, in the logs there will be a traceback. <pre> $ pulp-admin rpm repo sync run --repo-id drpm +----------------------------------------------------------------------+ Synchronizing Repository [drpm] +----------------------------------------------------------------------+ This command may be exited via ctrl+c without affecting the request. Downloading metadata... [\] ... completed Downloading repository content... [-] [==================================================] 100% RPMs: 5/5 items Delta RPMs: 0/4 items ... completed Downloading distribution files... [==================================================] 100% Distributions: 0/0 items ... completed Importing errata... [-] ... completed Importing package groups/categories... [-] ... completed Cleaning duplicate packages... [-] ... completed Task Succeeded </pre> <pre> Sep 22 21:51:15 dev pulp[3891]: nectar.downloaders.base:ERROR: (3891-96512) 'DRPM' object has no attribute 'name' Sep 22 21:51:15 dev pulp[3891]: nectar.downloaders.base:ERROR: (3891-96512) Traceback (most recent call last): Sep 22 21:51:15 dev pulp[3891]: nectar.downloaders.base:ERROR: (3891-96512) File "/usr/lib/python2.7/site-packages/nectar/downloaders/base.py", line 145, in _fire_event_to_listener Sep 22 21:51:15 dev pulp[3891]: nectar.downloaders.base:ERROR: (3891-96512) event_listener_callback(*args, **kwargs) Sep 22 21:51:15 dev pulp[3891]: nectar.downloaders.base:ERROR: (3891-96512) File "/home/user1/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/listener.py", line 194, in download_succeeded Sep 22 21:51:15 dev pulp[3891]: nectar.downloaders.base:ERROR: (3891-96512) super(RPMListener, self).download_succeeded(report) Sep 22 21:51:15 dev pulp[3891]: nectar.downloaders.base:ERROR: (3891-96512) File "/home/user1/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/listener.py", line 81, in download_succeeded Sep 22 21:51:15 dev pulp[3891]: nectar.downloaders.base:ERROR: (3891-96512) self._verify_size(unit, report) Sep 22 21:51:15 dev pulp[3891]: nectar.downloaders.base:ERROR: (3891-96512) File "/home/user1/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/listener.py", line 120, in _verify_size Sep 22 21:51:15 dev pulp[3891]: nectar.downloaders.base:ERROR: (3891-96512) constants.NAME: unit.name, Sep 22 21:51:15 dev pulp[3891]: nectar.downloaders.base:ERROR: (3891-96512) AttributeError: 'DRPM' object has no attribute 'name' </pre> Expected result, example of the same error reporting for srpm: <pre> $ pulp-admin rpm repo sync run --repo-id srpm +----------------------------------------------------------------------+ Synchronizing Repository [srpm] +----------------------------------------------------------------------+ This command may be exited via ctrl+c without affecting the request. Downloading metadata... [\] ... completed Downloading repository content... [-] [==================================================] 100% RPMs: 3/3 items Delta RPMs: 0/0 items ... completed Individual package errors encountered during sync: Package: test-srpm01 Error: The size did not match the value specified in the repository metadata. Package: test-srpm03 Error: The size did not match the value specified in the repository metadata. Package: test-srpm02 Error: The size did not match the value specified in the repository metadata. Downloading distribution files... [==================================================] 100% Distributions: 0/0 items ... completed Importing errata... [-] ... completed Importing package groups/categories... [\] ... completed Cleaning duplicate packages... [-] ... completed Task Succeeded </pre> JFYI, the importer option `--validate` option is enabled by default in Katello https://github.com/Katello/katello/pull/4747/files