Skip to content

About lossing salt minion key #58804

Closed as not planned
Closed as not planned

Description

@andyyumiao

If I deploy salt on docker, all files will be lost after the docker container is restarted, such as the salt minion key file. I manually use the same file '/etc/salt/master' to restart salt, but I can't get the previously authorized salt minion, and salt minion will not automatically re authenticate. How can I make salt minion re authenticate and connect?

Activity

  1. added
    bug
    on Oct 25, 2020
  2. erwindon commented on Oct 25, 2020

    @erwindon
    Contributor
  3. added this to the Blocked milestone on Oct 25, 2020
  4. self-assigned this
    on Oct 25, 2020
  5. andyyumiao commented on Oct 26, 2020

    @andyyumiao
    Author

    Andy,
    It looks like you did not use a "docker volume" to make some data from the container persistent. The key is stored in directory /etc/salt/pki/minion. You may want to place /etc/salt (and maybe also /srv?) in a volume.
    The description on https://docs.saltstack.com/en/master/topics/tutorials/docker_sls.html does not mention this.
    See https://hub.docker.com/layers/doghouseau/salt-minion/latest/images/sha256-13d8c8ea4fcc6c6c346464351e6921b74a625e0a874221ed685c8fcf1fff3729; or https://hub.docker.com/layers/derlih/salt-minion/latest/images/sha256-205fdb4b7777e423e551b8d7a4d7be139dde5c00bc3ecb0fb51340dceea9d867?context=explore for 2 examples where it is used. It's the line with the VOLUME command.

    Hi erwindon, But salt minion will not automatically reauth to the master?for example, through these three parameters:ping_interval、auth_safemode、auth_tries

  6. erwindon commented on Oct 26, 2020

    @erwindon
    Contributor

    A docker container with a volume behaves as a machine. once it is restarted, it just reads the keys that it has saved last time and continues working. just like a traditional installation where you just reboot the machine (or restart salt-minion).

  7. removed their assignment
    on Mar 16, 2021
  8. removed
    needs-more-info
    on Mar 16, 2021
  9. removed this from the Blocked milestone on Mar 16, 2021
  10. sagetherage commented on Mar 30, 2021

    @sagetherage
    Contributor

    Discussed in Tuesday Triage 2021-MAR-30 Documentation on how Salt runs outside of Docker but runs commands within the container could be clearer and more robust. If running Salt within containers volumes must be used - for persistent keys through container restarts.

  11. 4 remaining items

  12. dwoz commented on Oct 15, 2026

    @dwoz
    Contributor

    Thanks for the original report. This issue has been open for more than three years without recent activity and carries a severity label below severity-high. As part of a backlog cleanup, we're closing older low- and medium-severity issues so triage can focus on reports against currently supported releases.

    Closing isn't a judgement that the problem wasn't real — only that the codebase has moved through several releases since this was filed, and much of the surrounding code has changed.

    If you — or anyone else — can still reproduce this on the 3008.x LTS release, please leave a comment with a reproduction and a maintainer will reopen. The original reporter can also reopen directly.

  13. dwoz commented on Oct 17, 2026

    @dwoz
    Contributor

    Reopening — there is an open PR tracking a fix for this: #69554.

  14. reopened this on Oct 17, 2026
  15. dwoz commented on Oct 23, 2026

    @dwoz
    Contributor

    Closing as part of a backlog cleanup — this issue was filed without a Salt versions-report, so there's no explicit version attached to compare against.

    If you (or anyone else) can still reproduce this on 3008.3 or later, please comment with:

    • A fresh reproduction
    • The output of salt --versions-report

    and the issue will be reopened. The original reporter can also reopen directly.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdoc-reworkdocumentationseverity-mediumtime-estimate-sprint

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions