Currently if an admin wants to update the hosts connected to CloudStack, he needs to search the released updates from a given source URL and check the updates as per the applicable XenServer version. Then admin needs to compare them with the already applied patches to find out the available updates. To reduce this effort we are adding this feature to CloudStack.
This feature will list the available patches/hotfixes for hypervisors managed by CloudStack. CloudStack admin will be able to see the available updates on CloudStack UI. This is a functional specification of feature "XS updates notification" which has Jira ID _CLOUDSTACK-192
This hostUpdates feature will come as a separate plugin which will enumerate all the hosts managed by CloudStack to provide the udpates. This will use this PluggableService to add the HostUpdate feature APIs into CloudStack* and the *HostUpdatesManager will be responsible for thread scheduling. This functionality will be contained in an independent jar file.
The initial time to start thread after the management server comes up is set to 10 minutes and after regular intervals(default is one week), update.check.interval, management server will look for all available updates for a Hypervisior. For Xenserver, it'll downloads the latest update information from http://updates.xensource.com/XenServer/updates.xml. The location is configurable through xen.update.url in global configuration.
Admin can change the time interval to check the updates by changing the value of update.check.interval global config parameter(by default interval is set to check for updates once a week).
DB Schema changes
New tables
Field |
Type |
NULL |
Key |
Default |
Extra |
---|---|---|---|---|---|
id |
bigint(20) unsigned |
NO |
PRI |
NULL |
auto_increment |
uuid |
varchar(40) |
NO |
|
NULL |
|
description |
varchar(999) |
YES |
|
NULL |
|
label |
varchar(40) |
YES |
|
NULL |
|
timestamp |
timestamp |
YES |
|
NULL |
|
url |
varchar(999) |
YES |
|
NULL |
|
Field |
Type |
NULL |
Key |
Default |
Extra |
---|---|---|---|---|---|
id |
bigint(20) unsigned |
NO |
PRI |
NULL |
auto_increment |
host_id |
bigint(20) unsigned |
NO |
MUL |
NULL |
|
patch_id |
bigint(20) unsigned |
NO |
|
NULL |
|
update_applied |
tinyint(1) |
NO |
|
0 |
|
New client APIs
ApiName |
Request parameters |
Response parameters |
Available to regular user |
---|---|---|---|
listHostUpdates |
|
|
No |
In the above mentioned API, only hostid is required parameter and the other parameters (id and applied) are optional. If admin wants to list all the patches that are not yet applied to a host, set the applied parameter as false and if admin wants to list the applied ones, set the applied parameter as true. If applied parameter is not passed with the API, it will return the list of all applied and not applied patches. To get the details about the single patch, admin need to pass the id (uuid)* *of the patch.
ApiName |
Request parameters |
Response parameters |
Available to regular user |
---|---|---|---|
listHostsWithPendingUpdates |
|
|
No |
This API will return a list of hosts which have pending updates. Admin can also search hosts with pending updates by passing a parameter patchid, it will return a list of hosts which do not have this patch applied.
New classes for client APIs
New objects interfaces:
New VO and Dao objects:
New managers interfaces and implementation:
Changes to Existing Files:
New Agent APIs:
These agent APIs will not be present in hostUpdates plugin, these APIs will come the api project under com.cloud.agent.api packages.
All logs will go to management-server.log
This is the mockup UI, will modify it as per the suggestions.
We are planning to display the XS alert notifications under “Alerts”, where admin can see the Update Alerts.
Because of this the “Updates Alerts” will get displayed on Dashboard too.
Also, admin can navigate to Events tab -> Host Updates (dropdown option), to get the list of all the hosts which have pending updates.
By clicking on any listed host, Admin can see the list of all the applicable updates that needs to be applied.
Admin can also see the udpates in “Update” tab under the Host detailView: