Skip to content

service restart exits OK, even if there were issues #821

@ehelms

Description

@ehelms

Migrated from https://projects.theforeman.org/issues/34431

[root@centos8-stream-katello-nightly ~]# foreman-maintain service restart
Running Restart Services
================================================================================
Check if command is run as root user:                                 [OK]
--------------------------------------------------------------------------------
Restart applicable services: 

Stopping the following service(s):
redis, postgresql, pulpcore-api, pulpcore-content, pulpcore-worker@1.service, pulpcore-worker@2.service, tomcat, dynflow-sidekiq@orchestrator, foreman, httpd, dynflow-sidekiq@worker-1, dynflow-sidekiq@worker-hosts-queue-1, foreman-proxy
- stopping httpd                                                                
Warning: Stopping foreman.service, but it can still be activated by:
  foreman.socket
\ stopping pulpcore-content                                                     
Warning: Stopping pulpcore-api.service, but it can still be activated by:
  pulpcore-api.socket

Warning: Stopping pulpcore-content.service, but it can still be activated by:
  pulpcore-content.socket
| All services stopped                                                          

Starting the following service(s):
redis, postgresql, pulpcore-api, pulpcore-content, pulpcore-worker@1.service, pulpcore-worker@2.service, tomcat, dynflow-sidekiq@orchestrator, foreman, httpd, dynflow-sidekiq@worker-1, dynflow-sidekiq@worker-hosts-queue-1, foreman-proxy
\ starting httpd                                                                
Job for dynflow-sidekiq@orchestrator.service failed because the control process exited with error code.
See "systemctl status dynflow-sidekiq@orchestrator.service" and "journalctl -xe" for details.
/ All services started                                                [OK]      
--------------------------------------------------------------------------------
[root@centos8-stream-katello-nightly ~]# foreman-maintain service status
Running Status Services
================================================================================
Get status of applicable services: 
…
Some services are not running (dynflow-sidekiq@orchestrator)
--------------------------------------------------------------------------------
Scenario [Status Services] failed.

The following steps ended up in failing state:

  [service-status]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="service-status" 

Yes, my dynflow is really borked, no it's not F-M's fault, but it should detect that?

[root@centos8-stream-katello-nightly ~]# systemctl start dynflow-sidekiq@orchestrator
Job for dynflow-sidekiq@orchestrator.service failed because the control process exited with error code.
See "systemctl status dynflow-sidekiq@orchestrator.service" and "journalctl -xe" for details.
[root@centos8-stream-katello-nightly ~]# echo $?
1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions