Remove IPA Eventlet Dependency
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ironic-python-agent |
Triaged
|
Medium
|
Unassigned |
Bug Description
For more information on "Moving Away From Eventlet" in Openstack, see https:/
Current State-of-World
=======
IPA Depends on eventlet heavily through its use of oslo.service WSGI.
The hope originally was that IPA would be the easiest to migrate away from eventlet, by simply applying the already built WSGI application to something non-eventlet based (Gunicorn, Unicorn etc), and at the same time get oslo.service WSGI migrated as well.
This work can be tracked here: https:/
**Currently it is assumed that this original plan is not possible.**
The "New" Problem
=======
IPA was designed to spawn its own WSGI Servers as required. As well as this, the IPA WSGI Application that the WSGI Server Runs, also needs to be able to control IPA (i.e request comes to the API, the agent takes an action)
This creates an interesting problem, because the agent needs to be able to make thread-safe operations. The agent is currently past through to Application to enable this flow. https:/
**This means that just changing the server is not enough, the flow of data through the application also needs to change.**
High Level Plan
=======
Based on the work of JayF and TheJulia - thank you :))
- Remove IPAHeartbeater dependency on agent (https:/
directly require, as arguments, the data it is currently reading from self.agent
- move get_agent_
- Create a class to hold most of the runner/
- The goal: to ensure things needed both by WSGI application and IronicPythonAgent class to be gotten
one and passed in explicitly, instead of being shared via agent class
- Where dynamic data needs to be shared
- (Option 1) Develop database backend (sqlalchemy+
- Ensure we never have two writers!!!
- The API server side *does not have to be* WSGI when implementing this
- (Option 2) Use IPC (JSON-RPC over a socket) to call from an independent, statelss API/wsgi
application into a backend/conductor application
- This would mimic the configuration from Ironic API -> Ironic Conductor
I'd like to note when we get into action items: removing the heartbeater dependency on agent, and restructuring IPA startup are obvious wins -- how we do the third step is still up for debate a little bit, and this bug exists to document some of that planning.