summaryrefslogtreecommitdiff
path: root/ironic_python_agent/api
diff options
context:
space:
mode:
authorJulia Kreger <juliaashleykreger@gmail.com>2019-12-07 09:45:32 -0800
committerJulia Kreger <juliaashleykreger@gmail.com>2019-12-07 09:45:32 -0800
commit8aa9b79c46744bcb0221379d26a4147317d63f77 (patch)
tree694c32a3cb1d68e6d7405906f16f5d9252aa82b0 /ironic_python_agent/api
parent33fa473551125be4a854944117442ece6862404d (diff)
downloadironic-python-agent-8aa9b79c46744bcb0221379d26a4147317d63f77.tar.gz
Stop the API so rescue can exit and succeed
The change in frameworks with the API changed the overall execution behavior from single threaded serialized execution threaded to multithreaded through eventlet. But we signaled ourselves to wait for the API to stop, but never actually stopped the API. As setting the flag to stop the API is a hard notification that the API must now exit, there is no reason to wait and block exit, hence the simple nature of this change. Now the threads should exit, IPA should exit, and rescue should ideally work. Change-Id: I3faf2d169d4edac6a2321f8649bb9ce478885ea1 Story: 2006998 Task: 37768
Diffstat (limited to 'ironic_python_agent/api')
-rw-r--r--ironic_python_agent/api/app.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ironic_python_agent/api/app.py b/ironic_python_agent/api/app.py
index 9924b655..03a7180d 100644
--- a/ironic_python_agent/api/app.py
+++ b/ironic_python_agent/api/app.py
@@ -139,9 +139,10 @@ class Application(object):
def stop(self):
"""Stop the API service."""
+ LOG.debug("Stopping the API service.")
if self.service is None:
return
- self.service.wait()
+ self.service.stop()
self.service = None
LOG.info('Stopped API service on port %s', self.PORT)