Issue #1768
Updated by jcline@redhat.com over 8 years ago
To reproduce: # create a repo with a feed to https://cdn.redhat.com/content/dist/rhel/server/5/5.10/x86_64/kickstart/ or one of its mirrors (lazy or non-lazy, either are fine) # Sync it It fails to sync the distribution with: <pre> pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) ValidationError (Distribution:012649b5-c46a-4114-9f03-2948b070e360) (Field is required: ['variant']) pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) Traceback (most recent call last): pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/sync.py", line 228, in run pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) dist_sync.run() pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/parse/treeinfo.py", line 125, in run pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) self._run(tmp_dir) pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/importers/yum/parse/treeinfo.py", line 179, in _run pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) unit.save() pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) File "/usr/lib/python2.7/site-packages/mongoengine/document.py", line 304, in save pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) self.validate(clean=clean) pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) File "/usr/lib/python2.7/site-packages/mongoengine/base/document.py", line 413, in validate pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) raise ValidationError(message, errors=errors) pulp_rpm.plugins.importers.yum.sync:ERROR: (9072-64128) ValidationError: ValidationError (Distribution:012649b5-c46a-4114-9f03-2948b070e360) (Field is required: ['variant']) </pre> The reason for this is RHEL5 uses an older format for its treeinfo files, but our model does not handle it gracefully. The current format for these treeinfo files can be found here: http://release-engineering.github.io/productmd/treeinfo-1.0.html We need to make our distribution tree model more flexible and It is likely this is something we need cannot ask RCM to carefully document which bits are there just recreate for backwards compatibility us with RHEL 5. Furthermore, CentOS 7 doesn't seem to do what RHEL7 does an updated treeinfo since the version of Anaconda that uses the RHEL5 treeinfo file likely won't deal with its treeinfo file. that well, but it may be worth investigating.