Skip to content

[Bug]: Minion does not restart after crash #69182

Done

Description

@prensing

What happened?

Occasionally, a minion on Linux will crash. Obviously not good, but it should then attempt to restart so that it is not completely offline.

I think the systemd service file should be augmented to include restart capability. This would include lines for "Restart" and probably some limits like with "StartLimitIntervalSec" and "StartLimitBurst".

Type of salt install

Official deb

Major version

3007.x

What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)

debian-12

salt --versions-report output

Salt Version:
          Salt: 3008.0rc4
 
Python Version:
        Python: 3.14.5 (main, May 12 2026, 03:56:57) [GCC 11.2.0]
 
Dependency Versions:
          cffi: 2.0.0
      cherrypy: 18.10.0
  cryptography: 48.0.0
      dateutil: 2.9.0.post0
     docker-py: Not Installed
         gitdb: 4.0.12
     gitpython: 3.1.49
        Jinja2: 3.1.6
       libgit2: Not Installed
  looseversion: 1.3.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.1.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 24.0
     pycparser: 3.00
      pycrypto: Not Installed
  pycryptodome: 3.23.0
        pygit2: Not Installed
  python-gnupg: 0.5.6
        PyYAML: 6.0.3
         PyZMQ: 27.1.0
        relenv: 0.22.11
         smmap: 5.0.3
       timelib: 0.3.0
       Tornado: 6.5.5
           ZMQ: 4.3.5
 
Salt Package Information:
  Package Type: onedir
 
System Versions:
          dist: ubuntu 22.04.5 jammy
        locale: utf-8
       machine: x86_64
       release: 5.15.0-143-generic
        system: Linux
       version: Ubuntu 22.04.5 jammy

Activity

  1. added
    bug
    on May 18, 2026
  2. campbellmc commented on May 20, 2026

    @campbellmc
    Contributor

    In 3007.14 on Rocky 9 too - unhandled exception results in service failed.

  3. OrangeDog commented on May 20, 2026

    @OrangeDog
    Contributor

    When configuring this, you should also disable Salt's own attempt at it:

    [Service]
    ExecStart=
    ExecStart=/usr/bin/salt-minion --disable-keepalive
    KillMode=mixed
    Restart=on-failure
    RestartSec=15
    StartLimitBurst=3
    StartLimitInterval=300
  4. prensing commented on May 20, 2026

    @prensing
    Author

    When configuring this, you should also disable Salt's own attempt at it:
    ....

    I am not sure that this is relevant. Based on my situation, the minion is crashing, so its keep-alive code can't do anything. My suggestion is that you would want the internal keep-alive working, but the systemd restart is for a "last ditch" fix.

    I do agree with the restart entries in the Service file, apart from disabling keep-alive.

  5. OrangeDog commented on May 20, 2026

    @OrangeDog
    Contributor

    If you're having systemd do it, there's no point having Salt do it too. It's just a waste of resources having another process running just for restarting the first one.

    See also #68544, #68406.

  6. prensing commented on May 20, 2026

    @prensing
    Author

    OK, maybe. I don't know the code, but I assume that an internal keep-alive does more than just catch exceptions, and maybe is quicker at restarting from scratch.

    Either way, right now, the minion can crash and is then dead until there is outside intervention.

  7. campbellmc commented on May 21, 2026

    @campbellmc
    Contributor

    This is the crux of the matter. Unhandled exceptions crashing the minion.

  8. added this to the Sulphur v3006.28 milestone on Jul 4, 2026
  9. added
    severity-medium
    on Oct 21, 2026
  10. added a commit that references this issue on Oct 22, 2026
    c97c8a1
  11. added 4 commits that reference this issue on Nov 24, 2026
    c3745d9
    f11208c
    6d38f51
    c5211c6
  12. dwoz commented on Nov 24, 2026

    @dwoz
    Contributor

    Fixed by #69671; will ship in 3008.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugseverity-medium

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions