Bug #12137
closed"katello-service stop" is killing services in the wrong order
Description
Description of problem:
When we stop the katello-services , It stops in following sequences
SERVICES = {
'mongod' => 5,
'qpidd' => 10,
'qdrouterd' => 10,
'tomcat' => 20,
'tomcat6' => 20,
'elasticsearch' => 20,
'pulp_workers' => 20,
'pulp_celerybeat' => 20,
'pulp_resource_manager' => 20,
'foreman-proxy' => 20,
'httpd' => 30,
'foreman-tasks' => 30
}
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.
Version-Release number of selected component (if applicable):
6.1.1
How reproducible:
Steps to Reproduce:
1. # katello-service stop
2.
3.
Actual results:
Expected results: Services should be killed in the reverse order.
Additional info:
This could be easily fix as below.
def services_by_priority
services = SERVICES.sort_by { |_, value| value }.map { |service| service0 } - @options[:excluded]
if @options[:action] == 'stop'
services.reverse
else
services
end
end
Cloned from BZ1269352
Updated by Adam Ruzicka over 9 years ago
Updated by The Foreman Bot over 9 years ago
- Status changed from Assigned to Ready For Testing
Updated by Eric Helms over 9 years ago
- Status changed from Ready For Testing to Closed
- Triaged changed from No to Yes
Updated by Eric Helms about 9 years ago
- Translation missing: en.field_release set to 70
Updated by Greg Sutcliffe over 6 years ago
- Target version deleted (
Katello 2.4.0)