Skip to content

VirtualMachinePowerStateSync: New VR not covered in missing VM report #2845

@resmo

Description

@resmo
ISSUE TYPE
  • Bug Report
COMPONENT NAME
VirtualMachinePowerStateSyncImpl
CLOUDSTACK VERSION
4.11.1
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
  1. Upgrade a VR to new template
  2. Delete the new VR before succeeded
  3. 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
VR was not recreated 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions