<div dir="ltr">DIms,<div><br></div><div>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.<br></div><div><br></div><div>Would like to give the sample use cases from from Operator & OpenStack community side as below.</div><div>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.</div><div><br></div><div>OpenStack community side, sample use cases would be:</div><div>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.</div><div>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.<br></div><div><br></div><div>Regards<br></div><div>Kanagaraj M</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 11, 2016 at 7:05 PM, Davanum Srinivas <span dir="ltr"><<a href="mailto:davanum@gmail.com" target="_blank">davanum@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Kanagaraj,<br>
<br>
Who is the first consumer? for what specific purpose?<br>
<br>
Thanks,<br>
Dims<br>
<div><div class="h5"><br>
On Wed, May 11, 2016 at 9:27 AM, Kanagaraj Manickam <<a href="mailto:mkr1481@gmail.com">mkr1481@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> When OpenStack service components are started/stooped,<br>
> operators or OpenStack Services want to execute some actives<br>
> before and/or after component is started/stopped.<br>
> Most of the time, operator needs to depends<br>
> on the start-up scripts to do it, which is an installer<br>
> dependent, while OpenStack service can't use this approach.<br>
><br>
> Also using start-up script does not suite for below situations:<br>
> oslo.service spawns component in more than one processes<br>
> when workers count is more than 1. In this case, if we want<br>
> to execute some activities before/after on each process, start-up<br>
> script does not help.<br>
><br>
> So to support these scenarios, thinking of below enhancement<br>
> in oslo.service as mentioned in blueprint [1]<br>
><br>
> Most of the projects in OpenStack does make use of oslo.service<br>
> library to create/start/stop the service api and back-end components.<br>
> And by providing an configurable python hooks as below, and<br>
> enhance oslo.service to execute them appropriately.<br>
><br>
> [oslo_service]<br>
> List of of pre-hook executed in sequence<br>
> pre-hook=<comma separated python module used as hooks><br>
> List of of pre-hook executed in sequence<br>
> post-hook=<comma separated python module used as hooks><br>
><br>
> And to make sure the hooks does not break the running process,<br>
> try to execute them in try block.<br>
><br>
> Kindly provide your comments/inputs. Thanks<br>
><br>
> [1]: <a href="https://blueprints.launchpad.net/oslo.service/+spec/service-hook" rel="noreferrer" target="_blank">https://blueprints.launchpad.net/oslo.service/+spec/service-hook</a><br>
><br>
> Regards,<br>
> Kanagaraj M<br>
><br>
</div></div>> __________________________________________________________________________<br>
> OpenStack Development Mailing List (not for usage questions)<br>
> Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Davanum Srinivas :: <a href="https://twitter.com/dims" rel="noreferrer" target="_blank">https://twitter.com/dims</a><br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</font></span></blockquote></div><br></div>