[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14601138#comment-14601138
 ] 

Wilder Rodrigues commented on CLOUDSTACK-8589:
----------------------------------------------

API call (updateHostPassword) changes credentials on XenServer hypervisor but 
not on KVM. This should be extended also for KVM

* Decouple the use of updateHostPassword
- The code was hard to maintain because updating a host or all the hosts in a 
cluster was handled in the same method
- Created updateHost and updateCluster password in both ResourceManager and 
ManagementServer interfaces/classes
- The check for which method to use is done in the API level
- Started adding the support for KVM host password update

* Fix a bug in the doUpdateHostPassword() method
- 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.
- Making possible to update KVM hosts password in the database via the API
- Make sure the doUpdateHostPassword() method returns the result from the 
answer, not always true
- 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
- 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

I 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:

Update KVM host

update hostpassword hostid=95aa28ae-8038-4457-8951-504e760b53a4 username=root 
password=admin
Update 1 XenServer host

update hostpassword hostid=9b236e34-0cc7-4d36-8b01-925fb10b4c25 username=root 
password=password
Update a XenServer cluster

update hostpassword hostid=9b236e34-0cc7-4d36-8b01-925fb10b4c25 
clusterid=fb58b84d-f9bb-4603-8b85-b56a49e1676f username=root password=password
I 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.

@DaanHoogland @remibergsma @bhaisaab

Please, do not merge yet. I will also run the integration/smoke tests.

In addition, all the commits are atomic. I also took care of splitting the 
commits related to "formatting code" and fixes.

Cheers,
Wilder

> As an operator I want to be able to change the KVM hypervisor credentials
> -------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-8589
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8589
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: API, KVM, XenServer
>    Affects Versions: 4.2.0, 4.3.0, 4.4.0, 4.5.0
>            Reporter: Wilder Rodrigues
>            Assignee: Wilder Rodrigues
>             Fix For: 4.6.0
>
>
> API call (updateHostPassword) changes credentials on XenServer hypervisor but 
> not on KVM. This should be extended also for KVM



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to