Received: from eggs.gnu.org ([2001:4830:134:3::10]:54897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YG6T6-00036A-4V for qemu-devel@nongnu.org; Tue, 27 Jan 2015 08:46:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YG6T0-0002JU-Vn for qemu-devel@nongnu.org; Tue, 27 Jan 2015 08:46:12 -0500 Received: from indium.canonical.com ([91.189.90.7]:41621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YG6T0-0002JA-N3 for qemu-devel@nongnu.org; Tue, 27 Jan 2015 08:46:06 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1YG6Sz-0002fr-Rr for ; Tue, 27 Jan 2015 13:46:05 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id C86D22E8043 for ; Tue, 27 Jan 2015 13:46:05 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 27 Jan 2015 13:36:43 -0000 From: Stefan Bader Sender: bounces@canonical.com References: <20111129155310.23239.76602.malonedeb@wampee.canonical.com> Message-Id: <20150127133644.550.64044.malone@chaenomeles.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 897750] Re: libvirt/kvm problem with disk attach/detach/reattach on running virt Reply-To: Bug 897750 <897750@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Serge, Scott, somehow I think we all left here in a confused state and I do not think we still have the problem (at least not Trusty). From my last comment it seems I did not even find something that I could change for Precise. For now I would unassign myself and maybe this report should be closed if Justin has no objections. ** Changed in: qemu-kvm (Ubuntu) Assignee: Stefan Bader (smb) =3D> (unassigned) -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/897750 Title: libvirt/kvm problem with disk attach/detach/reattach on running virt Status in QEMU: New Status in qemu-kvm package in Ubuntu: Confirmed Bug description: Release: Ubuntu 11.10 (Oneiric) libvirt-bin: 0.9.2-4ubuntu15.1 qemu-kvm: 0.14.1+noroms-0ubuntu6 Summary: With a running KVM virt, performing an 'attach-disk', then= a 'detach-disk', then another 'attach-disk' = in an attempt to reattach the volume at the same point on the virt, fails= , with the qemu reporting back to libvirt a 'Duplicate ID' error. Expected behavior: The 2nd invocation of 'attach-disk' should have succ= eeded Actual behavior: Duplicate ID error reported = I believe this is most likely a qemu-kvm issue, as the DOM kvm spits bac= k at libvirt after the 'detach-disk' does not show the just-detached disk. There is some kind of registry/lo= okup for devices in qemu-kvm and for whatever reason, the entry for the disk does not get removed when= it is detached from the virt. Specifically, the error gets reported at the 2nd attach-disk atte= mpt from: = qemu-option.c:qemu_opts_create:697 684 QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id, int fa= il_if_exists) = 685 { = = 686 QemuOpts *opts =3D NULL; = = 687 = = 688 if (id) { = = 689 if (!id_wellformed(id)) { = = 690 qerror_report(QERR_INVALID_PARAMETER_VALUE, "id", "an ide= ntifier"); = 691 error_printf_unless_qmp("Identifiers consist of letters, = digits, '-', '.', '_', starting with a letter.\n"); = 692 return NULL; = = 693 } = = 694 opts =3D qemu_opts_find(list, id); = = 695 if (opts !=3D NULL) { = = 696 if (fail_if_exists) { = = 697 qerror_report(QERR_DUPLICATE_ID, id, list->name); = <<<< =3D=3D=3D=3D=3D=3D HERE =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D = = 698 return NULL; = = 699 } else { = = 700 return opts; = = 701 } = = 702 } = = 703 } = = 704 opts =3D qemu_mallocz(sizeof(*opts)); = = 705 if (id) { = = 706 opts->id =3D qemu_strdup(id); = = 707 } = = 708 opts->list =3D list; = = 709 loc_save(&opts->loc); = = 710 QTAILQ_INIT(&opts->head); = = 711 QTAILQ_INSERT_TAIL(&list->head, opts, next); = = 712 return opts; = = 713 } = = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Output of my attach/detach/attach =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D virsh # attach-disk base1 /var/lib/libvirt/images/extrastorage.img vdb Disk attached successfully virsh # dumpxml base1 base1 9ebebe7f-7dfa-4735-a80c-c19ebe4e1459 1048576 1048576 2 hvm Opteron_G3 AMD destroy restart restart /usr/bin/kvm