<div dir="ltr"><div>Hi,</div><div><br></div><div>When OpenStack service components are started/stooped, </div><div>operators or OpenStack Services want to execute some actives </div><div>before and/or after component is started/stopped.  </div><div>Most of the time, operator needs to depends</div><div>on the start-up scripts to do it, which is an installer </div><div>dependent, while OpenStack service can't use this approach.</div><div><br></div><div>Also using start-up script does not suite for below situations:</div><div>oslo.service spawns component in more than one processes </div><div>when workers count is more than 1. In this case, if we want</div><div>to execute some activities before/after on each process, start-up</div><div>script does not help.</div><div><br></div><div>So to support these scenarios, thinking of below enhancement </div><div>in oslo.service as mentioned in blueprint [1]</div><div> </div><div>Most of the projects in OpenStack does make use of oslo.service </div><div>library to create/start/stop the service api and back-end components.</div><div>And by providing an configurable python hooks as below, and </div><div>enhance oslo.service to execute them appropriately.</div><div><br></div><div>[oslo_service]</div><div>List of of pre-hook executed in sequence</div><div>pre-hook=<comma separated python module used as hooks></div><div>List of of pre-hook executed in sequence</div><div>post-hook=<comma separated python module used as hooks></div><div><br></div><div>And to make sure the hooks does not break the running process,</div><div>try to execute them in try block.</div><div><br></div><div>Kindly provide your comments/inputs. Thanks<br></div><div><br></div><div>[1]: <a href="https://blueprints.launchpad.net/oslo.service/+spec/service-hook">https://blueprints.launchpad.net/oslo.service/+spec/service-hook</a><br></div><div><br></div><div>Regards,</div><div>Kanagaraj M</div></div>