...
The existing updateHostPassword API call would allow only database changes, which means that the passwords would have to be updated manually in all the hosts. in addition, the API was only available for XenServer based hosts. The lack of functionality, which leads to manual, or not standardised, work and the limitations of the API urged us to apply some changes in order to improve its current behaviour.
With the improvements applied we will be able to:
- Update the XenServer and KVM hosts password on the DB only
- Update the XenServer hosts and KVM password on the DB and hosts themselves
XenServer hosts can only be updated if the Cluster ID is informed. An attempt to update a XenServer hosts alone will result in the following error:
Single host update is not supported by XenServer hypervisors. Please try again informing the Cluster ID.
API Changes
Although the API has changed, we kept backwards compatibility by adding only a parameter to which the operator will either say "true" or "false". In case the operator wants to work as before, by updating the hosts passwords manually, the parameter "update_passwd_on_host" has "false" as default value, so the operator doesn't need to inform it.
Updating hosts - DB only
The cloudmonkey calls below can be used for both XenServer and KVM hosts.
Code Block |
---|
language | py |
---|
title | XenServer Cluster |
---|
|
update hostpassword clusterid=53963278-f9d1-42d5-bab5-18c7ec466a0b username=root password=admin123 |
Code Block |
---|
language | py |
---|
title | KVM single host |
---|
|
update hostpassword hostid=9ae1d93b-d09c-4e1c-94fa-9082e81cca26 username=root password=admin123 |
Code Block |
---|
language | py |
---|
title | KVM Cluster |
---|
|
update hostpassword clusterid=53963278-f9d1-42d5-bab5-18c7ec466a0b username=root password=admin123 |
Updating hosts - DB and Hosts
The cloudmonkey calls below can be used for both XenServer and KVM hosts.
Code Block |
---|
language | py |
---|
title | XenServer Cluster |
---|
|
update hostpassword clusterid=53963278-f9d1-42d5-bab5-18c7ec466a0b username=root password=admin123 update_passwd_on_host=true |
Code Block |
---|
language | py |
---|
title | KVM single host |
---|
|
update hostpassword hostid=9ae1d93b-d09c-4e1c-94fa-9082e81cca26 username=root password=admin123 |
Code Block |
---|
language | py |
---|
title | KVM Cluster |
---|
|
update hostpassword clusterid=53963278-f9d1-42d5-bab5-18c7ec466a0b username=root password=admin123 update_passwd_on_host=true |
JIRA Issues
Jira |
---|
server | ASF JIRA |
---|
serverId | 5aa69414-a9e9-3523-82ec-879b028fb15b |
---|
key | CLOUDSTACK-8607 |
---|
|
Jira |
---|
server | ASF JIRA |
---|
serverId | 5aa69414-a9e9-3523-82ec-879b028fb15b |
---|
key | CLOUDSTACK-8641 |
---|
|