GitHub user SudharmaJain opened a pull request: https://github.com/apache/cloudstack/pull/2013
Bug-ID: CLOUDSTACK-9734 Destroy VM Fails sometimes This is a specific case when vm state gets updated by the vmsync before it can be updated by the api-job-executor thread. I could see following logs. ``` 2015-10-28 02:03:21,590 DEBUG [jobs.impl.AsyncJobManagerImpl] (API-Job-Executor-5:ctx-5fe7b795 job-3056226 ctx-49b11835) Sync job-3056236 execution on object VmWorkJobQueue.845336 2015-10-28 02:03:23,563 DEBUG [vm.dao.VMInstanceDaoImpl] (API-Job-Executor-5:ctx-5fe7b795 job-3056226 ctx-49b11835) Unable to update VM[User|i-3702-845336-VM]: DB Data={Host=null; State=Stopped; updated=6; time=Wed Oct 28 02:03:23 PDT 2015} New Data: {Host=null; State=Destroyed; updated=6; time=Wed Oct 28 02:03:23 PDT 2015} Stale Data: {Host=null; State=Stopped; updated=5; time=Wed Oct 28 02:03:18 PDT 2015} ``` I don't see any other traces of sync job queued for the mentioned vm. This is an extremely rare scenario and is not reproducible. To fix the scenario, I have added 2 retries to trigger DestroyRequested event for the VM. You can merge this pull request into a Git repository by running: $ git pull https://github.com/Accelerite/cloudstack cs-9734 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/2013.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2013 ---- commit 4686f1e45bfc5ae079b54e3b4ebcb39f50124d9b Author: Sudharma Jain <sudharma.j...@accelerite.com> Date: 2017-01-09T09:45:22Z Bug-ID: CLOUDSTACK-9734 Destroy VM Fails sometimes ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---