{"action":"opened","number":527,"pull_request":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/527","id":38544342,"html_url":"https://github.com/apache/cloudstack/pull/527","diff_url":"https://github.com/apache/cloudstack/pull/527.diff","patch_url":"https://github.com/apache/cloudstack/pull/527.patch","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/527","number":527,"state":"open","locked":false,"title":"As an operator I want to be able to change the KVM hypervisor credentials","user":{"login":"wilderrodrigues","id":5129209,"avatar_url":"https://avatars.githubusercontent.com/u/5129209?v=3","gravatar_id":"","url":"https://api.github.com/users/wilderrodrigues","html_url":"https://github.com/wilderrodrigues","followers_url":"https://api.github.com/users/wilderrodrigues/followers","following_url":"https://api.github.com/users/wilderrodrigues/following{/other_user}","gists_url":"https://api.github.com/users/wilderrodrigues/gists{/gist_id}","starred_url":"https://api.github.com/users/wilderrodrigues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilderrodrigues/subscriptions","organizations_url":"https://api.github.com/users/wilderrodrigues/orgs","repos_url":"https://api.github.com/users/wilderrodrigues/repos","events_url":"https://api.github.com/users/wilderrodrigues/events{/privacy}","received_events_url":"https://api.github.com/users/wilderrodrigues/received_events","type":"User","site_admin":false},"body":"API call (updateHostPassword) changes credentials on XenServer hypervisor but not on KVM. This should be extended also for KVM\r\n\r\n* Decouple the use of updateHostPassword\r\n   - The code was hard to maintain because updating a host or all the hosts in a cluster was handled in the same method\r\n   - Created updateHost and updateCluster password in both ResourceManager and ManagementServer interfaces/classes\r\n   - The chck for whihc method to use is done in the API level\r\n   - Started adding the support for KVM host password update\r\n* Fix a bug in the doUpdateHostPassword() method\r\n  - 2 years ago a change in that method caused an issue when trying to update the hosts password: they would be updated in the database but not in the host it self, causing the hosts to disconnect after a management server restart.\r\n* Making possible to update KVM hosts password in the database via the API\r\n   - Make sure the doUpdateHostPassword() method returns the result from the answer, not always true\r\n   - Added the LibvirtUpdateHostPasswordCommandWrapper class, which will handle the changes in the KVM agent that will be further implemented in the future. The command will avoid the agent to complain about Unsupported command\r\n   - Added a test to make sure the current implementation of the comment works. If changes in the future, it will also require changes. In that way, we make sure nobody will break it\r\n\r\nI already did basic manual tests with Management Server running on CentOS 7.1; 2 XenServer hosts; and 1 KVM host. All deployed in 2 advances zones. I was able to successfully execute:\r\n\r\nUpdate KVM host\r\n- update hostpassword hostid=95aa28ae-8038-4457-8951-504e760b53a4  username=root password=admin\r\n\r\nUpdate 1 XenServer host\r\n- update hostpassword hostid=9b236e34-0cc7-4d36-8b01-925fb10b4c25 username=root password=password\r\n\r\nUpdate a XenServer cluster\r\n- update hostpassword hostid=9b236e34-0cc7-4d36-8b01-925fb10b4c25 clusterid=fb58b84d-f9bb-4603-8b85-b56a49e1676f  username=root password=password\r\n\r\nI also created isolated networks and virtual machines. The machines deployed on the XenServer zone also used affinity groups. I deployed 1 virtual machine in the KVM zone.\r\n\r\n @DaanHoogland @remibergsma @bhaisaab \r\n\r\nPlease, do not merge yet. I will also run the integration/smoke tests.\r\n\r\nCheers,\r\nWilder","created_at":"2015-06-25T13:01:05Z","updated_at":"2015-06-25T13:01:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/cloudstack/pulls/527/commits","review_comments_url":"https://api.github.com/repos/apache/cloudstack/pulls/527/comments","review_comment_url":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/527/comments","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/07cee4116c5a7a1b582181b20b034e8b344f6d9c","head":{"label":"schubergphilis:improvement/CS_180","ref":"improvement/CS_180","sha":"07cee4116c5a7a1b582181b20b034e8b344f6d9c","user":{"login":"schubergphilis","id":864482,"avatar_url":"https://avatars.githubusercontent.com/u/864482?v=3","gravatar_id":"","url":"https://api.github.com/users/schubergphilis","html_url":"https://github.com/schubergphilis","followers_url":"https://api.github.com/users/schubergphilis/followers","following_url":"https://api.github.com/users/schubergphilis/following{/other_user}","gists_url":"https://api.github.com/users/schubergphilis/gists{/gist_id}","starred_url":"https://api.github.com/users/schubergphilis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schubergphilis/subscriptions","organizations_url":"https://api.github.com/users/schubergphilis/orgs","repos_url":"https://api.github.com/users/schubergphilis/repos","events_url":"https://api.github.com/users/schubergphilis/events{/privacy}","received_events_url":"https://api.github.com/users/schubergphilis/received_events","type":"Organization","site_admin":false},"repo":{"id":21240333,"name":"cloudstack","full_name":"schubergphilis/cloudstack","owner":{"login":"schubergphilis","id":864482,"avatar_url":"https://avatars.githubusercontent.com/u/864482?v=3","gravatar_id":"","url":"https://api.github.com/users/schubergphilis","html_url":"https://github.com/schubergphilis","followers_url":"https://api.github.com/users/schubergphilis/followers","following_url":"https://api.github.com/users/schubergphilis/following{/other_user}","gists_url":"https://api.github.com/users/schubergphilis/gists{/gist_id}","starred_url":"https://api.github.com/users/schubergphilis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schubergphilis/subscriptions","organizations_url":"https://api.github.com/users/schubergphilis/orgs","repos_url":"https://api.github.com/users/schubergphilis/repos","events_url":"https://api.github.com/users/schubergphilis/events{/privacy}","received_events_url":"https://api.github.com/users/schubergphilis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/schubergphilis/cloudstack","description":"Mirror of Apache Cloudstack","fork":true,"url":"https://api.github.com/repos/schubergphilis/cloudstack","forks_url":"https://api.github.com/repos/schubergphilis/cloudstack/forks","keys_url":"https://api.github.com/repos/schubergphilis/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schubergphilis/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schubergphilis/cloudstack/teams","hooks_url":"https://api.github.com/repos/schubergphilis/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/schubergphilis/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/schubergphilis/cloudstack/events","assignees_url":"https://api.github.com/repos/schubergphilis/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/schubergphilis/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/schubergphilis/cloudstack/tags","blobs_url":"https://api.github.com/repos/schubergphilis/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schubergphilis/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schubergphilis/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/schubergphilis/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schubergphilis/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/schubergphilis/cloudstack/languages","stargazers_url":"https://api.github.com/repos/schubergphilis/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/schubergphilis/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/schubergphilis/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/schubergphilis/cloudstack/subscription","commits_url":"https://api.github.com/repos/schubergphilis/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/schubergphilis/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/schubergphilis/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/schubergphilis/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/schubergphilis/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/schubergphilis/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schubergphilis/cloudstack/merges","archive_url":"https://api.github.com/repos/schubergphilis/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schubergphilis/cloudstack/downloads","issues_url":"https://api.github.com/repos/schubergphilis/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/schubergphilis/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/schubergphilis/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/schubergphilis/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schubergphilis/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/schubergphilis/cloudstack/releases{/id}","created_at":"2014-06-26T12:46:51Z","updated_at":"2015-05-06T14:17:10Z","pushed_at":"2015-06-25T12:51:09Z","git_url":"git://github.com/schubergphilis/cloudstack.git","ssh_url":"git@github.com:schubergphilis/cloudstack.git","clone_url":"https://github.com/schubergphilis/cloudstack.git","svn_url":"https://github.com/schubergphilis/cloudstack","homepage":null,"size":491272,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"c0bf00c568531dc21c409649e9089244b8ff0e78","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":9759448,"name":"cloudstack","full_name":"apache/cloudstack","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/cloudstack","description":"Mirror of Apache Cloudstack","fork":false,"url":"https://api.github.com/repos/apache/cloudstack","forks_url":"https://api.github.com/repos/apache/cloudstack/forks","keys_url":"https://api.github.com/repos/apache/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/cloudstack/teams","hooks_url":"https://api.github.com/repos/apache/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/apache/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/apache/cloudstack/events","assignees_url":"https://api.github.com/repos/apache/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/apache/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/apache/cloudstack/tags","blobs_url":"https://api.github.com/repos/apache/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/cloudstack/languages","stargazers_url":"https://api.github.com/repos/apache/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/apache/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/apache/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/apache/cloudstack/subscription","commits_url":"https://api.github.com/repos/apache/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/apache/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/cloudstack/merges","archive_url":"https://api.github.com/repos/apache/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/cloudstack/downloads","issues_url":"https://api.github.com/repos/apache/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/apache/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/apache/cloudstack/releases{/id}","created_at":"2013-04-29T22:27:12Z","updated_at":"2015-06-23T11:46:07Z","pushed_at":"2015-06-25T12:44:14Z","git_url":"git://github.com/apache/cloudstack.git","ssh_url":"git@github.com:apache/cloudstack.git","clone_url":"https://github.com/apache/cloudstack.git","svn_url":"https://github.com/apache/cloudstack","homepage":null,"size":742692,"stargazers_count":255,"watchers_count":255,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":312,"mirror_url":"git://git.apache.org/cloudstack.git","open_issues_count":20,"forks":312,"open_issues":20,"watchers":255,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/527"},"html":{"href":"https://github.com/apache/cloudstack/pull/527"},"issue":{"href":"https://api.github.com/repos/apache/cloudstack/issues/527"},"comments":{"href":"https://api.github.com/repos/apache/cloudstack/issues/527/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/527/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/527/commits"},"statuses":{"href":"https://api.github.com/repos/apache/cloudstack/statuses/07cee4116c5a7a1b582181b20b034e8b344f6d9c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":13,"additions":1446,"deletions":1340,"changed_files":9}}