Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F0966200C4D for ; Tue, 21 Mar 2017 19:54:45 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id EDB21160B6E; Tue, 21 Mar 2017 18:54:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 51DF6160B81 for ; Tue, 21 Mar 2017 19:54:45 +0100 (CET) Received: (qmail 89493 invoked by uid 500); 21 Mar 2017 18:54:44 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 89461 invoked by uid 500); 21 Mar 2017 18:54:43 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 89458 invoked by uid 99); 21 Mar 2017 18:54:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Mar 2017 18:54:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 9513AC7D4F for ; Tue, 21 Mar 2017 18:54:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.348 X-Spam-Level: X-Spam-Status: No, score=-99.348 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id TYYnfaGhDcZ9 for ; Tue, 21 Mar 2017 18:54:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 996835FCF4 for ; Tue, 21 Mar 2017 18:54:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 2D805E0959 for ; Tue, 21 Mar 2017 18:54:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A4385254D7 for ; Tue, 21 Mar 2017 18:54:41 +0000 (UTC) Date: Tue, 21 Mar 2017 18:54:41 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-9734) Destroy VM Fails sometimes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 21 Mar 2017 18:54:46 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15935120#comment-15935120 ] ASF GitHub Bot commented on CLOUDSTACK-9734: -------------------------------------------- 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 Date: 2017-01-09T09:45:22Z Bug-ID: CLOUDSTACK-9734 Destroy VM Fails sometimes ---- > Destroy VM Fails sometimes > -------------------------- > > Key: CLOUDSTACK-9734 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9734 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Affects Versions: 4.8.0 > Reporter: sudharma jain > > Observed Error like below. > 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} > 2015-10-28 02:03:23,563 DEBUG [cloud.vm.VirtualMachineManagerImpl] (API-Job-Executor-5:ctx-5fe7b795 job-3056226 ctx-49b11835) Unable to destroy the vm because it is not in the correct state: VM[User|i-3702-845336-VM] > 2015-10-28 02:03:23,581 ERROR [cloud.api.ApiAsyncJobDispatcher] (API-Job-Executor-5:ctx-5fe7b795 job-3056226) Unexpected exception while executing org.apache.cloudstack.api.command.admin.vm.DestroyVMCmdByAdmin > com.cloud.utils.exception.CloudRuntimeException: Unable to destroy VM[User|i-3702-845336-VM] -- This message was sent by Atlassian JIRA (v6.3.15#6346)