You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/02/12 08:02:22 UTC

[GitHub] [cloudstack] nvazquez opened a new pull request #3828: [KVM] Direct download agnostic of the storage provider

nvazquez opened a new pull request #3828: [KVM] Direct download agnostic of the storage provider
URL: https://github.com/apache/cloudstack/pull/3828
 
 
   ## Description
   This FR proposes the extension of the direct download support to primary storage pools using the most commonly used protocols/storage types:
   - NFS – already supported
   - Local storage
   - SharedMountpoint
   
   Other storage providers support can be extended in future by interface implementation on the KVM storage provider depending on the storage adaptor.
   
   The KVM storage processor is extended to achieve the direct template downloads in a storage agnostic way, including the supported storage providers implementations and allowing future implementations for different storage providers:
   - A new check of the available free space on the downloading host local storage is added before attempting to download a template. As on registration, a CheckUrlCommand is sent to a random KVM host, this host performs a HEAD command to the template URL. In case the server provides the remote file size of the template, this size is passed as part of the DirectDownloadCommand and used to check against the available free space.
   - The template file is downloaded to a scratch space in the local storage system within the host. This location can be explicitly set by the administrator via agent.properties file on the property: `direct.download.temporary.download.location`, and in case it is not set the default location `var/lib/libvirt/images` is used.
   - After the template file is downloaded to the scratch space location, it is extracted (or copied) to the primary storage pool selected by the CloudStack planner.
   - The implementation of the extract/copy method is extended to invoke the different StorageAdaptors implementations for different storage providers. These implementations include local storage, shared mount point and NFS in the scope of this PR.
   - After the template is extracted/copied to the destination storage pool, the downloaded file is removed from the scratch space location in the host.
   
   ## Types of changes
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ## Screenshots (if appropriate):
   
   ## How Has This Been Tested?
   Ubuntu based management server
   Test zone with local storage for user VMs enabled
   2 x CentOS7 based KVM hosts
   1 NFS storage pool
   1 Shared mount point across the 2 hosts

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services