-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
ISSUE TYPE
- Bug Report
COMPONENT NAME
VM deployment (and probably other operations, that depend on CopyCommand)
CLOUDSTACK VERSION
Observed the bahaviour on 4.11.3 to 4.16
CONFIGURATION
OS / ENVIRONMENT
Vmware / Centos 7
SUMMARY
On VMware, It was observed that when a volume migration command is in progress (whose executeInSequence parameter is always true) is followed by a VM deployment operation, the CopyCommand triggered by the clone volume operation waits until volume migration completes. Based on https://github.com/apache/cloudstack/blob/main/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/guru/VMwareGuru.java#L233-L241 if vmware.create.full.clone is false, then it shouldn't wait for volume migration to complete.
The reason for this behavior is that when it goes through all the hypervisor Gurus, at VMware guru, the execute in sequence is set to false, but when it then goes to XenServerGuru, it gets reset to true (https://github.com/apache/cloudstack/blob/main/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/XenServerGuru.java#L183 - as CopyCommand is an instance of StorageSubSystemCommand)
STEPS TO REPRODUCE
1. Initiate a Volume migration - take note of the host to which the command (MigrateVolumeCommand) is sent
2. Deploy a VM on the same host as the one handling volume migration
3. Ensure the following global settings:
- execute.in.sequence.hypervisor.command &
- vmware.create.full.clone
are false
4. Notice that the copy command waits until MigrateVolumeCommand completes
EXPECTED RESULTS
The 2 commands run concurrently when the required global settings are false
ACTUAL RESULTS
CopyCommand waits for MigrateVolumeCommand to complete
Some debug logs to help visualize the issue:
On enabling remote debugging - notice executeInSequence is false

