From issues-return-90357-archive-asf-public=cust-asf.ponee.io@cloudstack.apache.org Mon Feb 26 15:33:07 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0E7FF18064A for ; Mon, 26 Feb 2018 15:33:06 +0100 (CET) Received: (qmail 9783 invoked by uid 500); 26 Feb 2018 14:33:06 -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 9774 invoked by uid 500); 26 Feb 2018 14:33:06 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 9771 invoked by uid 99); 26 Feb 2018 14:33:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Feb 2018 14:33:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 74DA21A0F7C for ; Mon, 26 Feb 2018 14:33:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -101.511 X-Spam-Level: X-Spam-Status: No, score=-101.511 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id kdRSqTapsl3K for ; Mon, 26 Feb 2018 14:33:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 146E45FDD4 for ; Mon, 26 Feb 2018 14:33:02 +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 DB10FE093B for ; Mon, 26 Feb 2018 14:33:00 +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 47B24255D2 for ; Mon, 26 Feb 2018 14:33:00 +0000 (UTC) Date: Mon, 26 Feb 2018 14:33:00 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-10305) Rare race condition in KVM migration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-10305?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16376957#comment-16376957 ]=20 ASF subversion and git services commented on CLOUDSTACK-10305: -------------------------------------------------------------- Commit 703054964a9bae27a563412c35166bae515d10e3 in cloudstack's branch refs= /heads/master from [~nicolas.vazquez] [ https://gitbox.apache.org/repos/asf?p=3Dcloudstack.git;h=3D7030549 ] CLOUDSTACK-10305: Rare race condition in KVM migration (#2466) There is a race condition in the monitoring of the migration process on KVM= . If the monitor wakes up in the tight window after the migration succeeds,= but before the migration thread terminates, the monitor will get a Libvirt= Exception =E2=80=9CDomain not found: no domain with matching uuid=E2=80=9D = when checking on the migration status. This in turn causes CloudStack to sy= nc the VM state to stop, in which it issues a defensive StopCommand to ensu= re it is correctly synced. Fix: Prevent LibvirtException: "Domain not found" caused by the call to dm.= getInfo() > Rare race condition in KVM migration > ------------------------------------ > > Key: CLOUDSTACK-10305 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-103= 05 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Reporter: Nicolas Vazquez > Priority: Major > Fix For: 4.11.1.0 > > > There is a race condition in the monitoring of the migration process on K= VM. If the monitor wakes up in the tight window after the migration succeed= s, but before the migration thread terminates, the monitor will get a Libvi= rtException =E2=80=9CDomain not found: no domain with matching uuid=E2=80= =9D when checking on the migration status. This in turn causes CloudStack t= o sync the VM state to stop, in which it issues a defensive StopCommand to = ensure it is correctly synced. > This is issue is reported under these conditions: > * VM migration has physically finished > * Migration thread executor is still not marked as terminated > From the migration monitoring process, as VM has been migrated, that doma= in cannot be found (we should get the destination domain from the migration= thread later) and the LibvirtException is thrown:=C2=A0{{LibvirtException = =E2=80=9CDomain not found: no domain with matching uuid=E2=80=9D}}. > So basically the idea is just logging the issue but not suspending the VM= as the migration has already been performed, but the migration thread is n= ot marked as finished. Once the migrarion thread is marked as finished, the= migration monitoring process (while loop) ends and the migration command w= rapper would continue its execution. > Regarding your last question, we won't need to suspend the VM in this cas= e as the migration has already been performed. VM suspension will take plac= e whenever the migration is in progress and those conditions are met -- This message was sent by Atlassian JIRA (v7.6.3#76005)