Log which filter failed when on log level INFO
If log level is set to INFO,only see a log message about nova-schedule attempting to build n instances then a log message about setting the state to error when the scheduler fails to schedule an instance due to a filter returning 0 hosts.It may be useful to see which filterreturns 0 host for operator. Close-bug: #1226334 Change-Id: I7564a8ab093895d1f9db357009aac294783a808b
This commit is contained in:
@@ -80,9 +80,10 @@ class BaseFilterHandler(loadables.BaseLoader):
|
||||
{'cls_name': cls_name})
|
||||
return
|
||||
list_objs = list(objs)
|
||||
if not list_objs:
|
||||
LOG.info(_("Filter %s returned 0 hosts"), cls_name)
|
||||
break
|
||||
LOG.debug(_("Filter %(cls_name)s returned "
|
||||
"%(obj_len)d host(s)"),
|
||||
{'cls_name': cls_name, 'obj_len': len(list_objs)})
|
||||
if len(list_objs) == 0:
|
||||
break
|
||||
return list_objs
|
||||
|
||||
Reference in New Issue
Block a user