Skip to content

Commit

Permalink
Dev: pre-migration: add service status checks (jsc#PED-11808)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasyang2022 committed Dec 17, 2024
1 parent 3155154 commit d842bc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crmsh/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ def check_dependency_version(handler: CheckResultHandler):
def check_service_status(handler: CheckResultHandler):
handler.log_info('Checking service status...')
manager = service_manager.ServiceManager()
active_services = [x for x in ['corosync', 'pacemaker'] if manager.service_is_active(x)]
if active_services:
handler.handle_problem(False, 'Cluster services are running', (f'* {x}' for x in active_services))
inactive_services = [x for x in ['corosync', 'pacemaker'] if not manager.service_is_active(x)]
if any(inactive_services):
handler.handle_problem(False, 'Cluster services are not running', (f'* {x}' for x in inactive_services))


def check_unsupported_corosync_features(handler: CheckResultHandler):
Expand Down

0 comments on commit d842bc1

Please sign in to comment.