Issue #4741
Updated by ttereshc over 5 years ago
The error is seen for repos with f26 content, those repos don't exist any more: http://modularity.fedorainfracloud.org/modularity/compat/fedora-os-stream/ http://modularity.fedorainfracloud.org/modularity/compat/fedora-modular/ <pre> ValidationError (Modulemd:938e503c-9913-48e0-8ebd-c68791db80d0) (Field is required: ['context']) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 239, in main return _auto_manage_db(options) File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 306, in _auto_manage_db migrate_database(options) File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 135, in migrate_database update_current_version=not options.test) File "/usr/lib/python2.7/site-packages/pulp/server/db/migrate/models.py", line 189, in apply_migration migration.migrate() File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/migrations/0500_upstream_0043_add_modulemd_modulemd-defaults.py", line 343, in migrate add_modulemds(repository, modulemds, working_dir) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/migrations/0500_upstream_0043_add_modulemd_modulemd-defaults.py", line 218, in add_modulemds add_modulemd(repository, modulemd, model, working_dir) File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/migrations/0500_upstream_0043_add_modulemd_modulemd-defaults.py", line 164, in add_modulemd model.save_and_import_content(path) File "/usr/lib/python2.7/site-packages/pulp/server/db/model/__init__.py", line 921, in save_and_import_content self.save() File "/usr/lib/python2.7/site-packages/mongoengine/document.py", line 304, in save self.validate(clean=clean) File "/usr/lib/python2.7/site-packages/mongoengine/base/document.py", line 413, in validate raise ValidationError(message, errors=errors) ValidationError: ValidationError (Modulemd:938e503c-9913-48e0-8ebd-c68791db80d0) (Field is required: ['context']) </pre> Modules in those repos have no @context@ which is a part of unit_key for a modulemd content so it cant' be imported into Pulp. Possible solutions: * - provide list of content for user to manually remove before migration * - skip this broken content and proceeding with migration * skipping it will mean that this content will be removed from a repo and become orphaned. * - anything else? I'm hesitant to keep mad modules.yaml files as unparsed yum_repo_metadata_file content for consistency reasons. No data how many users might be affected. Hopefully not many since this issue didn't blow up earlier.