Project

Profile

Help

Issue #6935

closed

Validation failure reports incorrect resources if there are multiple distributors specified

Added by ttereshc almost 4 years ago. Updated about 3 years ago.

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

Description

rpm_unsigned repo exists, drpm does not.

Migration Plan:

{ "plan": {
  "plugins": [
    {
      "type": "rpm",
      "repositories": [
        {
          "name": "rpm_unsigned",
          "repository_versions": [
            {
              "pulp2_repository_id": "rpm_unsigned",
              "pulp2_distributor_repository_ids": [ "rpm_unsigned", "drpm" ]
            }
          ]
        }
      ]
    }
  ]
}}

Result (see the description, it should have onlt drpm there):

$ http :/pulp/api/v3/tasks/7bf152e9-971e-48c4-82a7-9bd8a0ce80fe/

HTTP/1.1 200 OK
Allow: GET, PATCH, DELETE, HEAD, OPTIONS
Connection: Keep-Alive
Content-Length: 1250
Content-Type: application/json
Date: Tue, 09 Jun 2020 10:48:03 GMT
Keep-Alive: timeout=5, max=10000
Server: gunicorn/20.0.4
Vary: Accept,Cookie
X-Frame-Options: SAMEORIGIN

{
    "child_tasks": [],
    "created_resources": [],
    "error": {
        "description": "Validation failed: resources missing {'repositories_missing_distributors': ['drpm', 'rpm_unsigned']}",
        "traceback": "  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py\", line 886, in perform_job\n    rv = job.perform()\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 664, in perform\n    self._result = self._execute()\n  File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 670, in _execute\n    return self.func(*self.args, **self.kwargs)\n  File \"/home/vagrant/devel/pulp-2to3-migration/pulp_2to3_migration/app/tasks/migrate.py\", line 102, in migrate_from_pulp2\n    \"Validation failed: resources missing {}\".format(missing_resources)\n"
    },
    "finished_at": "2020-06-09T10:47:56.137359Z",
    "name": "pulp_2to3_migration.app.tasks.migrate.migrate_from_pulp2",
    "parent_task": null,
    "progress_reports": [],
    "pulp_created": "2020-06-09T10:47:55.933361Z",
    "pulp_href": "/pulp/api/v3/tasks/7bf152e9-971e-48c4-82a7-9bd8a0ce80fe/",
    "reserved_resources_record": [
        "pulp_2to3_migration"
    ],
    "started_at": "2020-06-09T10:47:56.090277Z",
    "state": "failed",
    "task_group": null,
    "worker": "/pulp/api/v3/workers/1b7a3c5f-86f6-4da7-922f-2a61cf6eac56/"
}

Also available in: Atom PDF