Issue #5551
closedImporter config can't be null
Description
I'm on commit 0c7bbf000e55af5ff4c0d9266427476675e409ab of pulp-2to3-migration
I'm creating a migration plan of: {"plan":{"plugins":[{"type":"iso"}]}}
But when i run it, i get an error of:
Oct 7 16:41:49 devel2 rq: await pre_migrate_importer(repo, importers)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/src/pulp/pulp_2to3_migration/app/pre_migration.py", line 326, in pre_migrate_importer
Oct 7 16:41:49 devel2 rq: 'is_migrated': False})
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
Oct 7 16:41:49 devel2 rq: return getattr(self.get_queryset(), name)(*args, **kwargs)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py", line 559, in update_or_create
Oct 7 16:41:49 devel2 rq: obj, created = self._create_object_from_params(kwargs, params, lock=True)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py", line 583, in _create_object_from_params
Oct 7 16:41:49 devel2 rq: raise e
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py", line 575, in _create_object_from_params
Oct 7 16:41:49 devel2 rq: obj = self.create(**params)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py", line 422, in create
Oct 7 16:41:49 devel2 rq: obj.save(force_insert=True, using=self.db)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py", line 741, in save
Oct 7 16:41:49 devel2 rq: force_update=force_update, update_fields=update_fields)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py", line 779, in save_base
Oct 7 16:41:49 devel2 rq: force_update, using, update_fields,
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py", line 870, in _save_table
Oct 7 16:41:49 devel2 rq: result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py", line 908, in _do_insert
Oct 7 16:41:49 devel2 rq: using=using, raw=raw)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
Oct 7 16:41:49 devel2 rq: return getattr(self.get_queryset(), name)(*args, **kwargs)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/query.py", line 1186, in _insert
Oct 7 16:41:49 devel2 rq: return query.get_compiler(using=using).execute_sql(return_id)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/sql/compiler.py", line 1335, in execute_sql
Oct 7 16:41:49 devel2 rq: cursor.execute(sql, params)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py", line 67, in execute
Oct 7 16:41:49 devel2 rq: return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
Oct 7 16:41:49 devel2 rq: return executor(sql, params, many, context)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
Oct 7 16:41:49 devel2 rq: return self.cursor.execute(sql, params)
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/utils.py", line 89, in __exit__
Oct 7 16:41:49 devel2 rq: raise dj_exc_value.with_traceback(traceback) from exc_value
Oct 7 16:41:49 devel2 rq: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
Oct 7 16:41:49 devel2 rq: return self.cursor.execute(sql, params)
Oct 7 16:41:49 devel2 rq: django.db.utils.IntegrityError: null value in column "pulp2_config" violates not-null constraint
Oct 7 16:41:49 devel2 rq: DETAIL: Failing row contains (8abf5b8a-37f8-4be2-8d19-36b6148e040c, 2019-10-07 16:41:49.397986+00, 2019-10-07 16:41:49.398007+00, 5d8037efb3798907c1527b6a, yum_importer, null, 2019-09-17 01:43:14.765+00, f, c5ec015c-8d22-449c-93f0-d534a05f8402, null).
Looking at postgres logs, i see:
STATEMENT: INSERT INTO "pulp_2to3_migration_pulp2importer" ("_id", "_created", "_last_updated", "pulp2_object_id", "pulp2_type_id", "pulp2_config", "pulp2_last_updated", "is_migrated", "pulp2_repository_id", "pulp3_remote_id") VALUES ('d46d7d05-aa36-441d-aa97-0057ee7d085e'::uuid, '2019-10-07T21:16:45.541855+00:00'::timestamptz, '2019-10-07T21:16:45.541889+00:00'::timestamptz, '5d8037efb3798907c1527b6a', 'yum_importer', NULL, '2019-09-17T01:43:14.765000+00:00'::timestamptz, false, '0d82ec8f-8cef-4902-b946-ea74cbb4ff09'::uuid, NULL)
(note the sql was from a different run than the traceback). The weird parts, i didn't request any importer migration, nor did i request anything yum related.
Updated by ttereshc about 5 years ago
There are multiple issues here:
- pulp_config can't be null (it's a bug, let's solve it as a part of this ticket)
- all importers are migrated irrespective of plugins specified in a migration plan (I filed a separate ticket for that #5552)
- migration plan is not taken into account - this should be done soon, there is a story #5450 and "a WIP PR": https://github.com/pulp/pulp-2to3-migration/pull/28/ for that. Currently it's hardcoded to migrate everything related to ISO plugin, right now it includes repositories (no content associated), importers and content (both downloaded and on_demand).
Updated by ttereshc about 5 years ago
- Copied to Issue #5552: All importers are migrated even for the plugins not specified for migraiton added
Updated by ttereshc about 5 years ago
- Copied to deleted (Issue #5552: All importers are migrated even for the plugins not specified for migraiton)
Updated by ttereshc about 5 years ago
- Subject changed from can't run pulp2 to 3 migration to Importer config can't be null
- Tags Pulp 2 to 3 Migrate added
- Tags deleted (
Katello-P1)
Updated by ttereshc about 5 years ago
- Status changed from NEW to POST
- Assignee set to ttereshc
- Sprint set to Sprint 60
Added by ttereshc about 5 years ago
Added by ttereshc about 5 years ago
Revision 08a3f852 | View on GitHub
Don't migrate importers/distributors with an empty config
There is nothing to migrate to Pulp3 in this case.
Added by ttereshc about 5 years ago
Revision 08a3f852 | View on GitHub
Don't migrate importers/distributors with an empty config
There is nothing to migrate to Pulp3 in this case.
Updated by ttereshc about 5 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp-2to3-migration|08a3f8524772fc25981d8c438c34e03d9dbe425a.
Updated by ttereshc about 5 years ago
Applied in changeset commit:pulp-2to3-migrate|08a3f8524772fc25981d8c438c34e03d9dbe425a.
Updated by ttereshc almost 5 years ago
- Project changed from Pulp to Migration Plugin
Updated by ttereshc over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
- Sprint/Milestone set to 0.1.0
Updated by bmbouter over 4 years ago
- Tags deleted (
Pulp 2 to 3 Migrate)
We're removing the 'Pulp 2 to 3 Migrate' tag to allow membership of the Migration Plugin project in Redmine to be the controlling area https://pulp.plan.io/projects/migration
Don't migrate importers/distributors with an empty config
There is nothing to migrate to Pulp3 in this case.
closes #5551 https://pulp.plan.io/issues/5551