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:
us...@infra.apache.org


Reply via email to