project8 / dripline-python

python implementation of project8/dripline
Other
2 stars 0 forks source link

setup_calls and queue locking #28

Closed wcpettus closed 5 years ago

wcpettus commented 6 years ago

Problem showing up in glenlivet if there is a problem binding to a queue and setup_calls starts a scheduler.

In service.py, run method, a service connects to the broker, then runs setup_calls, then the ioloop starts. Problems arise if the ioloop has trouble starting; I was running a test service instance which blocked queue binding until I stopped it, then when the queue was bound the connection had already been closed breaking the timeout on the scheduler. With a single break in the scheduler timeout, services will never reschedule, and we don't have a watchdog.

While running an identically-named instance of a service is the easiest way to block queue binding, it has occasionally happened for other reasons.

Most Project 8 services are not affected by this bug, as many socket connections are exclusive (e.g., laphraoig only allows a single connection on 9221), so EthernetProvider can't connect, and the setup_call will never happen.

Quick solutions:

laroque commented 5 years ago

this was resolved in #37