DmB991 opened a new issue #3526: Incorrect work of getFreeMemory() in 
LibvirtStartCommandWrapper.java
URL: https://github.com/apache/cloudstack/issues/3526
 
 
   ##### ISSUE TYPE
    * Bug Report
   
   ##### COMPONENT NAME
   ~~~
   LibvirtStartCommandWrapper.java
   ~~~
   
   ##### CLOUDSTACK VERSION
   ~~~
   4.10 +
   ~~~
   
   ##### CONFIGURATION
   N/A
   
   ##### OS / ENVIRONMENT
   N/A
   
   ##### SUMMARY
   I found error in getFreeMemory() of 
https://github.com/apache/cloudstack/blob/4.11/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtStartCommandWrapper.java#L170
   When I create a new VM we take a list of all VMs from libvirt via 
getFreeMemory(). After that we iterate by this list. If amount of VMs so 
large(or libvirt response longer than always) this may take some time. At that 
time one or more VMs, which has "Running" state can start stopping by another 
process(job) and not displayed in libvirt anymore. So it bring to exception 
with "libvirt.libvirtError: Domain not found: no domain with matching id 
157124." message and we move on catch with wrong error message(Failed to get 
free memory).
   
   ##### STEPS TO REPRODUCE
   ~~~
   1. Start one proces which will create VMs.
   2. When we have 100(create more if not reproduce) VMs on host should start 
another process which will destroy VMs.
   3. Still some time we will see error message "Failed to get free memory" in 
logs with free memory resources on host.
   ~~~
   management-server.log https://yadi.sk/d/wzyZVeTKS2kkDQ
   
   ##### EXPECTED RESULTS
   ~~~
   Correct creation of VM without exceptions.
   ~~~
   
   ##### ACTUAL RESULTS
   ~~~
   INFO message "Failed to get free memory" and ERROR with 
InsufficientCapacityEception.
   ~~~
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to