[openstack-dev] [oslo.service] Lifecycle Hooks
Kanagaraj Manickam
mkr1481 at gmail.com
Wed May 11 13:27:42 UTC 2016
Hi,
When OpenStack service components are started/stooped,
operators or OpenStack Services want to execute some actives
before and/or after component is started/stopped.
Most of the time, operator needs to depends
on the start-up scripts to do it, which is an installer
dependent, while OpenStack service can't use this approach.
Also using start-up script does not suite for below situations:
oslo.service spawns component in more than one processes
when workers count is more than 1. In this case, if we want
to execute some activities before/after on each process, start-up
script does not help.
So to support these scenarios, thinking of below enhancement
in oslo.service as mentioned in blueprint [1]
Most of the projects in OpenStack does make use of oslo.service
library to create/start/stop the service api and back-end components.
And by providing an configurable python hooks as below, and
enhance oslo.service to execute them appropriately.
[oslo_service]
List of of pre-hook executed in sequence
pre-hook=<comma separated python module used as hooks>
List of of pre-hook executed in sequence
post-hook=<comma separated python module used as hooks>
And to make sure the hooks does not break the running process,
try to execute them in try block.
Kindly provide your comments/inputs. Thanks
[1]: https://blueprints.launchpad.net/oslo.service/+spec/service-hook
Regards,
Kanagaraj M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160511/43b008d8/attachment.html>
More information about the OpenStack-dev
mailing list