Fix gc by using the v1/v2 storage location helper everywhere
This commit is contained in:
parent
44d06b0c2e
commit
52125bbfed
4 changed files with 11 additions and 22 deletions
|
@ -75,12 +75,8 @@ def check_blob_exists(namespace, repo_name, digest):
|
|||
def download_blob(namespace, repo_name, digest):
|
||||
found, headers = _base_blob_fetch(namespace, repo_name, digest)
|
||||
|
||||
path = storage.blob_path(digest)
|
||||
if not found.cas_path:
|
||||
logger.info('Generating legacy v1 path for image: %s', digest)
|
||||
path = storage.v1_image_layer_path(found.uuid)
|
||||
|
||||
logger.debug('Looking up the direct download URL')
|
||||
path = model.storage.get_layer_path(found)
|
||||
logger.debug('Looking up the direct download URL for path: %s', path)
|
||||
direct_download_url = storage.get_direct_download_url(found.locations, path)
|
||||
|
||||
if direct_download_url:
|
||||
|
|
Reference in a new issue