Project

Profile

Help

Issue #7562

closed

Migration of lazy multi-artifact content not present in a repository in the plan fails

Added by dalley over 3 years ago. Updated over 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Using the latest version of all code:

  • lazily sync both the centos7 repository and some other repository
  • migrate only the second repository

Result: Failure

The direct cause is that there is no Remote being migrated for these content, so we can't make the DeclarativeArtifacts when attempting to migrate the content. I think the standard codepath handles this, but the multi-artifact codepath does not, and so it fails with distribution tree content.

https://github.com/pulp/pulp-2to3-migration/blob/master/pulp_2to3_migration/app/plugin/content.py#L313-L321

Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: File "/home/vagrant/devel/pulp-2to3-migration/pulp_2to3_migration/app/tasks/migrate.py", line 141, in migrate_from_pulp2
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: migrate_content(plan)
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: File "/home/vagrant/devel/pulp-2to3-migration/pulp_2to3_migration/app/migration.py", line 36, in migrate_content
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: plugin.migrator.migrate_content_to_pulp3()
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: File "/home/vagrant/devel/pulp-2to3-migration/pulp_2to3_migration/app/plugin/rpm/migrator.py", line 139, in migrate_content_to_pulp3
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: loop.run_until_complete(dm.create())
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: return future.result()
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: File "/home/vagrant/devel/pulp-2to3-migration/pulp_2to3_migration/app/plugin/content.py", line 86, in create
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: await pipeline
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: File "/home/vagrant/devel/pulpcore/pulpcore/plugin/stages/api.py", line 225, in create_pipeline
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: await asyncio.gather(*futures)
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: File "/home/vagrant/devel/pulpcore/pulpcore/plugin/stages/api.py", line 43, in __call__
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: await self.run()
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: File "/home/vagrant/devel/pulp-2to3-migration/pulp_2to3_migration/app/plugin/content.py", line 191, in run
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: self.migrate_to_pulp3(cmodel, ctype)
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: File "/home/vagrant/devel/pulp-2to3-migration/pulp_2to3_migration/app/plugin/content.py", line 321, in migrate_to_pulp3
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: deferred_download=not downloaded)
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: File "/home/vagrant/devel/pulpcore/pulpcore/plugin/stages/models.py", line 57, in __init__
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: "DeclarativeArtifact must have a 'remote' if the Artifact doesn't "
Sep 23 19:00:27 pulp2-nightly-pulp3-source-centos7.localhost.example.com rq[24031]: ValueError: DeclarativeArtifact must have a 'remote' if the Artifact doesn't have a file backing it.

Also available in: Atom PDF