{"action":"opened","number":32027,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/32027","id":63617649,"html_url":"https://github.com/saltstack/salt/pull/32027","diff_url":"https://github.com/saltstack/salt/pull/32027.diff","patch_url":"https://github.com/saltstack/salt/pull/32027.patch","issue_url":"https://api.github.com/repos/saltstack/salt/issues/32027","number":32027,"state":"open","locked":false,"title":"`AsyncTCPPubChannel.send` should not raise StreamClosedError","user":{"login":"skizunov","id":11562452,"avatar_url":"https://avatars.githubusercontent.com/u/11562452?v=3","gravatar_id":"","url":"https://api.github.com/users/skizunov","html_url":"https://github.com/skizunov","followers_url":"https://api.github.com/users/skizunov/followers","following_url":"https://api.github.com/users/skizunov/following{/other_user}","gists_url":"https://api.github.com/users/skizunov/gists{/gist_id}","starred_url":"https://api.github.com/users/skizunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skizunov/subscriptions","organizations_url":"https://api.github.com/users/skizunov/orgs","repos_url":"https://api.github.com/users/skizunov/repos","events_url":"https://api.github.com/users/skizunov/events{/privacy}","received_events_url":"https://api.github.com/users/skizunov/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\nSome callers, such as `AsyncAuth.sign_in` expect `AsyncTCPPubChannel.send`\r\nto succeed or return a specific exception such as `SaltReqTimeoutError` or\r\n`SaltClientError`. If a different exception is thrown, it will not try to\r\nreconnect to any master(s) and so the salt-minion is effectively inactive.\r\nWhen the salt-master disconnects (eg shutdown for maintenance), internally\r\nthere will be a `tornado.iostream.StreamClosedError` in the salt-minion.\r\nNow, we convert this to a `SaltClientError` so that it will be more\r\nrecognizable to the caller.\r\n\r\nAlso, sometimes `SaltMessageClient.timeout_message` is still invoked after\r\na `StreamClosedError`. To avoid a `KeyError`, always check to make sure\r\n`message_id` is still in `self.send_future_map` before trying to access\r\nit.\r\n\r\n### What issues does this PR fix or reference?\r\n\r\n### Previous Behavior\r\n\r\n### New Behavior\r\n\r\n### Tests written?\r\n- [ ] Yes\r\n- [X] No\r\n\r\nSigned-off-by: Sergey Kizunov <sergey.kizunov@ni.com>","created_at":"2016-03-21T19:19:58Z","updated_at":"2016-03-21T19:19:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/saltstack/salt/pulls/32027/commits","review_comments_url":"https://api.github.com/repos/saltstack/salt/pulls/32027/comments","review_comment_url":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/32027/comments","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/7135722176313757f39275355305011ae9d760d1","head":{"label":"skizunov:develop2","ref":"develop2","sha":"7135722176313757f39275355305011ae9d760d1","user":{"login":"skizunov","id":11562452,"avatar_url":"https://avatars.githubusercontent.com/u/11562452?v=3","gravatar_id":"","url":"https://api.github.com/users/skizunov","html_url":"https://github.com/skizunov","followers_url":"https://api.github.com/users/skizunov/followers","following_url":"https://api.github.com/users/skizunov/following{/other_user}","gists_url":"https://api.github.com/users/skizunov/gists{/gist_id}","starred_url":"https://api.github.com/users/skizunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skizunov/subscriptions","organizations_url":"https://api.github.com/users/skizunov/orgs","repos_url":"https://api.github.com/users/skizunov/repos","events_url":"https://api.github.com/users/skizunov/events{/privacy}","received_events_url":"https://api.github.com/users/skizunov/received_events","type":"User","site_admin":false},"repo":{"id":32545802,"name":"salt","full_name":"skizunov/salt","owner":{"login":"skizunov","id":11562452,"avatar_url":"https://avatars.githubusercontent.com/u/11562452?v=3","gravatar_id":"","url":"https://api.github.com/users/skizunov","html_url":"https://github.com/skizunov","followers_url":"https://api.github.com/users/skizunov/followers","following_url":"https://api.github.com/users/skizunov/following{/other_user}","gists_url":"https://api.github.com/users/skizunov/gists{/gist_id}","starred_url":"https://api.github.com/users/skizunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skizunov/subscriptions","organizations_url":"https://api.github.com/users/skizunov/orgs","repos_url":"https://api.github.com/users/skizunov/repos","events_url":"https://api.github.com/users/skizunov/events{/privacy}","received_events_url":"https://api.github.com/users/skizunov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skizunov/salt","description":"Infrastructure automation and management system","fork":true,"url":"https://api.github.com/repos/skizunov/salt","forks_url":"https://api.github.com/repos/skizunov/salt/forks","keys_url":"https://api.github.com/repos/skizunov/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skizunov/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skizunov/salt/teams","hooks_url":"https://api.github.com/repos/skizunov/salt/hooks","issue_events_url":"https://api.github.com/repos/skizunov/salt/issues/events{/number}","events_url":"https://api.github.com/repos/skizunov/salt/events","assignees_url":"https://api.github.com/repos/skizunov/salt/assignees{/user}","branches_url":"https://api.github.com/repos/skizunov/salt/branches{/branch}","tags_url":"https://api.github.com/repos/skizunov/salt/tags","blobs_url":"https://api.github.com/repos/skizunov/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skizunov/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skizunov/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/skizunov/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skizunov/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/skizunov/salt/languages","stargazers_url":"https://api.github.com/repos/skizunov/salt/stargazers","contributors_url":"https://api.github.com/repos/skizunov/salt/contributors","subscribers_url":"https://api.github.com/repos/skizunov/salt/subscribers","subscription_url":"https://api.github.com/repos/skizunov/salt/subscription","commits_url":"https://api.github.com/repos/skizunov/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/skizunov/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/skizunov/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/skizunov/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/skizunov/salt/contents/{+path}","compare_url":"https://api.github.com/repos/skizunov/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skizunov/salt/merges","archive_url":"https://api.github.com/repos/skizunov/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skizunov/salt/downloads","issues_url":"https://api.github.com/repos/skizunov/salt/issues{/number}","pulls_url":"https://api.github.com/repos/skizunov/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/skizunov/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/skizunov/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skizunov/salt/labels{/name}","releases_url":"https://api.github.com/repos/skizunov/salt/releases{/id}","deployments_url":"https://api.github.com/repos/skizunov/salt/deployments","created_at":"2015-03-19T20:57:25Z","updated_at":"2015-05-01T02:04:38Z","pushed_at":"2016-03-21T19:17:38Z","git_url":"git://github.com/skizunov/salt.git","ssh_url":"git@github.com:skizunov/salt.git","clone_url":"https://github.com/skizunov/salt.git","svn_url":"https://github.com/skizunov/salt","homepage":"saltstack.com","size":150536,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"saltstack:2016.3","ref":"2016.3","sha":"a940c6498199acc1b8e86a254eb279a7a09f4e7b","user":{"login":"saltstack","id":1147473,"avatar_url":"https://avatars.githubusercontent.com/u/1147473?v=3","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"repo":{"id":1390248,"name":"salt","full_name":"saltstack/salt","owner":{"login":"saltstack","id":1147473,"avatar_url":"https://avatars.githubusercontent.com/u/1147473?v=3","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/saltstack/salt","description":"Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt Open software package repository here: ","fork":false,"url":"https://api.github.com/repos/saltstack/salt","forks_url":"https://api.github.com/repos/saltstack/salt/forks","keys_url":"https://api.github.com/repos/saltstack/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saltstack/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saltstack/salt/teams","hooks_url":"https://api.github.com/repos/saltstack/salt/hooks","issue_events_url":"https://api.github.com/repos/saltstack/salt/issues/events{/number}","events_url":"https://api.github.com/repos/saltstack/salt/events","assignees_url":"https://api.github.com/repos/saltstack/salt/assignees{/user}","branches_url":"https://api.github.com/repos/saltstack/salt/branches{/branch}","tags_url":"https://api.github.com/repos/saltstack/salt/tags","blobs_url":"https://api.github.com/repos/saltstack/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saltstack/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saltstack/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/saltstack/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/saltstack/salt/languages","stargazers_url":"https://api.github.com/repos/saltstack/salt/stargazers","contributors_url":"https://api.github.com/repos/saltstack/salt/contributors","subscribers_url":"https://api.github.com/repos/saltstack/salt/subscribers","subscription_url":"https://api.github.com/repos/saltstack/salt/subscription","commits_url":"https://api.github.com/repos/saltstack/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/saltstack/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/saltstack/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/saltstack/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/saltstack/salt/contents/{+path}","compare_url":"https://api.github.com/repos/saltstack/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saltstack/salt/merges","archive_url":"https://api.github.com/repos/saltstack/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saltstack/salt/downloads","issues_url":"https://api.github.com/repos/saltstack/salt/issues{/number}","pulls_url":"https://api.github.com/repos/saltstack/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/saltstack/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/saltstack/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saltstack/salt/labels{/name}","releases_url":"https://api.github.com/repos/saltstack/salt/releases{/id}","deployments_url":"https://api.github.com/repos/saltstack/salt/deployments","created_at":"2011-02-20T20:16:56Z","updated_at":"2016-03-21T16:41:43Z","pushed_at":"2016-03-21T19:19:58Z","git_url":"git://github.com/saltstack/salt.git","ssh_url":"git@github.com:saltstack/salt.git","clone_url":"https://github.com/saltstack/salt.git","svn_url":"https://github.com/saltstack/salt","homepage":"https://repo.saltstack.com/","size":169793,"stargazers_count":6333,"watchers_count":6333,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2778,"mirror_url":null,"open_issues_count":3447,"forks":2778,"open_issues":3447,"watchers":6333,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/saltstack/salt/pulls/32027"},"html":{"href":"https://github.com/saltstack/salt/pull/32027"},"issue":{"href":"https://api.github.com/repos/saltstack/salt/issues/32027"},"comments":{"href":"https://api.github.com/repos/saltstack/salt/issues/32027/comments"},"review_comments":{"href":"https://api.github.com/repos/saltstack/salt/pulls/32027/comments"},"review_comment":{"href":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/saltstack/salt/pulls/32027/commits"},"statuses":{"href":"https://api.github.com/repos/saltstack/salt/statuses/7135722176313757f39275355305011ae9d760d1"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":15,"deletions":6,"changed_files":1}}