Issue #8968
closed"'NoneType' object has no attribute 'delete'" during migration
Description
Backtrace:
"error"=> {"traceback"=> " File \"/usr/lib/python3.6/site-packages/rq/worker.py\", line 936, in perform_job\n" + " rv = job.perform()\n" + " File \"/usr/lib/python3.6/site-packages/rq/job.py\", line 684, in perform\n" + " self._result = self._execute()\n" + " File \"/usr/lib/python3.6/site-packages/rq/job.py\", line 690, in _execute\n" + " return self.func(*self.args, **self.kwargs)\n" + " File \"/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/tasks/migrate.py\", line 76, in migrate_from_pulp2\n" + " pre_migrate_all_without_content(plan)\n" + " File \"/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/pre_migration.py\", line 493, in pre_migrate_all_without_content\n" + " pre_migrate_importer(repo_id, importer_types)\n" + " File \"/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/pre_migration.py\", line 601, in pre_migrate_importer\n" + " importer.pulp3_remote.delete()\n", "description"=>"'NoneType' object has no attribute 'delete'"}, "worker"=>"/pulp/api/v3/workers/fc6ba1d6-ddc6-494d-9385-2368544a09ef/",
This happened on Katello 3.18.3 which uses:
pulp-2to3-migration (0.11.1) pulp-certguard (1.0.3) pulp-container (2.1.2) pulp-deb (2.7.0) pulp-file (1.3.0) pulp-rpm (3.10.0) pulpcore (3.7.6)
Related issues
Updated by iballou over 3 years ago
Related Katello community thread: https://community.theforeman.org/t/contentmigration-pulp2-to-pulp3-migration-fails/24136
Updated by iballou over 3 years ago
Running a migration reset fixed the issue for the user.
Updated by quba42 about 3 years ago
We have also hit this during internal integration tests. In our case the affected repo/importer appears to be SLES. Not sure if that helps. I will add more information if I find it.
Updated by quba42 about 3 years ago
I have decided to simply put a guard on the .delete() call on our internal branch.
Updated by quba42 almost 3 years ago
This fixed the problem for us: https://github.com/pulp/pulp-2to3-migration/pull/474
Added by quba42 almost 3 years ago
Added by quba42 almost 3 years ago
Revision b8892d7d | View on GitHub
Guard pulp3_remote from importer clearing
closes #8968 https://pulp.plan.io/issues/8968
We have hit the above issue while 2to3 migrating SLES importers. Apparently this is sometimes called for SLES importers that already have their pulp3_remote set to None, resulting in:
'NoneType' object has no attribute 'delete'
We did not perform any deeper analysis of why this is the case, but simply added this guard to fix the problem.
Added by quba42 almost 3 years ago
Revision b8892d7d | View on GitHub
Guard pulp3_remote from importer clearing
closes #8968 https://pulp.plan.io/issues/8968
We have hit the above issue while 2to3 migrating SLES importers. Apparently this is sometimes called for SLES importers that already have their pulp3_remote set to None, resulting in:
'NoneType' object has no attribute 'delete'
We did not perform any deeper analysis of why this is the case, but simply added this guard to fix the problem.
Updated by quba42 almost 3 years ago
- Status changed from NEW to MODIFIED
Applied in changeset pulp:pulp-2to3-migration|b8892d7d15317b5e46ef568bc6c2ccbddacb46b0.
Updated by ttereshc almost 3 years ago
- Copied to Backport #9612: Backport #8968 "'NoneType' object has no attribute 'delete'" during migration to 0.11.z added
Guard pulp3_remote from importer clearing
closes #8968 https://pulp.plan.io/issues/8968
We have hit the above issue while 2to3 migrating SLES importers. Apparently this is sometimes called for SLES importers that already have their pulp3_remote set to None, resulting in:
'NoneType' object has no attribute 'delete'
We did not perform any deeper analysis of why this is the case, but simply added this guard to fix the problem.