Project

Profile

Help

Task #2523

closed

Remove the ability to remove docker blobs via API

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

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Target Release - Docker:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

We do not give any possibility to remove blobs via pulp-admin, but blobs can still be removed via API.
In case a blob is removed, manifests that were referencing that blob would become corrupted, because they would miss one layer. It is better to remove the possibility of blobs removal via API in order to avoid mentioned above unpleasant consequences.

$ curl -i -H "Accept: application/json" -X POST -k -u admin:admin -d '{"criteria": {"type_ids": ["docker_blob"], "filters": {"unit": {"digest": "sha256:7d92c2a745f8cbdbf34eb87e0777e157bd88d9bf2a20927a8a8dd7cdf06e6ab4"}}}}' 'https://localhost/pulp/api/v2/repositories/synctest/actions/unassociate/'
HTTP/1.1 202 ACCEPTED
Date: Wed, 11 Jan 2017 14:16:28 GMT
Server: Apache/2.4.23 (Fedora) OpenSSL/1.0.2h-fips mod_wsgi/4.4.8 Python/2.7.12
Content-Length: 172
Content-Type: application/json; charset=utf-8

{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/814f7435-3b62-4bd0-92be-8028ea13588f/", "task_id": "814f7435-3b62-4bd0-92be-8028ea13588f"}], "result": null, "error": null} 

[ipanova@ina pulp_docker]$ pulp-admin -vv tasks details --task-id 814f7435-3b62-4bd0-92be-8028ea13588f

+----------------------------------------------------------------------+
                              Task Details
+----------------------------------------------------------------------+

2017-01-11 15:16:37,893 - DEBUG - sending GET request to /pulp/api/v2/tasks/814f7435-3b62-4bd0-92be-8028ea13588f/
2017-01-11 15:16:38,083 - INFO - GET request to /pulp/api/v2/tasks/814f7435-3b62-4bd0-92be-8028ea13588f/ with parameters None
2017-01-11 15:16:38,083 - INFO - Response status : 200 

2017-01-11 15:16:38,083 - INFO - Response body :
 {
  "exception": null, 
  "task_type": "pulp.server.managers.repo.unit_association.unassociate_by_criteria", 
  "_href": "/pulp/api/v2/tasks/814f7435-3b62-4bd0-92be-8028ea13588f/", 
  "task_id": "814f7435-3b62-4bd0-92be-8028ea13588f", 
  "tags": [
    "pulp:repository:synctest", 
    "pulp:action:unassociate"
  ], 
  "finish_time": "2017-01-11T14:16:28Z", 
  "_ns": "task_status", 
  "start_time": "2017-01-11T14:16:28Z", 
  "traceback": null, 
  "spawned_tasks": [], 
  "progress_report": {}, 
  "queue": "reserved_resource_worker-0@ina.", 
  "state": "finished", 
  "worker_name": "reserved_resource_worker-0@ina.", 
  "result": {
    "units_successful": [
      {
        "unit_key": {
          "digest": "sha256:7d92c2a745f8cbdbf34eb87e0777e157bd88d9bf2a20927a8a8dd7cdf06e6ab4"
        }, 
        "type_id": "docker_blob"
      }
    ]
  }, 
  "error": null, 
  "_id": {
    "$oid": "58763e3cfdde93ddf90df696"
  }, 
  "id": "58763e3cfdde93ddf90df696"
}

Operations:       unassociate
Resources:        synctest (repository)
State:            Successful
Start Time:       2017-01-11T14:16:28Z
Finish Time:      2017-01-11T14:16:28Z
Result:           
  Units Successful: 
    Type Id:  docker_blob
    Unit Key: 
      Digest: sha256:7d92c2a745f8cbdbf34eb87e0777e157bd88d9bf2a20927a8a8dd7cdf06
              e6ab4
Task Id:          814f7435-3b62-4bd0-92be-8028ea13588f
Progress Report:  

Related issues

Related to Docker Support - Story #2522: As a user, I see a warning logged when a blob is removed via APICLOSED - WONTFIX

Actions
Related to Docker Support - Task #2521: Make a note in documentation about docker blob removal consequenses CLOSED - WONTFIX

Actions
Related to Docker Support - Task #3231: Docker image upload can be more efficientCLOSED - WONTFIX

Actions
Actions #1

Updated by ipanova@redhat.com over 7 years ago

  • Related to Story #2522: As a user, I see a warning logged when a blob is removed via API added
Actions #2

Updated by ipanova@redhat.com over 7 years ago

  • Related to Task #2521: Make a note in documentation about docker blob removal consequenses added
Actions #3

Updated by mhrivnak over 7 years ago

  • Tracker changed from Issue to Task
  • % Done set to 0
Actions #4

Updated by dalley over 6 years ago

  • Related to Task #3231: Docker image upload can be more efficient added
Actions #5

Updated by bmbouter about 5 years ago

  • Tags deleted (Pulp 3)
Actions #6

Updated by ipanova@redhat.com over 4 years ago

  • Tags Pulp 2 added
Actions #7

Updated by ipanova@redhat.com about 3 years ago

  • Status changed from NEW to CLOSED - WONTFIX

This is addressed in pulp_container and pulp3

Also available in: Atom PDF