Project

Profile

Help

Issue #637

closed

after successful import via API, used upload_id is deleted automatically

Added by igulina@redhat.com about 7 years ago. Updated about 3 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Documentation, Pulp 2
Sprint:
Quarter:

Description

Description of problem:

In docs https://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/content/upload.html#delete-an-upload-request

it's said that "Once the uploaded file has been successfully imported and no further operations are desired, the caller should delete the upload request from the server."

However, the upload_id is deleted automatically after successful import.

It seems this bug is related to https://bugzilla.redhat.com/show_bug.cgi?id=1173176

Version-Release number of selected component (if applicable):

rpm -qa | grep pulp-server

pulp-server-2.6.0-0.1.alpha.el7.noarch

How reproducible:
always

curl -i -H "Accept: application/json" -X POST -k -u user:pass 'https://localhost/pulp/api/v2/content/uploads/'

HTTP/1.1 201 Created
Date: Thu, 11 Dec 2014 15:59:29 GMT
Server: Apache/2.4.6 (Red Hat) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Location: /pulp/api/v2/content/uploads/fc00048f-11b7-491a-8215-fb7bb4723930/
Content-Length: 132
Content-Type: application/json

{"upload_id": "fc00048f-11b7-491a-8215-fb7bb4723930", "_href": "/pulp/api/v2/content/uploads/fc00048f-11b7-491a-8215-fb7bb4723930/"}

curl -k -X GET https://user:pass@localhost/pulp/api/v2/content/uploads/

{"upload_ids": ["fc00048f-11b7-491a-8215-fb7bb4723930"]}

curl -i -H "Accept: application/json" -X PUT -k 'https://user:pass@localhost/pulp/api/v2/content/uploads/fc00048f-11b7-491a-8215-fb7bb4723930/0/' --data-binary '@bear-4.1-1.noarch.rpm'

HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Date: Thu, 11 Dec 2014 16:05:42 GMT
Server: Apache/2.4.6 (Red Hat) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Length: 4
Content-Type: application/json

null

curl -k -X GET https://admin:admin@localhost/pulp/api/v2/content/uploads/

{"upload_ids": ["fc00048f-11b7-491a-8215-fb7bb4723930"]}

curl -i -H "Accept: application/json" -X POST -k -u user:pass 'https://localhost/pulp/api/v2/repositories/makaka/actions/import_upload/' -d '{"override_config": {}, "unit_type_id": "rpm", "upload_id": "fc00048f-11b7-491a-8215-fb7bb4723930", "unit_key": {}, "unit_metadata": {"checksum_type": null}}'

HTTP/1.1 202 Accepted
Date: Thu, 11 Dec 2014 16:07:12 GMT
Server: Apache/2.4.6 (Red Hat) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Encoding: utf-8
Content-Length: 172
Content-Type: application/json

{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/b471f343-cf6d-4124-8683-f6c997f6ea7d/", "task_id": "b471f343-cf6d-4124-8683-f6c997f6ea7d"}], "result": null, "error": null}

curl -k -X GET https://user:pass@localhost/pulp/api/v2/content/uploads/

{"upload_ids": []}

curl -k -X GET https://admin:admin@localhost/pulp/api/v2/tasks/b471f343-cf6d-4124-8683-f6c997f6ea7d/ | python -m json.tool

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   791  100   791    0     0   1731      0 --:--:-- --:--:-- --:--:--  1734
{
  "_href": "/pulp/api/v2/tasks/b471f343-cf6d-4124-8683-f6c997f6ea7d/",
  "_id": {
      "$oid": "5489c13052f8ef2e87d82b9d"
  },
  "_ns": "task_status",
  "error": null,
  "exception": null,
  "finish_time": "2014-12-11T16:07:13Z",
  "id": "5489c1311e0a5959e1810b09",
  "progress_report": {},
  "queue": "reserved_resource_worker-0@host",
  "result": {
      "details": {},
      "success_flag": true,
      "summary": ""
  },
  "spawned_tasks": [],
  "start_time": "2014-12-11T16:07:13Z",
  "state": "finished",
  "tags": [
      "pulp:repository:makaka",
      "pulp:action:import_upload"
  ],
  "task_id": "b471f343-cf6d-4124-8683-f6c997f6ea7d",
  "task_type": "pulp.server.managers.content.upload.import_uploaded_unit",
  "traceback": null,
  "worker_name": "reserved_resource_worker-0@host"
}

+ This bug was cloned from Bugzilla Bug #1173199 +

Actions #1

Updated by mhrivnak about 7 years ago

Verify this behavior and ensure it is documented correctly.

+ This comment was cloned from Bugzilla #1173199 comment 1 +

Actions #2

Updated by bmbouter about 7 years ago

  • Category deleted (1)
  • Tags Documentation added

Documentation is now a Tag not a Category.

Actions #3

Updated by bmbouter about 7 years ago

  • Severity changed from Low to 1. Low
Actions #4

Updated by bmbouter about 3 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #5

Updated by bmbouter about 3 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #6

Updated by bmbouter about 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF