Project

Profile

Help

Issue #8686

Migrating one plugin removes publications/distributions of others.

Added by ttereshc 9 days ago. Updated 8 days ago.

Status:
NEW
Priority:
High
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

To reproduce:

  • have iso and rpm repos in pulp2
  • migrate one plugin
  • then migrate another plugin

Observe that content app shows only repositories of the last migrated plugin.

Not sure when it was introduced but it was not this way right from the start. As a part of the fix, there should be a test added to check that scenario.

Repositories and content are not removed, so the workaround is to publish all repositories of the first migrated plugin.

History

#1 Updated by ggainey 9 days ago

With a not-latest migration, pulp_file, and pulp_rpm, I was getting the following error at migration:

May 03 19:16:42 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com rq[29529]: ValueError: Cannot assign "<FileDistribution: 60904a369119923276d5850e-iso>": "Pulp2Distributor.pulp3_distribution" must be a "BaseDistribution" instance.

Once I updated all my repos, I was able migrate ISO followed by migrating RPM, and the repos were both served by the content-app.

Output of my experiment-run below.

(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ pulp-admin rpm repo list
+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  rpm
Display Name:        None
Description:         None
Content Unit Counts: 
  Erratum:           4
  Package Category:  1
  Package Group:     2
  Package Langpacks: 1
  Rpm:               35


(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ pulp-admin iso repo list
+----------------------------------------------------------------------+
                            ISO Repositories
+----------------------------------------------------------------------+

Id:                  iso
Display Name:        None
Description:         None
Content Unit Counts: 
  Iso: 3

(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ http :/pulp/content/

        <!DOCTYPE html>
        <html>
            <body>
                <ul>             
                </ul>
            </body>
        </html>
        
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ pulp migration plan create --plan '{"plugins": [{"type": "iso"}]}'
{
  "pulp_href": "/pulp/api/v3/migration-plans/1ecb31e7-2687-4209-808a-da56474d1a05/",
  "pulp_created": "2021-05-03T20:13:48.938862Z",
  "plan": {
    "plugins": [
      {
        "type": "iso"
      }
    ]
  }
}

(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ pulp migration plan run --href /pulp/api/v3/migration-plans/1ecb31e7-2687-4209-808a-da56474d1a05/
Started background task /pulp/api/v3/tasks/e3678b75-6522-4d6f-83ab-9491ccc7c36e/
.Done.
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ http :/pulp/content/

        <!DOCTYPE html>
        <html>
            <body>
                <ul>                
                    <li><a href="iso/">iso/</a></li>                
                </ul>
            </body>
        </html>
        
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ pulp migration plan create --plan '{"plugins": [{"type": "rpm"}]}'
{
  "pulp_href": "/pulp/api/v3/migration-plans/ac527a1f-dc2a-4839-892e-f07ef971aa56/",
  "pulp_created": "2021-05-03T20:14:15.641048Z",
  "plan": {
    "plugins": [
      {
        "type": "rpm"
      }
    ]
  }
}

(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ pulp migration plan run --href /pulp/api/v3/migration-plans/ac527a1f-dc2a-4839-892e-f07ef971aa56/
Started background task /pulp/api/v3/tasks/cea4eb37-a5fa-4139-934e-5394167f1306/
...Done.
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ http :/pulp/content/

        <!DOCTYPE html>
        <html>
            <body>
                <ul>                
                    <li><a href="iso/">iso/</a></li>                
                    <li><a href="rpm-signed/">rpm-signed/</a></li>                
                </ul>
            </body>
        </html>
        
(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ 

#2 Updated by ipanova@redhat.com 8 days ago

@grant theBaseDistribution error is related to tthe compatibility with core 3.12 https://pulp.plan.io/issues/8522#note-2

Please register to edit this issue

Also available in: Atom PDF