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 0ECDA200BE4 for ; Wed, 21 Dec 2016 12:32:25 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0D730160B26; Wed, 21 Dec 2016 11:32:25 +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 58C8B160B0C for ; Wed, 21 Dec 2016 12:32:24 +0100 (CET) Received: (qmail 56960 invoked by uid 500); 21 Dec 2016 11:32:23 -0000 Mailing-List: contact dev-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 dev@cloudstack.apache.org Received: (qmail 56945 invoked by uid 99); 21 Dec 2016 11:32:23 -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; Wed, 21 Dec 2016 11:32:23 +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 A05301A9F2E for ; Wed, 21 Dec 2016 11:32:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.264 X-Spam-Level: ** X-Spam-Status: No, score=2.264 tagged_above=-999 required=6.31 tests=[FSL_HELO_BARE_IP_2=1.119, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_NUMERIC_HELO=0.865] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id JOfKdCwFs1Je for ; Wed, 21 Dec 2016 11:32:20 +0000 (UTC) Received: from smtp01.mail.pcextreme.nl (smtp01.mail.pcextreme.nl [109.72.87.137]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id E955D5F5F8 for ; Wed, 21 Dec 2016 11:32:19 +0000 (UTC) Received: from 109.72.87.221 (ox01.pcextreme.nl [109.72.87.221]) by smtp01.mail.pcextreme.nl (Postfix) with ESMTPSA id 26EE676048; Wed, 21 Dec 2016 12:31:56 +0100 (CET) Date: Wed, 21 Dec 2016 12:31:56 +0100 (CET) From: Wido den Hollander To: Rohit Yadav , dev@cloudstack.apache.org Message-ID: <598487586.5073.1482319916767@ox.pcextreme.nl> In-Reply-To: References: Subject: Re: [DISCUSS][KVM][BUG] Detaching of volume fails on KVM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.2-Rev12 X-Originating-Client: open-xchange-appsuite archived-at: Wed, 21 Dec 2016 11:32:25 -0000 > Op 21 december 2016 om 12:00 schreef Rohit Yadav : > > > All, > > > Based on results from recent Trillian test runs [1], I've discovered that on KVM (CentOS7) based detaching a volume fails to update the virt/domain xml and fails to remove the xml. So, while the agent and cloudstack-mgmt server succeeds, the entry in the xml is not removed. When the volume is attached again, we can an error like: > > > Failed to attach volume xxx to VM VM-yyyy; org.libvirt.LibvirtException: XML error: target 'vdb' duplicated for disk sources '/mnt/8a70be4e-4c3c-38e5-aea2-4b38fef83fd5/af85ff7e-a452-43de-8c6b-948dc44aae21' and '/mnt/8a70be4e-4c3c-38e5-aea2-4b38fef83fd5/af85ff7e-a452-43de-8c6b-948dc44aae21'This is seen in agent logs: > > Dec 21 10:46:35 pr1837-t692-kvm-centos7-kvm2 sh[27400]: DEBUG [kvm.storage.KVMStorageProcessor] (agentRequest-Handler-2:) (logid:0648ae70) Detaching device: > Dec 21 10:46:35 pr1837-t692-kvm-centos7-kvm2 sh[27400]: > Dec 21 10:46:35 pr1837-t692-kvm-centos7-kvm2 sh[27400]: > Dec 21 10:46:35 pr1837-t692-kvm-centos7-kvm2 sh[27400]: > Dec 21 10:46:35 pr1837-t692-kvm-centos7-kvm2 sh[27400]: > > While, after above completes. This is still seen in the VM's dumped xml: > > > > > > af85ff7ea45243de8c6b > >
> > Steps to reproduce: > 1. Deploy a VM, create a data volume disk and attach to the VM. > 2. Detach the volume. > 3. Attach the volume to the same VM again, exception is caught.Thoughts, comments?[1] https://github.com/apache/cloudstack/pull/1837 > Regards. > Isn't this a Qemu bug? That it thinks it detached it, but it doesn't. Or a libvirt thing? > > rohit.yadav@shapeblue.com > www.shapeblue.com > 53 Chandos Place, Covent Garden, London WC2N 4HSUK > @shapeblue > > >