cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HrWiggles <...@git.apache.org>
Subject [GitHub] cloudstack pull request #1953: CLOUDSTACK-9794: Unable to attach more than 1...
Date Tue, 21 Feb 2017 11:41:29 GMT
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<VolumeVO> 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`?


---
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