{"action":"opened","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/21986","labels_url":"https://api.github.com/repos/saltstack/salt/issues/21986/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/21986/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/21986/events","html_url":"https://github.com/saltstack/salt/issues/21986","id":64283125,"number":21986,"title":"Using mine.get while targeting grain returns data from dead minions","user":{"login":"numkem","id":332423,"avatar_url":"https://avatars.githubusercontent.com/u/332423?v=3","gravatar_id":"","url":"https://api.github.com/users/numkem","html_url":"https://github.com/numkem","followers_url":"https://api.github.com/users/numkem/followers","following_url":"https://api.github.com/users/numkem/following{/other_user}","gists_url":"https://api.github.com/users/numkem/gists{/gist_id}","starred_url":"https://api.github.com/users/numkem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numkem/subscriptions","organizations_url":"https://api.github.com/users/numkem/orgs","repos_url":"https://api.github.com/users/numkem/repos","events_url":"https://api.github.com/users/numkem/events{/privacy}","received_events_url":"https://api.github.com/users/numkem/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-25T14:30:18Z","updated_at":"2015-03-25T14:30:18Z","closed_at":null,"body":"Hello,\r\n\r\nI'm currently running 2014.7.2 and after removing some minions that were VMs using Foreman with the foreman-salt plugging (hence deleting their keys), the data I get from mine while targeting using grain is always from the minions that are now gone.\r\n\r\nI've tried using `salt-run cache.clear_all tgt='*'`, `salt '*' saltutil.clear_cache` and `salt '*' mine.flush` and nothing seems to change the outcome.\r\n\r\nWhat I'm trying to run is `salt-call mine.get 'kernel:Linux' backend_ip_addr grain` in a template so it looks like `{% for host, ips in salt['mine.get']('kernel:Linux', 'backend_ip_addr', 'grain').items() %}`.\r\n\r\nIf I do `salt-call mine.get '*' backend_ip_addr` I get data without the dead minions. Weirdly enough If do something like `salt-call mine.get 'os:Ubuntu' backend_ip_addr grain`. I only get data from the same host as the minion I'm running this on even if there is many more minions that are running Ubuntu.\r\n\r\nI've tried to target minions using pillar and I get either nothing or things that doesn't make sense...\r\n\r\nThank you."}}