saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.09k stars 5.47k forks source link

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

Open ScriptAutomate opened 3 years ago

ScriptAutomate commented 3 years ago

Description

This was discovered as part of working on #58112

Not sure what is going on here:

https://github.com/saltstack/salt/blob/8afbb8e00556e0d491f6052308469e9f4a0c7672/salt/config/__init__.py#L1486-L1487

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:

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

Type of documentation

Location or format of documentation

https://github.com/saltstack/salt/blob/8afbb8e00556e0d491f6052308469e9f4a0c7672/salt/config/__init__.py#L1486-L1487

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
sagetherage commented 3 years ago

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

s0undt3ch commented 3 years ago

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