cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swill <...@git.apache.org>
Subject [GitHub] cloudstack pull request: [4.7] vmware: improve support for disks
Date Mon, 02 May 2016 21:28:36 GMT
Github user swill commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1365#discussion_r61807823
  
    --- Diff: plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
---
    @@ -1363,24 +1364,15 @@ private Answer attachVolume(Command cmd, DiskTO disk, boolean
isAttach, boolean
                 AttachAnswer answer = new AttachAnswer(disk);
     
                 if (isAttach) {
    -                String dataDiskController = controllerInfo.get(VmDetailConstants.DATA_DISK_CONTROLLER);
    -                String rootDiskController = controllerInfo.get(VmDetailConstants.ROOK_DISK_CONTROLLER);
    -                DiskControllerType rootDiskControllerType = DiskControllerType.getType(rootDiskController);
    -
    -                if (dataDiskController == null) {
    -                    dataDiskController = getLegacyVmDataDiskController();
    -                } else if ((rootDiskControllerType == DiskControllerType.lsilogic) ||
    -                           (rootDiskControllerType == DiskControllerType.lsisas1068)
||
    -                           (rootDiskControllerType == DiskControllerType.pvscsi) ||
    -                           (rootDiskControllerType == DiskControllerType.buslogic)) {
    -                    //TODO: Support mix of SCSI controller types for single VM. If root
disk is already over
    -                    //a SCSI controller then use the same for data volume as well. This
limitation will go once mix
    -                    //of SCSI controller types for single VM.
    -                    dataDiskController = rootDiskController;
    -                } else if (DiskControllerType.getType(dataDiskController) == DiskControllerType.osdefault)
{
    -                    dataDiskController = vmMo.getRecommendedDiskController(null);
    +                String diskController = getLegacyVmDataDiskController();
    --- End diff --
    
    This has been merged into `4.7` and have forward merged into `4.8` without a problem.
    
    I have merge conflicts trying to merge this from `4.8` into `master` though.
    
    Here is the merge conflict:
    ```
                AttachAnswer answer = new AttachAnswer(disk);
    
                if (isAttach) {
    <<<<<<< HEAD
                    String dataDiskController = controllerInfo.get(VmDetailConstants.DATA_DISK_CONTROLLER);
                    String rootDiskController = controllerInfo.get(VmDetailConstants.ROOT_DISK_CONTROLLER);
                    DiskControllerType rootDiskControllerType = DiskControllerType.getType(rootDiskController);
    
                    if (dataDiskController == null) {
                        dataDiskController = getLegacyVmDataDiskController();
                    } else if ((rootDiskControllerType == DiskControllerType.lsilogic) ||
                               (rootDiskControllerType == DiskControllerType.lsisas1068) ||
                               (rootDiskControllerType == DiskControllerType.pvscsi) ||
                               (rootDiskControllerType == DiskControllerType.buslogic)) {
                        //TODO: Support mix of SCSI controller types for single VM. If root
disk is already over
                        //a SCSI controller then use the same for data volume as well. This
limitation will go once mix
                        //of SCSI controller types for single VM.
                        dataDiskController = rootDiskController;
                    } else if (DiskControllerType.getType(dataDiskController) == DiskControllerType.osdefault)
{
                        dataDiskController = vmMo.getRecommendedDiskController(null);
    =======
                    String diskController = getLegacyVmDataDiskController();
                    if (controllerInfo != null &&
                            !Strings.isNullOrEmpty(controllerInfo.get(VmDetailConstants.DATA_DISK_CONTROLLER)))
{
                        diskController = controllerInfo.get(VmDetailConstants.DATA_DISK_CONTROLLER);
    >>>>>>> 4.8
                    }
                    if (DiskControllerType.getType(diskController) == DiskControllerType.osdefault)
{
                        diskController = vmMo.getRecommendedDiskController(null);
                    }
                    vmMo.attachDisk(new String[] {datastoreVolumePath}, morDs, diskController);
                } else {
    ```
    
    Please advise...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message