Skip to content

Unclean shutdown on SIGINT / SIGTERM #2136

@mdyring

Description

@mdyring

Summary of Bug

gaiad returns a non-zero exit code (1) after receiving SIGINT as well as SIGTERM.

This is problematic, as this is interpreted as an unclean shutdown (especially for the systemd crowd).

Not being able to differentiate between an intentional service stop or a real problem/unclean shutdown complicates monitoring and alerting on the service.

Steps to Reproduce

Dummy gaia.service file:

[Unit]
Description=Gaia Service
Requires=network-online.target
After=network-online.target

[Service]
User=gaia-daemon
Type=simple
RootDirectory=/opt/gaia
WorkingDirectory=/
ExecStart=/bin/gaiad start --home /
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target

Notice the 1/FAILURE after starting and stopping the service:

systemctl status gaia
* gaia.service - Gaia Service
   Loaded: loaded (/etc/systemd/system/gaia.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Thu 2018-08-23 17:10:43 CEST; 4min 57s ago
  Process: 53832 ExecStart=/bin/gaiad start --home / (code=exited, status=1/FAILURE)
 Main PID: 53832 (code=exited, status=1/FAILURE)

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

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