Actions
Issue #4309
closedVendor field migration fails with 'NoneType' object has no attribute 'text'
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.18.1
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 47
Quarter:
Description
Beginning database migrations.
Loading unit model: modulemd_defaults = pulp_rpm.plugins.db.models:ModulemdDefaults
Loading unit model: erratum = pulp_rpm.plugins.db.models:Errata
Loading unit model: distribution = pulp_rpm.plugins.db.models:Distribution
Loading unit model: srpm = pulp_rpm.plugins.db.models:SRPM
Loading unit model: package_group = pulp_rpm.plugins.db.models:PackageGroup
Loading unit model: package_category = pulp_rpm.plugins.db.models:PackageCategory
Loading unit model: iso = pulp_rpm.plugins.db.models:ISO
Loading unit model: package_environment = pulp_rpm.plugins.db.models:PackageEnvironment
Loading unit model: drpm = pulp_rpm.plugins.db.models:DRPM
Loading unit model: package_langpacks = pulp_rpm.plugins.db.models:PackageLangpacks
Loading unit model: modulemd = pulp_rpm.plugins.db.models:Modulemd
Loading unit model: rpm = pulp_rpm.plugins.db.models:RPM
Loading unit model: yum_repo_metadata_file = pulp_rpm.plugins.db.models:YumMetadataFile
Loading auxiliary model: erratum_pkglists = pulp_rpm.plugins.db.models:ErratumPkglist
Migration package pulp.server.db.migrations is up to date at version 29
Applying pulp_rpm.plugins.migrations version 45
*******************************************************************************
* Migrating RPM content...
*******************************************************************************
Applying migration pulp_rpm.plugins.migrations.0045_populate_vendor failed.
Halting migrations due to a migration failure.
'NoneType' object has no attribute 'text'
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/0045_populate_vendor.py", line 65, in migrate
migrate_rpm(rpm_collection, rpm)
File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/migrations/0045_populate_vendor.py", line 41, in migrate_rpm
'./common:package/common:format/rpm:vendor', _NAMESPACES
AttributeError: 'NoneType' object has no attribute 'text'
Actions
Fix migration for cases in which no vendor field is provided
Fixes an error when the primary.xml.gz metadata doesn't provide a vendor field.
closes #4309 https://pulp.plan.io/issues/4309