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 58944200C46 for ; Tue, 21 Feb 2017 12:41:53 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 55A03160B74; Tue, 21 Feb 2017 11:41:53 +0000 (UTC) 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 AFDD8160B3E for ; Tue, 21 Feb 2017 12:41:52 +0100 (CET) Received: (qmail 8428 invoked by uid 500); 21 Feb 2017 11:41:51 -0000 Mailing-List: contact issues-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 issues@cloudstack.apache.org Received: (qmail 8418 invoked by uid 500); 21 Feb 2017 11:41:51 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 8415 invoked by uid 99); 21 Feb 2017 11:41:51 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2017 11:41:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 507DD1A7ABA for ; Tue, 21 Feb 2017 11:41:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id IVH8RXSiPiOl for ; Tue, 21 Feb 2017 11:41:50 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 62F6C5F640 for ; Tue, 21 Feb 2017 11:41:49 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7E22DE0A4B for ; Tue, 21 Feb 2017 11:41:46 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 8643524154 for ; Tue, 21 Feb 2017 11:41:44 +0000 (UTC) Date: Tue, 21 Feb 2017 11:41:44 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-9794) Unable to attach more than 14 devices to a VM MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 21 Feb 2017 11:41:53 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15875850#comment-15875850 ] ASF GitHub Bot commented on CLOUDSTACK-9794: -------------------------------------------- Github user HrWiggles commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1953#discussion_r102177792 --- Diff: server/src/com/cloud/storage/VolumeApiServiceImpl.java --- @@ -2639,22 +2639,23 @@ private int getMaxDataVolumesSupported(UserVmVO vm) { return maxDataVolumesSupported.intValue(); } - private Long getDeviceId(long vmId, Long deviceId) { + private Long getDeviceId(UserVmVO vm, Long deviceId) { // allocate deviceId - List vols = _volsDao.findByInstance(vmId); + int maxDataVolumesSupported = getMaxDataVolumesSupported(vm); --- End diff -- Is it enough to use max-data-volumes-supported as the max device id, seeing as device id 3 is not used? (or is reserved) E.g. let's assume that `getMaxDataVolumesSupported(vm)` returns `6`. What device ids should be ok in that case? Would they be `1`, `2`, `4`, `5`, and `6` (since `maxDataVolumesSupported` is `6`) which is a total of `5` data volumes, or should `maxDataVolumesSupported` be renamed as `maxDeviceId` and be assigned a value of `getMaxDataVolumesSupported(vm) + 1` to account for the unused/reserved id `3`? > Unable to attach more than 14 devices to a VM > --------------------------------------------- > > Key: CLOUDSTACK-9794 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9794 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: Volumes > Reporter: Suresh Kumar Anaparti > Assignee: Suresh Kumar Anaparti > Fix For: 4.10 > > > A limit of 13 disks is set in hypervisor_capabilities for VMware hypervisor. Changed this limit to a higher value in the DB directly for the VMware and tried attaching more than 14 disks. This was failing with the below exception: > {noformat} > 2016-08-12 18:42:53,694 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-40:ctx-56068c6b job-1015) (logid:b22938fd) Unexpected exception while executing org.apache.cloudstack.api.command.admin.volume.AttachVolumeCmdByAdmin > java.util.NoSuchElementException > at java.util.ArrayList$Itr.next(ArrayList.java:794) > at com.cloud.storage.VolumeApiServiceImpl.getDeviceId(VolumeApiServiceImpl.java:2439) > at com.cloud.storage.VolumeApiServiceImpl.attachVolumeToVM(VolumeApiServiceImpl.java:1308) > at com.cloud.storage.VolumeApiServiceImpl.attachVolumeToVM(VolumeApiServiceImpl.java:1173) > at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) > at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) > at org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:106) > {noformat} > There was a hardcoded limit of 15 on the number of devices for a VM. -- This message was sent by Atlassian JIRA (v6.3.15#6346)