cloudstack/server/test/com/cloud
Nicolas Vazquez e86bb41e0e CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates (#2379)
This feature allows using templates and ISOs avoiding secondary storage as intermediate cache on KVM. The virtual machine deployment process is enhanced to supported bypassed registered templates and ISOs, delegating the work of downloading them to primary storage to the KVM agent instead of the SSVM agent.

Template and ISO registration:
- When hypervisor is KVM, a checkbox is displayed with 'Direct Download' label.
- API methods registerTemplate and registerISO are both extended with this new parameter directdownload.
- On template or ISO registration, no download job is sent to SSVM agent, CloudStack would only persist an entry on template_store_ref indicating that template or ISO has been marked as 'Direct Download' (bypassing Secondary Storage). These entries are persisted as:
template_id = Template or ISO id on vm_template table
store_id NULL
download_state = BYPASSED
state = Ready
(Note: these entries allow users to deploy virtual machine from registered templates or ISOs)
- An URL validation command is sent to a random KVM host to check if template/ISO location can be reached. Metalink are also supported by this feature. In case of a metalink, it is fetched and URL check is performed on each of its URLs.
- Checksum should be provided as indicated on #2246: {ALGORITHM}CHKSUMHASH
- After template or ISO is registered, it would be displayed in the UI

Virtual machine deployment:
When a 'Direct Download' template is selected for deployment, CloudStack would delegate template downloading to destination storage pool via destination host by a new pluggable download manager.
Download manager would handle template downloading depending on URL protocol. In case of HTTP, request headers can be set by the user via vm_template_details. Those details should be persisted as:
Key: HTTP_HEADER
Value: HEADERNAME:HEADERVALUE

In case of HTTPS, a new API method is added uploadTemplateDirectDownloadCertificate to allow user importing a client certificate into all KVM hosts' keystore before deployment.
After template or ISO is downloaded to primary storage, usual entry would be persisted on template_spool_ref indicating the mapping between template/ISO and storage pool.
2018-01-09 12:22:18 +05:30
..
alert Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses. 2015-11-21 18:31:11 -02:00
api CLOUDSTACK-9599: isdynamicallyscalable field missing in updateTemplate Response (#2383) 2018-01-04 11:03:05 +05:30
capacity All Checkstyle problems corrected 2013-12-12 12:26:07 -08:00
configuration CLOUDSTACK-10126: Separate Subnet for SSVM and CPVM (#2368) 2018-01-05 13:19:03 +05:30
consoleproxy Refactor console proxy default network retrieval. 2016-03-31 10:41:43 +00:00
event rats 2015-11-28 21:20:07 +01:00
ha CLOUDSTACK-9350: KVM-HA- Fix CheckOnHost for Local storage 2016-04-29 12:38:33 +05:30
keystore Reformatted all of the code. 2013-11-21 06:15:26 -08:00
metadata Resource metadata: by default, all metadata is set with display=true (meaning that the detail is avaialble for display to the regular user). If admin wants to set a specific detail to be false, he has to specify it explicitly in addResourceDetail command 2014-02-10 12:05:59 -08:00
network CLOUDSTACK-10189: Adding nuage VSD managed network support to CloudStack (#2360) 2017-12-28 14:55:15 +05:30
projects Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses. 2015-11-21 18:31:11 -02:00
resource CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates (#2379) 2018-01-09 12:22:18 +05:30
resourcelimit Reformatted all of the code. 2013-11-21 06:15:26 -08:00
server CLOUDSTACK-9993: Securing Agents Communications (#2239) 2017-08-28 12:15:11 +02:00
servlet CLOUDSTACK-10012: Migrate to Embedded Jetty 2017-11-03 23:57:25 +05:30
snapshot All Checkstyle problems corrected 2013-12-12 12:26:07 -08:00
storage CLOUDSTACK-9572: Snapshot on primary storage not cleaned up after Storage migration (#1740) 2018-01-05 11:19:56 +05:30
template CLOUDSTACK-9607: Preventing template deletion when template is in use (#1773) 2018-01-04 10:59:39 +05:30
user CLOUDSTACK-10117: Account ldap binding (#2381) 2018-01-06 22:58:28 +05:30
vm CLOUDSTACK-9593: userdata: enforce data is a multiple of 4 characters (#1760) 2017-12-28 15:27:33 +05:30
vpc CLOUDSTACK-10109: Enable dedication of public IPs to SSVM and CPVM (#2295) 2018-01-06 23:14:30 +05:30