Fix manage.present to show lost minions

Fixes #38367 and and #43936.
This commit is contained in:
Ken Crowell 2017-10-09 12:18:25 -03:00
parent 0cd493b691
commit f3980d7d83
No known key found for this signature in database
GPG Key ID: C578611072B28527

View File

@ -578,10 +578,9 @@ class CkMinions(object):
if search is None:
return minions
addrs = salt.utils.network.local_port_tcp(int(self.opts['publish_port']))
if '127.0.0.1' in addrs or '0.0.0.0' in addrs:
# Add in possible ip addresses of a locally connected minion
if '127.0.0.1' in addrs:
# Add in the address of a possible locally-connected minion.
addrs.discard('127.0.0.1')
addrs.discard('0.0.0.0')
addrs.update(set(salt.utils.network.ip_addrs(include_loopback=include_localhost)))
if subset:
search = subset