StopIteration causes check_nova_services to finish abruptly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charm-openstack-service-checks |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
root@juju-
<function check_nova_services at 0x7f2c9a791848> raised unknown exception '<type 'exceptions.
=======
Traceback (most recent call last):
File "/usr/local/
function(*args, **kwargs)
File "/usr/local/
services_
File "/usr/local/
host_svc = (svc for svc in services_compute if svc['host'] ==
StopIteration
=======
Expectation:
Iteration should be caught and issue a "continue" statement.
https:/
try:
...
except StopIteration as e:
continue
Alternatively, and since a single item is expected, a list could be created (no expectation of mem exhaustion for lazy load).
Changed in charm-openstack-service-checks: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in charm-openstack-service-checks: | |
status: | Triaged → Won't Fix |
Encountered this error as well. For my case, if no services (svc) is returned by list comprehension, the error is thrown. This is occurring when there's a host in a host aggregate but no corresponding OS service running on it.