From 412015b96e0d4935a99a3391a379f2a5b12f871f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Paw=C5=82owski?= Date: Tue, 21 Aug 2018 10:33:47 +0200 Subject: [PATCH] Fix token_file creation using external auth with salt-key salt-key with '--auth' and '--make-token' options needs to create token file. Options 'token_file' which is used as a path for token file is provided by config.client_config. --- salt/utils/parsers.py | 2 +- tests/unit/utils/test_parsers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/utils/parsers.py b/salt/utils/parsers.py index a4bee46633c3..a3774db47cc6 100644 --- a/salt/utils/parsers.py +++ b/salt/utils/parsers.py @@ -2522,7 +2522,7 @@ def process_config_dir(self): process_config_dir._mixin_prio_ = ConfigDirMixIn._mixin_prio_ def setup_config(self): - keys_config = config.master_config(self.get_config_file_path()) + keys_config = config.client_config(self.get_config_file_path()) if self.options.gen_keys: # Since we're generating the keys, some defaults can be assumed # or tweaked diff --git a/tests/unit/utils/test_parsers.py b/tests/unit/utils/test_parsers.py index 36b14a00720a..f2eb2286c1f5 100644 --- a/tests/unit/utils/test_parsers.py +++ b/tests/unit/utils/test_parsers.py @@ -712,7 +712,7 @@ def setUp(self): self.log_file = '/tmp/salt_key_parser_test' self.key_logfile = '/tmp/key_logfile' # Function to patch - self.config_func = 'salt.config.master_config' + self.config_func = 'salt.config.client_config' # Mock log setup self.setup_log()