Project

Profile

Help

Issue #9616

Updated by ttereshc about 1 year ago

**Ticket moved Inspite of this issue, the migration may complete without errors, or else it may cause errors during repo publish as follows: 
 ``` 
 Traceback (most recent call last): 
 File "/usr/lib/python3.6/site-packages/rq/worker.py", line 936, in perform_job 
 rv = job.perform() 
 File "/usr/lib/python3.6/site-packages/rq/job.py", line 684, in perform 
 self._result = self._execute() 
 File "/usr/lib/python3.6/site-packages/rq/job.py", line 690, in _execute 
 return self.func(*self.args, **self.kwargs) 
 File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/migration.py", line 246, in complex_repo_migration 
 migrated_repo.pulp3_repository_version, signing_service 
 File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/migration.py", line 496, in migrate_repo_distributor 
 pulp2dist, repo_version, signing_service) 
 File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/deb/repository.py", line 80, in migrate_to_pulp3 
 signing_service_pk=signing_service_pk 
 File "/usr/lib/python3.6/site-packages/pulp_deb/app/tasks/publishing.py", line 168, in publish 
 prc.package 
 File "/usr/lib/python3.6/site-packages/pulp_deb/app/tasks/publishing.py", line 207, in add_package 
 self.package_index_files[package.architecture][0] 
 KeyError: 'amd64' 
 signing_service_pk=signing_service_pk 
 File "/usr/lib/python3.6/site-packages/pulp_deb/app/tasks/publishing.py", line 168, in publish 
 prc.package 
 File "/usr/lib/python3.6/site-packages/pulp_deb/app/tasks/publishing.py", line 207, in add_package 
 self.package_index_files[package.architecture][0] 
 KeyError: 'amd64' 
 ``` 
 Independently of whether the above error is thrown or not, the resulting Pulp3 repo versions may be missing a large part of the content needed for the "structured" publish mode. 
 The content needed for the pulp3_deb "simple" publish mode is never affected. 

 The issue can only occur if multiple Pulp2 repos being migrated have Releases or Components, with the same values for the uniqueness constraints of the corresponding Pulp3 types. (In Pulp2 the repo ID is part of the uniqueness constraints, whereas in Pulp3 there is for example just one Release that is simple added to GitHub**: "pulp/pulp-2to3-migration/issues/484": https://github.com/pulp/pulp-2to3-migration/issues/484 many repo versions). In such cases multiple Pulp2 units correspond to just one Pulp3 unit, and the migration will only add that Pulp3 unit to the repo versions corresponding to one of the original Pulp2 units (instead of all of them). 

 The fix appears to be for the affected deb 2to3 models to use the uniqueness constraints like the corresponding Pulp2 type rather than the corresponding Pulp3 type.

Back