cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-9422) Granular VMware vm's creation as full clones on HV
Date Fri, 05 Aug 2016 19:11:20 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-9422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15409918#comment-15409918
] 

ASF GitHub Bot commented on CLOUDSTACK-9422:
--------------------------------------------

Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1602#discussion_r73744970
  
    --- Diff: plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
---
    @@ -537,15 +540,51 @@ public Answer executeRequest(Command cmd) {
         protected void checkStorageProcessorAndHandlerNfsVersionAttribute(StorageSubSystemCommand
cmd) {
             if (storageNfsVersion != null) return;
             if (cmd instanceof CopyCommand){
    -            examineStorageSubSystemCommandNfsVersion((CopyCommand) cmd);
    +            EnumMap<VmwareStorageProcessorConfigurableFields,Object> params = new
EnumMap<VmwareStorageProcessorConfigurableFields,Object>(VmwareStorageProcessorConfigurableFields.class);
    +            examineStorageSubSystemCommandNfsVersion((CopyCommand) cmd, params);
    +            examineStorageSubSystemCommandFullCloneFlagForVmware((CopyCommand) cmd, params);
    +            reconfigureProcessorByHandler(params);
    +        }
    +    }
    +
    +    /**
    +     * Reconfigure processor by handler
    +     * @param params params
    +     */
    +    protected void reconfigureProcessorByHandler(EnumMap<VmwareStorageProcessorConfigurableFields,Object>
params) {
    +        VmwareStorageSubsystemCommandHandler handler = (VmwareStorageSubsystemCommandHandler)
storageHandler;
    +        boolean success = handler.reconfigureStorageProcessor(params);
    +        if (success){
    +            s_logger.info("VmwareStorageProcessor and VmwareStorageSubsystemCommandHandler
successfully reconfigured");
    +        } else {
    +            s_logger.error("Error while reconfiguring VmwareStorageProcessor and VmwareStorageSubsystemCommandHandler");
    +        }
    +    }
    +
    +    /**
    +     * Examine StorageSubSystem command to get full clone flag, if provided
    +     * @param cmd command to execute
    +     * @param params params
    +     */
    +    protected void examineStorageSubSystemCommandFullCloneFlagForVmware(CopyCommand cmd,
EnumMap<VmwareStorageProcessorConfigurableFields,Object> params) {
    +        HypervisorType hypervisor = cmd.getDestTO().getHypervisorType();
    +        if (hypervisor == null || (hypervisor != null && ! hypervisor.equals(HypervisorType.VMware)))
return;
    +
    +        DataStoreTO destDataStore = cmd.getDestTO().getDataStore();
    +        if (destDataStore instanceof PrimaryDataStoreTO){
    +            PrimaryDataStoreTO dest = (PrimaryDataStoreTO) destDataStore;
    +            if (dest.isFullCloneFlag() != null){
    +                params.put(VmwareStorageProcessorConfigurableFields.FULL_CLONE_FLAG,
dest.isFullCloneFlag().booleanValue());
    --- End diff --
    
    Modifying a passed parameter creates side-effects that increase coupling.  Consider refactoring
to return a copy of the ``params`` parameter than contains the new values.


> Granular VMware vm's creation as full clones on HV
> --------------------------------------------------
>
>                 Key: CLOUDSTACK-9422
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9422
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: VMware
>            Reporter: Nicolas Vazquez
>            Assignee: Nicolas Vazquez
>
> h3. Introduction
> For VMware, It is possible to decide creating VMs as full clones on ESX HV, adjusting
{{vmware.create.full.clone}} global setting. We would like to introduce this property as a
primary storage detail, and use its value instead of global setting's value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message