You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Introduction

Purpose

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 CS-16206

References

Feature Specifications

  • Requirements
    • Display available and applied updates for a host.
  • Non-requirements: 
  • Test guidelines
    • Functional test
  • Configuration
    • There are two global configuration parameters:
      • *xen.update.url  - *URL to get latest Xenserver Updates.
      • *xen.update.check.interval (in sec) - *How frequent update thread should check for Xenserver Updates.
  • User permission
    • Root-Admin would have privilege to list the available updates.

Architecture and Design description

search for Host Updates

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").

list Host Updates

http://10.102.125.207: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)

New cloudStack object:

update

    • update label
    • updateId
    • description
    • after-apply-guidance
    • version
    • url
    • timestamp

DB Schema changes

New tables

      • host_updates (id, uuid, label, description, after_apply_guidance, url, timestamp)
        +-------------------------------------------------------------------------------+----------------------+
        | Field                          | Type                      | Null   | Key   | Default   | Extra               |
        +---------------------------------------------------------------------------------------------------------+
        | id                               | bigint(20) unsigned | NO    | PRI    | NULL    | auto_increment |
        | uuid                           | varchar(40)             | YES  |           | NULL   |                         |
        | description                  | varchar(999)           | YES  |          | NULL    |                        |
        | label                           | varchar(40)             | YES  |          | NULL    |                         |
        | after_apply_guidance   | varchar(40)             | YES  |          | NULL    |                         |
        | timestamp                  | varchar(80)             | YES  |           | NULL   |                          |
        | URL                           | varchar(999)           | YES  |           | NULL    |                         |
        +--------------------------------------------------------------------------------+-----------------------+
      • patch_host_ref (id, host_id,patch_id, update_applied)
        +-------------------------------------------------------------------------------+----------------------+
        | 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          |                         |
        +--------------------------------------------------------------------------------+-----------------------+

Java code changes

New client APIs

ApiName

Request parameters

Response parameters

Available to regular user

listHostUpdates

    • id
    • hostid (required)
    • applied
    • id
    • host Id
    • update Label
    • description
    • update URL
    • timestamp
    • isApplied

No

New classes for client APIs

      • ListHostUpdatesCmd.java
      • HostUpdatesResponse.java

New objects interfaces:

      • PatchHostRef.java

New VO and Dao objects:

      • HostUpdatesDao.java
      • HostUpdatesDaoImpl.java
      • HostUpdatesVO.java
      • PatchHostRefDao.java
      • PatchHostRefDaoImpl.java
      • PatchHostVO.java

New managers interfaces and implementation:

      • HostUpdatesManager.java
      • HostUpdatesManagerImpl.java

Changes to Existing Files:

      • Added a new method "searchForHostUpdates" in ManagementService.java and implemented in ManagementServerImpl.java
      • Added a new method* in CitrixResourceBase.java to get the information about the applied patches to a host using XAPI *calls.
      • Added a call in ResourceManagerImpl.java to delete the update entries from patch_host_ref table only if admin removes the associated host.
      • Added new call createHostUpdateResponse in interface ResponseGenerator.java *and implemented it in *ApiResponseHelper.java .
      • Added new files HostUpdatesDaoImpl.java and PatchHostRefDaoImpl.java into DefaultComponentLibrary.java .

New Agent APIs:

      • hostUpdatesCommand.java
      • hostUpdatesAnswer.java

Logging and Debugging

All logs will go to vmops.log (dev setup) and management-server.log (RPM install setup)

Current limitations

    • Implements only for Xenserver Hypervisor.

UI flow

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.

Appendix

Appendix A:

Appendix B:

  • No labels