Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. Trove Heartbeats
  2.  
  3. Trobe has an api, a taskmanager, a conductor, and a guestagent
  4.  
  5. The task manager that orchestrates tasks, both tasks related to prvisioning infra as well as tasks to be executed on the instance
  6.  
  7. Agent Communication
  8. Trove agent runs within the guest instance, and listens to message bus (MQ)
  9. GuestAgent runs on every DB instance, and a dedicated MQ topic is used (identified as the instance's id).
  10. It works as RPC, so the task name to execute is passed over the queue to the agent, and the agent runs the appropiate function (basically sounds like they implemented celery like functionality with oslo.rpc, which has been replaced with oslo.messaging)
  11.  
  12. Heartbeats
  13.  
  14. The results of heartbeats are stored in the DB https://github.com/openstack/trove/blob/master/trove/guestagent/models.py
  15. The heartbeat model provides a method for determining if an agent is active based on the heartbeat: https://github.com/openstack/trove/blob/master/trove/guestagent/models.py#L90-92
  16.  
  17. The trove-conducter contains tasks for receiving an incoming service_status message, and saving it as a heatbeat: https://github.com/openstack/trove/blob/master/trove/conductor/manager.py
  18. There is some code for handling messages that may come in out of order, as far as heartbeats go
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement