glance fails silently if a task flow can't be loaded
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Undecided
|
Stuart McLaren |
Bug Description
In this try block:
try:
# NOTE(flaper87): ImportToLocal and DeleteFromLocal shouldn't be here.
# Ideally, we should have the different import flows doing this for us
# and this function should clean up duplicated tasks. For example, say
# 2 flows need to have a local copy of the image - ImportToLocal - in
# order to be able to complete the task - i.e Introspect-. In that
# case, the introspect.get_flow call should add both, ImportToLocal and
# DeleteFromLocal, to the flow and this function will reduce the
# duplicated calls to those tasks by creating a linear flow that
# ensures those are called before the other tasks. For now, I'm
# keeping them here, though.
limbo = lf.Flow(
for subflow in _get_import_
# NOTE(flaper87): We have hard-coded 2 tasks,
# if there aren't more than 2, it means that
# no subtask has been registered.
if len(limbo) > 1:
# NOTE(flaper87): Until this implementation gets smarter,
# make sure ImportToStore is called *after* the imported
# flow stages. If not, the image will be set to saving state
# invalidating tasks like Introspection or Convert.
# NOTE(flaper87): Since this is an "optional" task but required
# when `limbo` is executed, we're adding it in its own subflow
# to isolate it from the rest of the flow.
else:
except exception.
# NOTE(flaper87): If something goes wrong with the load of
# import tasks, make sure we go on.
We silently suppress a bad task configuration exception (with no information logged).
The exception contains useful information which should at least be logged:
BadTaskConfigu
Changed in glance: | |
assignee: | nobody → Stuart McLaren (stuart-mclaren) |
Fix proposed to branch: master /review. openstack. org/265329
Review: https:/