Project

Profile

Help

Task #2523

Remove the ability to remove docker blobs via API

Added by ipanova@redhat.com almost 3 years ago. Updated 3 months ago.

Status:
NEW
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Platform Release:
Blocks Release:
Target Release - Docker:
Backwards Incompatible:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

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 API CLOSED - 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 efficient CLOSED - WONTFIX Actions

History

#1 Updated by ipanova@redhat.com almost 3 years ago

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

#2 Updated by ipanova@redhat.com almost 3 years ago

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

#3 Updated by mhrivnak almost 3 years ago

  • Tracker changed from Issue to Task
  • % Done set to 0
  • Backwards Incompatible changed from No to Yes

#4 Updated by dalley almost 2 years ago

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

#5 Updated by bmbouter 7 months ago

  • Tags deleted (Pulp 3)

#6 Updated by ipanova@redhat.com 3 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF