Packaging: Issueshttps://projects.theforeman.org/https://projects.theforeman.org/favicon.ico?16970236342015-10-15T09:55:09ZForeman
Redmine Bug #12181 (Closed): "katello-service restart" is not restarting services in the right orderhttps://projects.theforeman.org/issues/121812015-10-15T09:55:09ZAdam Ruzickaaruzicka@redhat.com
<p>Doing a `katello-service restart` merely walks that list of<br />services and issues a restart on each one in turn.</p>
<p>I think with a product as complex as Satellite, this is the<br />wrong behaviour and can in fact cause issues that take a while<br />to resolve.</p>
<p>The behaviour of "restart" should be as follows<br />- Issue stop on each service from highest to lowest prio (30 <del>> 5)<br /></del> Issue start on each service from lowest to high</p>
<p>That way we cleanly shutdown each service so that none of the<br />dependent services are still running, and them up again in the<br />correct order.</p>
<p>Cloned from <a class="external" href="https://bugzilla.redhat.com/show_bug.cgi?id=1269352">https://bugzilla.redhat.com/show_bug.cgi?id=1269352</a></p> Bug #12137 (Closed): "katello-service stop" is killing services in the wrong orderhttps://projects.theforeman.org/issues/121372015-10-12T04:14:42ZAdam Ruzickaaruzicka@redhat.com
<p>Description of problem:</p>
<p>When we stop the katello-services , It stops in following sequences</p>
<p>SERVICES = {<br /> 'mongod' => 5,<br /> 'qpidd' => 10,<br /> 'qdrouterd' => 10,<br /> 'tomcat' => 20,<br /> 'tomcat6' => 20,<br /> 'elasticsearch' => 20,<br /> 'pulp_workers' => 20,<br /> 'pulp_celerybeat' => 20,<br /> 'pulp_resource_manager' => 20,<br /> 'foreman-proxy' => 20,<br /> 'httpd' => 30,<br /> 'foreman-tasks' => 30<br />}</p>
<p>The above priority is ok, when starting up the sub-systems (from low to high), but the order must be reversed when stopping them. Killing mongodb and qpid before stopping the foreman-task and pulp services are really really bad.</p>
<p>Version-Release number of selected component (if applicable):<br />6.1.1</p>
<p>How reproducible:</p>
<p>Steps to Reproduce:<br />1. # katello-service stop<br />2.<br />3.</p>
<p>Actual results:</p>
<p>Expected results: Services should be killed in the reverse order.</p>
<p>Additional info:</p>
<p>This could be easily fix as below.</p>
<p>def services_by_priority<br /> services = SERVICES.sort_by { |_, value| value }.map { |service| service<sup><a href="#fn0">0</a></sup> } - @options[:excluded]<br /> if @options[:action] == 'stop'<br /> services.reverse<br /> else<br /> services<br /> end<br />end</p>
<p>Cloned from BZ1269352</p>