Skip to content

[DOCS] Is key_logfile meant to be a deprecated minion/master config option? #58893

Closed as not planned

Description

@ScriptAutomate

Description

This was discovered as part of working on #58112

Not sure what is going on here:

salt/salt/config/__init__.py

Lines 1486 to 1487 in 8afbb8e

# XXX: Remove 'key_logfile' support in 2014.1.0
"key_logfile": os.path.join(salt.syspaths.LOGS_DIR, "key"),

This option has a comment saying it was meant to be removed long ago, first introduced as a comment 7 years ago:

Either this is meant to be deprecated or it is meant to stay.

Suggested Fix

If it is meant to stay:

  • Remove the comment
  • Add the appropriate information needed to the minion/master confs that support it, and the associate .rst files

If it is meant to go, create a deprecation path.

  • Create a deprecation path

Type of documentation

  • minion/master configuration files
  • Salt Documentation (.rst) for master/minion configuration files

Location or format of documentation

salt/salt/config/__init__.py

Lines 1486 to 1487 in 8afbb8e

# XXX: Remove 'key_logfile' support in 2014.1.0
"key_logfile": os.path.join(salt.syspaths.LOGS_DIR, "key"),

Depending on what path is taken on what will be done with the option, the following files may be impacted in docs:

Master:

Minion:

Additional context

Assigning Pedro since past-Pedro seemed to know something about this back in an earlier time of Salt land, when version numbers were much smaller and elsewhere on the periodic table.

If it does go the deprecation path, it appears in several places as being used:

20:24 $ grep -Inr "key_logfile" | grep -v "_build"
salt/utils/parsers.py:2483:    _logfile_config_setting_name_ = "key_logfile"
salt/config/__init__.py:178:        # key_logfile, pidfile:
salt/config/__init__.py:709:        "key_logfile": str,
salt/config/__init__.py:1486:        # XXX: Remove 'key_logfile' support in 2014.1.0
salt/config/__init__.py:1487:        "key_logfile": os.path.join(salt.syspaths.LOGS_DIR, "key"),
salt/config/__init__.py:2361:    for config_key in ("log_file", "key_logfile", "syndic_log_file"):
salt/config/__init__.py:3682:    for config_key in ("log_file", "key_logfile"):
salt/config/__init__.py:3886:    for config_key in ("log_file", "key_logfile", "ssh_log_file"):
doc/man/salt.7:16525:# key_logfile, pidfile, autosign_grains_dir:
doc/man/salt.7:17655:#key_logfile: /var/log/salt/key
doc/man/salt.7:18601:#key_logfile: /var/log/salt/key
doc/man/salt.7:19312:#key_logfile: /var/log/salt/key
conf/suse/master:40:# key_logfile, pidfile, autosign_grains_dir:
conf/suse/master:1076:#key_logfile: /var/log/salt/key
conf/minion:777:#key_logfile: /var/log/salt/key
conf/master:42:# key_logfile, pidfile, autosign_grains_dir:
conf/master:1172:#key_logfile: /var/log/salt/key
conf/proxy:542:#key_logfile: /var/log/salt/key
tests/unit/test_config.py:255:            wfh.write("root_dir: /\n" "key_logfile: key\n")
tests/unit/test_config.py:262:            wfh.write("root_dir: /\n" "key_logfile: key\n")
tests/unit/test_config.py:268:        temp_config = "root_dir: /\n" "key_logfile: key\n"
tests/unit/test_config.py:270:            temp_config = "root_dir: c:\\\n" "key_logfile: key\n"
tests/unit/test_config.py:282:        self.assertEqual(config["key_logfile"], expect_path_join)
tests/unit/test_config.py:284:        self.assertNotEqual(config["key_logfile"], expect_sep_join)
tests/unit/utils/test_parsers.py:569:        if log_file_name == "key_logfile":
tests/unit/utils/test_parsers.py:815:        self.logfile_config_setting_name = "key_logfile"
tests/unit/utils/test_parsers.py:823:        self.key_logfile = "/tmp/key_logfile"
tests/unit/utils/test_parsers.py:872:            self.logfile_config_setting_name: "key_logfile",
tests/unit/utils/test_parsers.py:924:        if os.path.exists(self.key_logfile):
tests/unit/utils/test_parsers.py:925:            os.unlink(self.key_logfile)
tests/integration/files/conf/master:18:key_logfile: key.log

Activity

  1. added
    documentation
    on Nov 6, 2020
  2. added this to the Approved milestone on Feb 16, 2021
  3. sagetherage commented on Feb 16, 2021

    @sagetherage
    Contributor

    this seems small can we get it in for AL @s0undt3ch ?

  4. s0undt3ch commented on Aug 25, 2021

    @s0undt3ch
    Contributor

    I believe that should stay. It's a way to separate key handling logs from master logs...

  5. added
    severity-medium
    on Feb 14, 2022
  6. removed their assignment
    on Jun 4, 2024
  7. 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.

  8. peterupton commented on Oct 16, 2026

    @peterupton

    key_logfile remains active and tested in 3008.x, but the stale source comment still says to remove it in 2014.1.0. It is not clearly documented as supported or deprecated in the master/minion configuration references, so the issue remains unresolved.

  9. dwoz commented on Oct 22, 2026

    @dwoz
    Contributor

    Reopening based on the follow-up comment above.

  10. reopened this on Oct 22, 2026
  11. dwoz commented on Oct 28, 2026

    @dwoz
    Contributor

    Closing — consolidated into #70585. The checkbox for this item is in the appropriate theme section of that tracker. Please pick up the sub-item there.

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

    documentationseverity-mediumtime-estimate-sprint

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions