Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E55A42009D9 for ; Mon, 2 May 2016 23:28:38 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E3E0D1609B0; Mon, 2 May 2016 23:28:38 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 383F11602C5 for ; Mon, 2 May 2016 23:28:38 +0200 (CEST) Received: (qmail 1433 invoked by uid 500); 2 May 2016 21:28:37 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 1422 invoked by uid 99); 2 May 2016 21:28:37 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 May 2016 21:28:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id BF6A3DFD7B; Mon, 2 May 2016 21:28:36 +0000 (UTC) From: swill To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request: [4.7] vmware: improve support for disks Content-Type: text/plain Message-Id: <20160502212836.BF6A3DFD7B@git1-us-west.apache.org> Date: Mon, 2 May 2016 21:28:36 +0000 (UTC) archived-at: Mon, 02 May 2016 21:28:39 -0000 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. ---