{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/26254","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/26254/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/26254/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/26254/events","html_url":"https://github.com/saltstack/salt/issues/26254","id":100582922,"number":26254,"title":"Batch mode - some minion's result missing in output","user":{"login":"ze42","id":2089076,"avatar_url":"https://avatars.githubusercontent.com/u/2089076?v=3","gravatar_id":"","url":"https://api.github.com/users/ze42","html_url":"https://github.com/ze42","followers_url":"https://api.github.com/users/ze42/followers","following_url":"https://api.github.com/users/ze42/following{/other_user}","gists_url":"https://api.github.com/users/ze42/gists{/gist_id}","starred_url":"https://api.github.com/users/ze42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ze42/subscriptions","organizations_url":"https://api.github.com/users/ze42/orgs","repos_url":"https://api.github.com/users/ze42/repos","events_url":"https://api.github.com/users/ze42/events{/privacy}","received_events_url":"https://api.github.com/users/ze42/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Core","name":"Core","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Fixed%20Pending%20Verification","name":"Fixed Pending Verification","color":"d4c5f9"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P2","name":"P2","color":"155fb5"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":3059,"closed_issues":3597,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2016-05-05T20:34:23Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2015-08-12T16:30:29Z","updated_at":"2016-05-05T20:46:33Z","closed_at":"2015-09-03T23:14:01Z","body":"Tested versions, with same behaviours:\r\n\r\n- 2015.5.3 (debian package)\r\n- git v2015.5.3\r\n- git v2015.8.0rc3\r\n- git develop (commit: eca42b1 from Wed Aug 12 09:20:54 2015 -0600)\r\n\r\n\r\nTesting with just test.version as command, the batch mode seems to \"miss\" some results.\r\n\r\n\r\nSince some time (was not in 2014.7, but is present in 2015.5), batch mode tends to relaunch the missing amount of minions when a few sent their results. That's nice to not wait for *everyone* to finish before launching the next ones, but unfortunately, it fails to get all results, making it much harder to use.\r\n\r\n\r\n\r\nCalling it directly gives a fast answer right away:\r\n\r\n```\r\n# time salt '*' test.version\r\nminion00:\r\n    2015.8.0rc3\r\nminion01:\r\n    2015.8.0rc3\r\nminion07:\r\n    2015.8.0rc3\r\nminion05:\r\n    2015.8.0rc3\r\nminion08:\r\n    2015.8.0rc3\r\nminion02:\r\n    2015.8.0rc3\r\nminion06:\r\n    2015.8.0rc3\r\nminion09:\r\n    2015.8.0rc3\r\nminion03:\r\n    2015.8.0rc3\r\nminion04:\r\n    2015.8.0rc3\r\n\r\nreal    0m2.626s\r\nuser    0m0.140s\r\nsys     0m0.128s\r\n```\r\n\r\nBut calling it in batch mode can lead to missing answers:\r\n\r\n\r\n```\r\n# time salt -b 3 --out=yaml --out-file=/tmp/versions '*' test.version\r\n\r\nExecuting run on ['minion09', 'minion08', 'minion01']\r\n\r\n\r\nExecuting run on ['minion00', 'minion03']\r\n\r\n\r\nExecuting run on ['minion02']\r\n\r\n\r\nExecuting run on ['minion05']\r\n\r\n\r\nExecuting run on ['minion04']\r\n\r\n\r\nExecuting run on ['minion07']\r\n\r\n\r\nExecuting run on ['minion06']\r\n\r\n\r\nreal    0m22.795s\r\nuser    0m0.272s\r\nsys     0m0.156s\r\n```\r\n\r\nWith output file:\r\n\r\n```\r\nminion08: 2015.8.0rc3\r\nretcode: 0\r\nminion01: 2015.8.0rc3\r\nretcode: 0\r\nminion09: 2015.8.0rc3\r\nretcode: 0\r\nminion03: 2015.8.0rc3\r\nretcode: 0\r\nminion00: 2015.8.0rc3\r\nretcode: 0\r\nminion02: {}\r\nminion05: {}\r\nminion04: {}\r\nminion07: {}\r\nminion06: {}\r\n```\r\n\r\nSome minions with \"missed\" result gives an empty dict, rather than having a retcode and the version.\r\n\r\nChecking jobs, they did get reply pretty fast, but were ignored.\r\n\r\n\r\nEasily reproduced with a small amount of minions, just need to batch with more than 1, and less then all. Might need to run it multiple time to have the buggy behaviour."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/217273458","html_url":"https://github.com/saltstack/salt/issues/26254#issuecomment-217273458","issue_url":"https://api.github.com/repos/saltstack/salt/issues/26254","id":217273458,"user":{"login":"boboli","id":4108038,"avatar_url":"https://avatars.githubusercontent.com/u/4108038?v=3","gravatar_id":"","url":"https://api.github.com/users/boboli","html_url":"https://github.com/boboli","followers_url":"https://api.github.com/users/boboli/followers","following_url":"https://api.github.com/users/boboli/following{/other_user}","gists_url":"https://api.github.com/users/boboli/gists{/gist_id}","starred_url":"https://api.github.com/users/boboli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boboli/subscriptions","organizations_url":"https://api.github.com/users/boboli/orgs","repos_url":"https://api.github.com/users/boboli/repos","events_url":"https://api.github.com/users/boboli/events{/privacy}","received_events_url":"https://api.github.com/users/boboli/received_events","type":"User","site_admin":false},"created_at":"2016-05-05T20:46:33Z","updated_at":"2016-05-05T20:46:33Z","body":"I'm running into this problem as well, and I'm using salt version 2015.8.7 on both master and minions. And in my case, I'm batching with size 1, and occasionally getting \"retcode: 0\" as the only output."}}