cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CLOUDSTACK-9794) Unable to attach more than 14 devices to a VM
Date Tue, 21 Feb 2017 11:41:44 GMT


ASF GitHub Bot commented on CLOUDSTACK-9794:

Github user HrWiggles commented on a diff in the pull request:
    --- Diff: server/src/com/cloud/storage/ ---
    @@ -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) {
    --- End diff --
    How about adding unit tests for the method `getDeviceId(UserVmVO vm, Long deviceId)`?
    Things I can currently think of to test:
    - `RuntimeException` if param `deviceId` is specified as a negative value
    - `RuntimeException` if param `deviceId` is specified as `0L`
    - `RuntimeException` if param `deviceId` is specified as a value greater than the "max-device-id"
    - `RuntimeException` if param `deviceId` is specified as reserved id `3L`
    - `RuntimeException` if param `deviceId` is specified as an id that is already in use
    - `RuntimeException` if param `deviceId` is specified as `null` and all device ids are
in use
    - returns id specified in param `deviceId` when not `null` and the id is not in use
    - returns lowest available id when param `deviceId` is specified as `null`
    (all of the above are from my understanding of how the method should behave)

> Unable to attach more than 14 devices to a VM
> ---------------------------------------------
>                 Key: CLOUDSTACK-9794
>                 URL:
>             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$
> 	at
> 	at
> 	at
> 	at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke(
> 	at
> 	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(
> 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> 	at$EventInterceptor.invoke(
> {noformat}
> There was a hardcoded limit of 15 on the number of devices for a VM.

This message was sent by Atlassian JIRA

View raw message