Project

General

Profile

Bug #12137

"katello-service stop" is killing services in the wrong order

Added by Adam Ruzicka almost 4 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Difficulty:
trivial
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

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

Associated revisions

Revision da3fa3c6 (diff)
Added by Adam Ruzicka almost 4 years ago

Fixes #12137 - Stops katello services in right order

Revision e8bf4770
Added by Eric D Helms almost 4 years ago

Merge pull request #84 from adamruzicka/bz/1269352

Fixes #12137 - Stops katello services in right order

History

#2 Updated by The Foreman Bot almost 4 years ago

  • Status changed from Assigned to Ready For Testing

#3 Updated by Eric Helms almost 4 years ago

  • Status changed from Ready For Testing to Closed
  • Triaged changed from No to Yes

#4 Updated by Bryan Kearney almost 4 years ago

  • Bugzilla link set to 1269352

#5 Updated by Eric Helms over 3 years ago

  • Legacy Backlogs Release (now unused) set to 70

#6 Updated by Greg Sutcliffe 11 months ago

  • Target version deleted (Katello 2.4.0)

Also available in: Atom PDF