Project

Profile

Help

Maintenance: Planio will be observing a scheduled maintenance window this Tuesday, November 5, 2024 from 03:00 UTC until 06:30 UTC to perform urgent network maintenance in our primary data center. Your Planio account will be unavailable during this maintenance window.

Issue #1261

closed

Publishing a repository without providing the distributor ID should fail and inform user

Added by omaciel@redhat.com about 9 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.6.3
Platform Release:
2.7.0
OS:
RHEL 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Today while playing with the API to publish an existing synchronized YUM repository, I noticed that a new publish task was successfully created even though I failed to provide the distributor id:

POST https://localhost/pulp/api/v2/repositories/animals/actions/publish/
HTTP/1.1 202 Accepted
Connection: Keep-Alive
Content-Encoding: utf-8
Content-Length: 172
Content-Type: application/json
Date: Fri, 18 Sep 2015 20:55:30 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5

{
    "error": null,
    "result": null,
    "spawned_tasks": [
        {
            "_href": "/pulp/api/v2/tasks/2f70d70f-6002-4fdf-b43f-ad43ac9c8a8d/",
            "task_id": "2f70d70f-6002-4fdf-b43f-ad43ac9c8a8d"
        }
    ]
}

When I checked the task itself I saw that there was an error:

"Missing resource(s): distributor=None, repository=animals"

I'd argue that if a required distributor id is not provided while attempting to publish a repository, a validation error should have happened and a new task should not be created

Actions #1

Updated by amacdona@redhat.com about 9 years ago

  • Status changed from NEW to MODIFIED
  • Platform Release set to 2.7.0

This behavior was changed in the Django conversion and should be fixed in pulp >= 2.7.0

https://github.com/pulp/pulp/pull/1742

Actions #2

Updated by amacdona@redhat.com about 9 years ago

  • Assignee set to amacdona@redhat.com
  • Triaged changed from No to Yes
Actions #3

Updated by dkliban@redhat.com about 9 years ago

  • Status changed from MODIFIED to 5
Actions #4

Updated by amacdona@redhat.com almost 9 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #5

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added
Actions #6

Updated by bmbouter over 4 years ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Also available in: Atom PDF