ISSUE TYPE
COMPONENT NAME
VirtualMachinePowerStateSyncImpl
CLOUDSTACK VERSION
CONFIGURATION
N/A
OS / ENVIRONMENT
N/A
SUMMARY
If a new VR in starting state is missing, cloudstack does not handle the PowerReportMissing correctly. Due the fact that the power_state_update_time for new VRs is null, the fallback is to use the current time. However, as a result, the grace period will never expire and the VR will not be recreated.
STEPS TO REPRODUCE
- Upgrade a VR to new template
- Delete the new VR before succeeded
- In the logs we see
2018-09-17 16:11:56,157 DEBUG [cloud.vm.VirtualMachinePowerStateSyncImpl] (DirectAgentCronJob-188:ctx-000b92c1) Detected missing VM. host: 14, vm id: 1545, power state: PowerReportMissing, last state update: 1537193516155
2018-09-17 16:12:56,037 DEBUG [cloud.vm.VirtualMachinePowerStateSyncImpl] (DirectAgentCronJob-378:ctx-23044819) Detected missing VM. host: 14, vm id: 1545, power state: PowerReportMissing, last state update: 1537193576035
2018-09-17 16:13:56,141 DEBUG [cloud.vm.VirtualMachinePowerStateSyncImpl] (DirectAgentCronJob-380:ctx-50e528ab) Detected missing VM. host: 14, vm id: 1545, power state: PowerReportMissing, last state update: 1537193636139
2018-09-17 16:14:56,013 DEBUG [cloud.vm.VirtualMachinePowerStateSyncImpl] (DirectAgentCronJob-382:ctx-91b21df0) Detected missing VM. host: 14, vm id: 1545, power state: PowerReportMissing, last state update: 1537193696012
EXPECTED RESULTS
VR gets recreated after grace period expired
ACTUAL RESULTS
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
N/A
OS / ENVIRONMENT
N/A
SUMMARY
If a new VR in starting state is missing, cloudstack does not handle the
PowerReportMissingcorrectly. Due the fact that thepower_state_update_timefor new VRs is null, the fallback is to use the current time. However, as a result, the grace period will never expire and the VR will not be recreated.STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS