Remove the placement fallback since the DB has been fully backfilled.
This commit is contained in:
parent
da12b940a9
commit
6047f3759f
3 changed files with 1 additions and 45 deletions
|
@ -857,22 +857,7 @@ def get_repo_image(namespace_name, repository_name, image_id):
|
|||
Image.docker_image_id == image_id)))
|
||||
|
||||
if not location_list:
|
||||
# REMOVEME When all existing imagestorages have a placement
|
||||
try:
|
||||
logger.warning('Checking for image without placement')
|
||||
no_placement = (Image.select(Image, ImageStorage)
|
||||
.join(ImageStorage)
|
||||
.switch(Image)
|
||||
.join(Repository)
|
||||
.where(Repository.name == repository_name,
|
||||
Repository.namespace == namespace_name,
|
||||
Image.docker_image_id == image_id)
|
||||
.get())
|
||||
no_placement.storage.locations = {config.app_config['DS_BACKFILL_LOCATION']}
|
||||
return no_placement
|
||||
except Image.DoesNotExist:
|
||||
logger.warning('Unable to find image')
|
||||
return None
|
||||
return None
|
||||
|
||||
location_names = {location.location.name for location in location_list}
|
||||
|
||||
|
|
Reference in a new issue