{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/25937","labels_url":"https://api.github.com/repos/saltstack/salt/issues/25937/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/25937/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/25937/events","html_url":"https://github.com/saltstack/salt/issues/25937","id":98473915,"number":25937,"title":"2015.5.3: Batch mode runs incorrectly","user":{"login":"nicholascapo","id":3730819,"avatar_url":"https://avatars.githubusercontent.com/u/3730819?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholascapo","html_url":"https://github.com/nicholascapo","followers_url":"https://api.github.com/users/nicholascapo/followers","following_url":"https://api.github.com/users/nicholascapo/following{/other_user}","gists_url":"https://api.github.com/users/nicholascapo/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholascapo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholascapo/subscriptions","organizations_url":"https://api.github.com/users/nicholascapo/orgs","repos_url":"https://api.github.com/users/nicholascapo/repos","events_url":"https://api.github.com/users/nicholascapo/events{/privacy}","received_events_url":"https://api.github.com/users/nicholascapo/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/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":2463,"closed_issues":2452,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-08-13T17:42:04Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-07-31T21:27:38Z","updated_at":"2015-08-13T17:42:04Z","closed_at":"2015-08-13T17:42:04Z","body":"Using batch mode for an operation starts with the correct number of minions per batch but quickly degrades to running one at a time.\r\nIn other words `-b N` quickly becomes `-b 1` in the middle of a salt run.\r\nThis seems related to (but different than) https://github.com/saltstack/salt/issues/24875, as we were seeing this behavior leading up to the the crash in that bug.\r\n\r\nAlso the output is frequently messed up and incomplete.\r\n\r\n--------------------------------------------------------------------------------------------\r\n\r\n```\r\n$ salt --versions-report\r\n                  Salt: 2015.5.3\r\n                Python: 2.7.3 (default, Mar 13 2014, 11:03:55)\r\n                Jinja2: 2.6\r\n              M2Crypto: 0.21.1\r\n        msgpack-python: 0.1.10\r\n          msgpack-pure: Not Installed\r\n              pycrypto: 2.6\r\n               libnacl: Not Installed\r\n                PyYAML: 3.10\r\n                 ioflo: Not Installed\r\n                 PyZMQ: 13.1.0\r\n                  RAET: Not Installed\r\n                   ZMQ: 3.2.3\r\n                  Mako: 0.7.0\r\n               Tornado: 4.0.2\r\n Debian source package: 2015.5.3+ds-1~bpo70+2\r\n```\r\n\r\n```\r\n$ salt ids* test.version\r\nids999:\r\n    2015.5.3\r\nids5:\r\n    2015.5.3\r\nids6:\r\n    2015.5.3\r\nids4:\r\n    2015.5.3\r\nids3:\r\n    2015.5.3\r\nids2:\r\n    2015.5.3\r\nids1:\r\n    2015.5.3\r\n```\r\n\r\n```\r\n$ salt ids* -b 2 test.ping\r\n\r\nExecuting run on ['ids999', 'ids3'] <====================== two\r\n\r\nids3:\r\n    True\r\nretcode:\r\n    0\r\nids999:\r\n    True\r\nretcode:\r\n    0\r\n\r\nExecuting run on ['ids2', 'ids5'] <====================== two\r\n\r\nids2:\r\n    True\r\nretcode:\r\n    0\r\n\r\nExecuting run on ['ids4'] <====================== one!\r\n\r\nids5:\r\n    True\r\nretcode:\r\n    0\r\n\r\nExecuting run on ['ids6'] <====================== one!\r\n\r\nids4:\r\n    True\r\nretcode:\r\n    0\r\n\r\nExecuting run on ['ids1'] <====================== one!\r\n\r\nids6:\r\n    True\r\nretcode:\r\n    0\r\nids1:\r\n    True\r\nretcode:\r\n    0\r\n```\r\n\r\nStrangely this seems to not always happen, it never fails this test case:\r\n\r\n```\r\n$ salt ids* -b 2 cmd.run 'sleep 5s'\r\n\r\nExecuting run on ['ids1', 'ids3']\r\n\r\nids3:\r\nretcode:\r\n    0\r\nids1:\r\nretcode:\r\n    0\r\n\r\nExecuting run on ['ids2', 'ids5']\r\n\r\nids5:\r\nretcode:\r\n    0\r\nids2:\r\nretcode:\r\n    0\r\n\r\nExecuting run on ['ids4', 'ids6']\r\n\r\nids6:\r\nretcode:\r\n    0\r\nids4:\r\nretcode:\r\n    0\r\n\r\nExecuting run on ['ids999']\r\n\r\nids999:\r\nretcode:\r\n    0\r\n\r\n```\r\n\r\nBut highstate runs are very strange:\r\n```\r\n$ salt ids* -b 2 state.highstate\r\n\r\nExecuting run on ['ids1', 'ids3']\r\n\r\nids3:\r\n  Name: /etc/nginx/conf - Function: file.recurse - Result: Changed\r\n  Name: nginx - Function: service.running - Result: Changed\r\n  Name: /usr/local/v/deployer - Function: file.recurse - Result: Changed\r\n  Name: v-deployer - Function: service.running - Result: Changed\r\n  Name: /etc/elasticsearch/elasticsearch.yml - Function: file.managed - Result: Changed\r\n  Name: elasticsearch - Function: service.running - Result: Changed\r\n  Name: /etc/sensu/plugins/mysql-metrics - Function: file.managed - Result: Changed\r\n\r\nSummary\r\n--------------\r\nSucceeded: 661 (changed=7)\r\nFailed:      0\r\n--------------\r\nTotal states run:     661\r\n\r\nExecuting run on ['ids2']\r\n\r\n              ----------\r\n              ids1:\r\n                  ----------\r\n\r\nExecuting run on ['ids5']\r\n\r\n              ----------\r\n              ids2:\r\n                  ----------\r\n\r\nExecuting run on ['ids4']\r\n\r\nids5:\r\n  Name: /etc/nginx/conf - Function: file.recurse - Result: Changed\r\n  Name: nginx - Function: service.running - Result: Changed\r\n  Name: /usr/local/v/deployer - Function: file.recurse - Result: Changed\r\n  Name: v-deployer - Function: service.running - Result: Changed\r\n  Name: /etc/elasticsearch/elasticsearch.yml - Function: file.managed - Result: Changed\r\n  Name: elasticsearch - Function: service.running - Result: Changed\r\n  Name: /etc/sensu/plugins/mysql-metrics - Function: file.managed - Result: Changed\r\n\r\nSummary\r\n--------------\r\nSucceeded: 661 (changed=7)\r\nFailed:      0\r\n--------------\r\nTotal states run:     661\r\n\r\nExecuting run on ['ids6']\r\n\r\n              ----------\r\n              ids4:\r\n                  ----------\r\n\r\nExecuting run on ['ids999']\r\n\r\n              ----------\r\n              ids6:\r\n                  ----------\r\nids999:\r\n  Name: /etc/nginx/conf - Function: file.recurse - Result: Changed\r\n  Name: nginx - Function: service.running - Result: Changed\r\n  Name: /usr/local/v/deployer - Function: file.recurse - Result: Changed\r\n  Name: v-deployer - Function: service.running - Result: Changed\r\n  Name: /etc/elasticsearch/elasticsearch.yml - Function: file.managed - Result: Changed\r\n  Name: elasticsearch - Function: service.running - Result: Changed\r\n  Name: /etc/sensu/plugins/mysql-metrics - Function: file.managed - Result: Changed\r\n\r\nSummary\r\n--------------\r\nSucceeded: 661 (changed=7)\r\nFailed:      0\r\n--------------\r\nTotal states run:     661\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/130775884","html_url":"https://github.com/saltstack/salt/issues/25937#issuecomment-130775884","issue_url":"https://api.github.com/repos/saltstack/salt/issues/25937","id":130775884,"user":{"login":"jfindlay","id":702905,"avatar_url":"https://avatars.githubusercontent.com/u/702905?v=3","gravatar_id":"","url":"https://api.github.com/users/jfindlay","html_url":"https://github.com/jfindlay","followers_url":"https://api.github.com/users/jfindlay/followers","following_url":"https://api.github.com/users/jfindlay/following{/other_user}","gists_url":"https://api.github.com/users/jfindlay/gists{/gist_id}","starred_url":"https://api.github.com/users/jfindlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfindlay/subscriptions","organizations_url":"https://api.github.com/users/jfindlay/orgs","repos_url":"https://api.github.com/users/jfindlay/repos","events_url":"https://api.github.com/users/jfindlay/events{/privacy}","received_events_url":"https://api.github.com/users/jfindlay/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T17:42:03Z","updated_at":"2015-08-13T17:42:03Z","body":"Closing in favor of #26254."}}