[openstack-dev] [oslo.service] Lifecycle Hooks

Kanagaraj Manickam mkr1481 at gmail.com
Fri May 13 09:16:06 UTC 2016


DIms,

Use case could be anything, which would needed by either
operator/community, who wants to perform an required task before and after
service is started. This requirement is very generic by nature, and I
believe it will be very useful.

Would like to give the sample use cases from from Operator & OpenStack
community side as below.
Operator side, any pre/post actions could be hooked which is the
requirement for them. Simple example would be, one who wants to create an
journal of start/stop details like time, number of worker, configurations,
etc in a common portal, this life-cycle hook would help.

OpenStack community side, sample use cases would be:
1. Most of the OpenStack components starts TextGuruMeditation, logging
while those components are get started. These tasks could be provided as
life cycle hooks and all OpenStack components could start to leverage it.
2. For automatically discovering the OpenStack deployment, this hooks will
be very useful. Auto-discover-hook would report to pre-defined destinations
while starting/stopping the service.

Regards
Kanagaraj M




On Wed, May 11, 2016 at 7:05 PM, Davanum Srinivas <davanum at gmail.com> wrote:

> Kanagaraj,
>
> Who is the first consumer? for what specific purpose?
>
> Thanks,
> Dims
>
> On Wed, May 11, 2016 at 9:27 AM, Kanagaraj Manickam <mkr1481 at gmail.com>
> wrote:
> > 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
> >
> >
> __________________________________________________________________________
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe:
> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
>
>
>
> --
> Davanum Srinivas :: https://twitter.com/dims
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160513/8c53f016/attachment.html>


More information about the OpenStack-dev mailing list