Actions
Issue #9434
closedUnable to switch distribution from repository to repo version and vice versa
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 107
Quarter:
Description
pulp_core: 3.14.5
pulp_container: 2.7.1
In RHUI workflow we support pre-syncing the content and then making it available (say at GA) with by simply repointing the distribution. This works correctly in pulp_rpm, but pulp_container raises an error when a REST request is issued to update a distribution. Given this distribution:
{
"base_path": "base_path",
"content_guard": "/pulp/api/v3/contentguards/container/content_redirect/5fbef8f9-cfce-4bca-a376-c46403fcafc5/",
"description": null,
"name": "name",
"namespace": "/pulp/api/v3/pulp_container/namespaces/2c0429a6-faf4-46fd-9cbe-c441da1ac5e9/",
"private": false,
"pulp_created": "2021-09-22T14:18:23.653633Z",
"pulp_href": "/pulp/api/v3/distributions/container/container/3a8537e8-6e16-498c-bea2-ee4837bcf768/",
"pulp_labels": {},
"registry_path": "localhost:24817/base_path",
"repository": null,
"repository_version": "/pulp/api/v3/repositories/container/container/cadd407b-411c-4597-9b2a-ab278a480dca/versions/1/"
}
Now, I want to change this distribution to always point to the latest repository version instead of a fixed one, so I'm trying to populate the repository field:
curl -u admin:****** -X PUT -H 'Content-type: application/json' -d '{"name": "name", "base_path": "base_path", "repository": "/pulp/api/v3/repositories/container/container/cadd407b-411c-4597-9b2a-ab278a480dca/"}' http://localhost:24817/pulp/api/v3/distributions/container/container/3a8537e8-6e16-498c-bea2-ee4837bcf768/
{"non_field_errors":["Only one of the attributes 'repository' and 'repository_version' may be used simultaneously."]}[
It doesn't make a difference if I supply "repository_version": null in the request body, or when using PATCH HTTP method.
Updated by ipanova@redhat.com about 3 years ago
- Project changed from Container Support to Pulp
- Status changed from NEW to ASSIGNED
- Assignee set to ipanova@redhat.com
Validation happens in core.
Updated by ipanova@redhat.com about 3 years ago
- Project changed from Pulp to Container Support
Updated by ipanova@redhat.com about 3 years ago
- Project changed from Container Support to Pulp
Added by ipanova@redhat.com about 3 years ago
Updated by ipanova@redhat.com about 3 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|ebaeb638d0698b45df476ffa102a317b84eab61e.
Updated by pulpbot about 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Fixed DistibutorSerializer validation for repository/repo_version/publication.
closes #9434