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 connected to Cloudstack and the Cloudstack admin will be able to see the available updates on Cloudstack UI, this is functional specification of feature "XS alert hotfix notification" which has Jira ID CLOUDSTACK-192
Admin can check the updates available to any host and install them manually
Admin can decide on how frequently he wants Cloudstack to check for updates and set the interval by changing the global config parameter update.check.interval .
For Xenserver hypervisor, latest information about the updates for any version of Xenserver is available at this location : http://updates.xensource.com/XenServer/updates.xml
Once in a week, thread will check this location to search for updates and fill the database with available updates(if any) or admin can change the time interval to check the updates by changing the value of xen.update.check.interval global config parameter( by default interval is set to check the updates "Once in a week").
http://MS-SERVER:8096/client/api?command=listHostUpdates&id=&hostid=&applied=true/false
Parameter |
Description |
---|---|
id |
uuid of update |
hostid |
uuid of host |
applied |
if the patch/update is applied or not(true/false) |
In the above mentioned API link, 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.
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 |
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:
All logs will go to management-server.log
This is the mockup UI, will modify it as per the suggestions.
Step 1: Navigate to the detailView page of a host, there you will find a new tab "Updates".
Step 2: Click on* "Updates"* tab to get a list of updates for this host.