You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/12/29 14:01:44 UTC
[GitHub] [cloudstack] mib1185 edited a comment on issue #3718: The specified VM already has the maximum number of data disks (6) attached. Please specify another VM. **When VM never ran**
mib1185 edited a comment on issue #3718:
URL: https://github.com/apache/cloudstack/issues/3718#issuecomment-752084899
Hi,
during setup of cloudstack, table `hypervisor_capabilities` is created by
https://github.com/apache/cloudstack/blob/3a326f7280fefcd809573149ceb05b5fc7d07893/setup/db/create-schema.sql#L1657
with "default" entry for `KVM`
https://github.com/apache/cloudstack/blob/3a326f7280fefcd809573149ceb05b5fc7d07893/setup/db/create-schema.sql#L1681
which results in `max_data_volumes_limit` for "kvm default" is set to 6 by
https://github.com/apache/cloudstack/blob/3a326f7280fefcd809573149ceb05b5fc7d07893/setup/db/create-schema.sql#L1664
---
Now in case of creating an instance in state `stopped` it is never started and therefor `vm.getLastHostId()` returns NULL in
https://github.com/apache/cloudstack/blob/3a326f7280fefcd809573149ceb05b5fc7d07893/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java#L3252
and "fallback if no proper configuration is found" is triggered, which grabs the `max_data_volumes_limit` value for "default" hypervisor version (_which was set to 6 during setup_)
https://github.com/apache/cloudstack/blob/3a326f7280fefcd809573149ceb05b5fc7d07893/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java#L3266
---
But once the instance is deployed, `vm.getLastHostId()` will return a valid hostId, which results in respecting the real hypervisor version at
https://github.com/apache/cloudstack/blob/3a326f7280fefcd809573149ceb05b5fc7d07893/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java#L3262
---
I hope this will help to figure out, what happens, if it is a bug or a feature and how to proceed with this case.
regards,
Michael
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org