Actions
Issue #1768
closedUnable to sync RHEL 5 repositories with a distribution
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
2.8.3
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 1
Quarter:
Description
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:
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'])
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 we need to carefully document which bits are there for backwards compatibility with RHEL 5. Furthermore, CentOS 7 doesn't seem to do what RHEL7 does with its treeinfo file.
Files
Related issues
Actions
The
Distribution
model no longer requiresvariant
This is very much a short-term workaround. The model has many problems and should be fixed in the near future.
closes #1768