35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
|
From f8c0811c3a05ef334eef1943a906fe01b13c1afc Mon Sep 17 00:00:00 2001
|
||
|
From: Federico Ceratto <federico.ceratto@suse.com>
|
||
|
Date: Wed, 25 Jul 2018 10:33:09 +0000
|
||
|
Subject: [PATCH] Fix mine.get not returning data (Workaround for #48020)
|
||
|
|
||
|
---
|
||
|
salt/utils/minions.py | 8 ++++----
|
||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/salt/utils/minions.py b/salt/utils/minions.py
|
||
|
index c3acc6ba90..bb0cbaa589 100644
|
||
|
--- a/salt/utils/minions.py
|
||
|
+++ b/salt/utils/minions.py
|
||
|
@@ -239,12 +239,12 @@ class CkMinions(object):
|
||
|
Retreive complete minion list from PKI dir.
|
||
|
Respects cache if configured
|
||
|
'''
|
||
|
- if self.opts.get('__role') == 'master' and self.opts.get('__cli') == 'salt-run':
|
||
|
- # Compiling pillar directly on the master, just return the master's
|
||
|
- # ID as that is the only one that is available.
|
||
|
- return [self.opts['id']]
|
||
|
minions = []
|
||
|
pki_cache_fn = os.path.join(self.opts['pki_dir'], self.acc, '.key_cache')
|
||
|
+ try:
|
||
|
+ os.makedirs(os.path.dirname(pki_cache_fn))
|
||
|
+ except OSError:
|
||
|
+ pass
|
||
|
try:
|
||
|
if self.opts['key_cache'] and os.path.exists(pki_cache_fn):
|
||
|
log.debug('Returning cached minion list')
|
||
|
--
|
||
|
2.17.1
|
||
|
|
||
|
|