{"action":"closed","number":1552,"pull_request":{"url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1552","id":69250004,"html_url":"https://github.com/wildfly/wildfly-core/pull/1552","diff_url":"https://github.com/wildfly/wildfly-core/pull/1552.diff","patch_url":"https://github.com/wildfly/wildfly-core/pull/1552.patch","issue_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/1552","number":1552,"state":"closed","locked":false,"title":"[WFCORE-1535] Avoid a potential blocking forever for ManagedServer suspend() and resume()","user":{"login":"yersan","id":5951113,"avatar_url":"https://avatars.githubusercontent.com/u/5951113?v=3","gravatar_id":"","url":"https://api.github.com/users/yersan","html_url":"https://github.com/yersan","followers_url":"https://api.github.com/users/yersan/followers","following_url":"https://api.github.com/users/yersan/following{/other_user}","gists_url":"https://api.github.com/users/yersan/gists{/gist_id}","starred_url":"https://api.github.com/users/yersan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yersan/subscriptions","organizations_url":"https://api.github.com/users/yersan/orgs","repos_url":"https://api.github.com/users/yersan/repos","events_url":"https://api.github.com/users/yersan/events{/privacy}","received_events_url":"https://api.github.com/users/yersan/received_events","type":"User","site_admin":false},"body":"Basically this PR continues previous changes done in WFCORE-1473 applying them to other suspend and resume operations in ManagedServer.\r\n\r\nJira issue is: https://issues.jboss.org/browse/WFCORE-1535\r\n\r\n\r\nImplementation note:\r\nIt looks like that ServerInventory#suspendServer(String serverName) does 99% the same as ServerInventory#awaitServerSuspend(Set<String> waitForServers, int timeoutInSeconds, BlockingTimeout blockingTimeout) using a timeoutInSeconds = 0. So in this issue there is a proposal to simplifying them.\r\n\r\nThe small difference is the following. Internally ServerInventory#suspendServer(String serverName) is executing this operation using the ManagedServer#suspend():\r\n\r\n```\r\nfinal ModelNode operation = new ModelNode();\r\noperation.get(OP).set(SUSPEND);\r\noperation.get(OP_ADDR).setEmptyList();\r\n```\r\n\r\nand ServerInventory#awaitServerSuspend(Set<String> waitForServers, int timeoutInSeconds, BlockingTimeout blockingTimeout) is executing this operation using the ManagedServer#suspend(timeoutInSeconds):\r\n\r\n```\r\nfinal ModelNode operation = new ModelNode();\r\noperation.get(OP).set(SUSPEND);\r\noperation.get(OP_ADDR).setEmptyList();\r\noperation.get(TIMEOUT).set(timeoutInSeconds);\r\n```\r\n\r\nIf there is no TIMEOUT attribute in the operation sent to ServerSuspendHandler, it will use 0 for the suspend timeout. \r\nWith the changes in this issue when :suspend-servers (without any explicity timeout) is executed, now the TIMEOUT attribute is sent with the operation with 0 as value simplifying the code (I think) in ServerInventoryImpl. I cannot see any problems with this difference behaviour. Is it correct for you too?","created_at":"2016-05-07T18:59:34Z","updated_at":"2016-05-17T00:01:02Z","closed_at":"2016-05-17T00:01:01Z","merged_at":"2016-05-17T00:01:01Z","merge_commit_sha":"511db147a5d77f8df31f2227c956ae8f7872c4d1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1552/commits","review_comments_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1552/comments","review_comment_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/1552/comments","statuses_url":"https://api.github.com/repos/wildfly/wildfly-core/statuses/bd44847825a30661dbff357f9b47d66b1b33d0b1","head":{"label":"yersan:enhancements/WFCORE-1535","ref":"enhancements/WFCORE-1535","sha":"bd44847825a30661dbff357f9b47d66b1b33d0b1","user":{"login":"yersan","id":5951113,"avatar_url":"https://avatars.githubusercontent.com/u/5951113?v=3","gravatar_id":"","url":"https://api.github.com/users/yersan","html_url":"https://github.com/yersan","followers_url":"https://api.github.com/users/yersan/followers","following_url":"https://api.github.com/users/yersan/following{/other_user}","gists_url":"https://api.github.com/users/yersan/gists{/gist_id}","starred_url":"https://api.github.com/users/yersan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yersan/subscriptions","organizations_url":"https://api.github.com/users/yersan/orgs","repos_url":"https://api.github.com/users/yersan/repos","events_url":"https://api.github.com/users/yersan/events{/privacy}","received_events_url":"https://api.github.com/users/yersan/received_events","type":"User","site_admin":false},"repo":{"id":50686693,"name":"wildfly-core","full_name":"yersan/wildfly-core","owner":{"login":"yersan","id":5951113,"avatar_url":"https://avatars.githubusercontent.com/u/5951113?v=3","gravatar_id":"","url":"https://api.github.com/users/yersan","html_url":"https://github.com/yersan","followers_url":"https://api.github.com/users/yersan/followers","following_url":"https://api.github.com/users/yersan/following{/other_user}","gists_url":"https://api.github.com/users/yersan/gists{/gist_id}","starred_url":"https://api.github.com/users/yersan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yersan/subscriptions","organizations_url":"https://api.github.com/users/yersan/orgs","repos_url":"https://api.github.com/users/yersan/repos","events_url":"https://api.github.com/users/yersan/events{/privacy}","received_events_url":"https://api.github.com/users/yersan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yersan/wildfly-core","description":"The core runtime that is used by the Wildfly application server","fork":true,"url":"https://api.github.com/repos/yersan/wildfly-core","forks_url":"https://api.github.com/repos/yersan/wildfly-core/forks","keys_url":"https://api.github.com/repos/yersan/wildfly-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yersan/wildfly-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yersan/wildfly-core/teams","hooks_url":"https://api.github.com/repos/yersan/wildfly-core/hooks","issue_events_url":"https://api.github.com/repos/yersan/wildfly-core/issues/events{/number}","events_url":"https://api.github.com/repos/yersan/wildfly-core/events","assignees_url":"https://api.github.com/repos/yersan/wildfly-core/assignees{/user}","branches_url":"https://api.github.com/repos/yersan/wildfly-core/branches{/branch}","tags_url":"https://api.github.com/repos/yersan/wildfly-core/tags","blobs_url":"https://api.github.com/repos/yersan/wildfly-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yersan/wildfly-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yersan/wildfly-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/yersan/wildfly-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yersan/wildfly-core/statuses/{sha}","languages_url":"https://api.github.com/repos/yersan/wildfly-core/languages","stargazers_url":"https://api.github.com/repos/yersan/wildfly-core/stargazers","contributors_url":"https://api.github.com/repos/yersan/wildfly-core/contributors","subscribers_url":"https://api.github.com/repos/yersan/wildfly-core/subscribers","subscription_url":"https://api.github.com/repos/yersan/wildfly-core/subscription","commits_url":"https://api.github.com/repos/yersan/wildfly-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/yersan/wildfly-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/yersan/wildfly-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/yersan/wildfly-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/yersan/wildfly-core/contents/{+path}","compare_url":"https://api.github.com/repos/yersan/wildfly-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yersan/wildfly-core/merges","archive_url":"https://api.github.com/repos/yersan/wildfly-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yersan/wildfly-core/downloads","issues_url":"https://api.github.com/repos/yersan/wildfly-core/issues{/number}","pulls_url":"https://api.github.com/repos/yersan/wildfly-core/pulls{/number}","milestones_url":"https://api.github.com/repos/yersan/wildfly-core/milestones{/number}","notifications_url":"https://api.github.com/repos/yersan/wildfly-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yersan/wildfly-core/labels{/name}","releases_url":"https://api.github.com/repos/yersan/wildfly-core/releases{/id}","deployments_url":"https://api.github.com/repos/yersan/wildfly-core/deployments","created_at":"2016-01-29T19:40:18Z","updated_at":"2016-01-29T19:40:31Z","pushed_at":"2016-05-10T19:45:16Z","git_url":"git://github.com/yersan/wildfly-core.git","ssh_url":"git@github.com:yersan/wildfly-core.git","clone_url":"https://github.com/yersan/wildfly-core.git","svn_url":"https://github.com/yersan/wildfly-core","homepage":null,"size":47790,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wildfly:master","ref":"master","sha":"ab5528adaa5496e53d551fe19ec8fbec84ceaf90","user":{"login":"wildfly","id":3066274,"avatar_url":"https://avatars.githubusercontent.com/u/3066274?v=3","gravatar_id":"","url":"https://api.github.com/users/wildfly","html_url":"https://github.com/wildfly","followers_url":"https://api.github.com/users/wildfly/followers","following_url":"https://api.github.com/users/wildfly/following{/other_user}","gists_url":"https://api.github.com/users/wildfly/gists{/gist_id}","starred_url":"https://api.github.com/users/wildfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wildfly/subscriptions","organizations_url":"https://api.github.com/users/wildfly/orgs","repos_url":"https://api.github.com/users/wildfly/repos","events_url":"https://api.github.com/users/wildfly/events{/privacy}","received_events_url":"https://api.github.com/users/wildfly/received_events","type":"Organization","site_admin":false},"repo":{"id":21394954,"name":"wildfly-core","full_name":"wildfly/wildfly-core","owner":{"login":"wildfly","id":3066274,"avatar_url":"https://avatars.githubusercontent.com/u/3066274?v=3","gravatar_id":"","url":"https://api.github.com/users/wildfly","html_url":"https://github.com/wildfly","followers_url":"https://api.github.com/users/wildfly/followers","following_url":"https://api.github.com/users/wildfly/following{/other_user}","gists_url":"https://api.github.com/users/wildfly/gists{/gist_id}","starred_url":"https://api.github.com/users/wildfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wildfly/subscriptions","organizations_url":"https://api.github.com/users/wildfly/orgs","repos_url":"https://api.github.com/users/wildfly/repos","events_url":"https://api.github.com/users/wildfly/events{/privacy}","received_events_url":"https://api.github.com/users/wildfly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wildfly/wildfly-core","description":"The core runtime that is used by the Wildfly application server","fork":false,"url":"https://api.github.com/repos/wildfly/wildfly-core","forks_url":"https://api.github.com/repos/wildfly/wildfly-core/forks","keys_url":"https://api.github.com/repos/wildfly/wildfly-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wildfly/wildfly-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wildfly/wildfly-core/teams","hooks_url":"https://api.github.com/repos/wildfly/wildfly-core/hooks","issue_events_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/events{/number}","events_url":"https://api.github.com/repos/wildfly/wildfly-core/events","assignees_url":"https://api.github.com/repos/wildfly/wildfly-core/assignees{/user}","branches_url":"https://api.github.com/repos/wildfly/wildfly-core/branches{/branch}","tags_url":"https://api.github.com/repos/wildfly/wildfly-core/tags","blobs_url":"https://api.github.com/repos/wildfly/wildfly-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wildfly/wildfly-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wildfly/wildfly-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/wildfly/wildfly-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wildfly/wildfly-core/statuses/{sha}","languages_url":"https://api.github.com/repos/wildfly/wildfly-core/languages","stargazers_url":"https://api.github.com/repos/wildfly/wildfly-core/stargazers","contributors_url":"https://api.github.com/repos/wildfly/wildfly-core/contributors","subscribers_url":"https://api.github.com/repos/wildfly/wildfly-core/subscribers","subscription_url":"https://api.github.com/repos/wildfly/wildfly-core/subscription","commits_url":"https://api.github.com/repos/wildfly/wildfly-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/wildfly/wildfly-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/wildfly/wildfly-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/wildfly/wildfly-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/wildfly/wildfly-core/contents/{+path}","compare_url":"https://api.github.com/repos/wildfly/wildfly-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wildfly/wildfly-core/merges","archive_url":"https://api.github.com/repos/wildfly/wildfly-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wildfly/wildfly-core/downloads","issues_url":"https://api.github.com/repos/wildfly/wildfly-core/issues{/number}","pulls_url":"https://api.github.com/repos/wildfly/wildfly-core/pulls{/number}","milestones_url":"https://api.github.com/repos/wildfly/wildfly-core/milestones{/number}","notifications_url":"https://api.github.com/repos/wildfly/wildfly-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wildfly/wildfly-core/labels{/name}","releases_url":"https://api.github.com/repos/wildfly/wildfly-core/releases{/id}","deployments_url":"https://api.github.com/repos/wildfly/wildfly-core/deployments","created_at":"2014-07-01T16:33:34Z","updated_at":"2016-05-16T22:06:29Z","pushed_at":"2016-05-17T00:01:02Z","git_url":"git://github.com/wildfly/wildfly-core.git","ssh_url":"git@github.com:wildfly/wildfly-core.git","clone_url":"https://github.com/wildfly/wildfly-core.git","svn_url":"https://github.com/wildfly/wildfly-core","homepage":null,"size":55542,"stargazers_count":48,"watchers_count":48,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":190,"mirror_url":null,"open_issues_count":25,"forks":190,"open_issues":25,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1552"},"html":{"href":"https://github.com/wildfly/wildfly-core/pull/1552"},"issue":{"href":"https://api.github.com/repos/wildfly/wildfly-core/issues/1552"},"comments":{"href":"https://api.github.com/repos/wildfly/wildfly-core/issues/1552/comments"},"review_comments":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1552/comments"},"review_comment":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wildfly/wildfly-core/pulls/1552/commits"},"statuses":{"href":"https://api.github.com/repos/wildfly/wildfly-core/statuses/bd44847825a30661dbff357f9b47d66b1b33d0b1"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"bstansberry","id":299242,"avatar_url":"https://avatars.githubusercontent.com/u/299242?v=3","gravatar_id":"","url":"https://api.github.com/users/bstansberry","html_url":"https://github.com/bstansberry","followers_url":"https://api.github.com/users/bstansberry/followers","following_url":"https://api.github.com/users/bstansberry/following{/other_user}","gists_url":"https://api.github.com/users/bstansberry/gists{/gist_id}","starred_url":"https://api.github.com/users/bstansberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bstansberry/subscriptions","organizations_url":"https://api.github.com/users/bstansberry/orgs","repos_url":"https://api.github.com/users/bstansberry/repos","events_url":"https://api.github.com/users/bstansberry/events{/privacy}","received_events_url":"https://api.github.com/users/bstansberry/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":2,"additions":185,"deletions":125,"changed_files":9}}