From nobody Mon Feb 9 05:00:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560519269; cv=none; d=zoho.com; s=zohoarc; b=KGGsiEQFS17WUmIbY5e9RKl9dmj/knQYgVV8AQYLd8paCAyelXNWt/RDS1RH/R7iqdI3xgG4MqAglLiHW62ilt2isw4KD1AWWE+HujkWbKqopGUYa/zs83UiQICHZOYXbHVFjyVMLwXknGB4MyyPHUeyyMQyq2tMkRCiquV1xds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560519269; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=DavRJjhiPVoOht6Dcuw52E0FRN12RLhi1hGCYTTdVbI=; b=ng2/XpUbraVG9ElbQojY85Y0eIiBB0WWOgtwpMgrQwOecamQa+Xu5U7DF2Azb+n2m/SfYJgPI6a0CEv3dCC2rQUPd0NiHhPqgU2DuzD3raCq+k2ofi+yNngUbaiykcI7tA58GigNydK4I1Bt6dBMUaq1OLfj2Ud9EtxLejjQ260= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1560519269012364.95619455830786; Fri, 14 Jun 2019 06:34:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4301A3092657; Fri, 14 Jun 2019 13:34:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B0435FCB4; Fri, 14 Jun 2019 13:34:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C9DB5206D2; Fri, 14 Jun 2019 13:34:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5EDUWJ8019709 for ; Fri, 14 Jun 2019 09:30:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id E79542CE56; Fri, 14 Jun 2019 13:30:31 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7385F1753B for ; Fri, 14 Jun 2019 13:30:31 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 14 Jun 2019 15:30:23 +0200 Message-Id: <1cb36b76b6f1443072ff01fffe20494e44581a88.1560518789.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [RFC PATCH 1/5] qemu: driver: Drop support for qemu-attach X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 14 Jun 2019 13:34:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Attaching to modern qemu will not work with all this code and attempting to ressurect it would be mostly pointless. Signed-off-by: Peter Krempa --- src/check-aclrules.pl | 1 + src/qemu/qemu_driver.c | 87 +++--------------------------------------- 2 files changed, 6 insertions(+), 82 deletions(-) diff --git a/src/check-aclrules.pl b/src/check-aclrules.pl index 23872cda98..be618f6c9f 100755 --- a/src/check-aclrules.pl +++ b/src/check-aclrules.pl @@ -61,6 +61,7 @@ my %whitelist =3D ( "interfaceClose" =3D> 1, "connectURIProbe" =3D> 1, "localOnly" =3D> 1, + "domainQemuAttach" =3D> 1, ); # XXX this vzDomainMigrateConfirm3Params looks diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f623eaa422..bb6ba97c7a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16799,92 +16799,15 @@ static int qemuDomainQemuMonitorCommand(virDomain= Ptr domain, const char *cmd, } -static virDomainPtr qemuDomainQemuAttach(virConnectPtr conn, - unsigned int pid_value, +static virDomainPtr qemuDomainQemuAttach(virConnectPtr conn ATTRIBUTE_UNUS= ED, + unsigned int pid_value ATTRIBUTE_= UNUSED, unsigned int flags) { - virQEMUDriverPtr driver =3D conn->privateData; - virDomainObjPtr vm =3D NULL; - virDomainDefPtr def =3D NULL; - virDomainPtr dom =3D NULL; - virDomainChrSourceDefPtr monConfig =3D NULL; - bool monJSON =3D false; - pid_t pid =3D pid_value; - char *pidfile =3D NULL; - virQEMUCapsPtr qemuCaps =3D NULL; - virCapsPtr caps =3D NULL; - virCheckFlags(0, NULL); - if (!(caps =3D virQEMUDriverGetCapabilities(driver, false))) - goto cleanup; - - if (!(def =3D qemuParseCommandLinePid(driver->qemuCapsCache, - caps, driver->xmlopt, pid, - &pidfile, &monConfig, &monJSON))) - goto cleanup; - - if (virDomainQemuAttachEnsureACL(conn, def) < 0) - goto cleanup; - - if (!monConfig) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("No monitor connection for pid %u"), pid_value); - goto cleanup; - } - if (monConfig->type !=3D VIR_DOMAIN_CHR_TYPE_UNIX) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Cannot connect to monitor connection of type '%s= ' " - "for pid %u"), - virDomainChrTypeToString(monConfig->type), - pid_value); - goto cleanup; - } - - if (!(def->name) && - virAsprintf(&def->name, "attach-pid-%u", pid_value) < 0) - goto cleanup; - - if (!(qemuCaps =3D virQEMUCapsCacheLookup(driver->qemuCapsCache, - def->emulator))) - goto cleanup; - - if (qemuAssignDeviceAliases(def, qemuCaps) < 0) - goto cleanup; - - if (!(vm =3D virDomainObjListAdd(driver->domains, def, - driver->xmlopt, - VIR_DOMAIN_OBJ_LIST_ADD_LIVE | - VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE, - NULL))) - goto cleanup; - - def =3D NULL; - - if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0) { - qemuDomainRemoveInactive(driver, vm); - goto cleanup; - } - - if (qemuProcessAttach(conn, driver, vm, pid, - pidfile, monConfig, monJSON) < 0) { - qemuDomainRemoveInactive(driver, vm); - qemuDomainObjEndJob(driver, vm); - goto cleanup; - } - - dom =3D virGetDomain(conn, vm->def->name, vm->def->uuid, vm->def->id); - - qemuDomainObjEndJob(driver, vm); - - cleanup: - virDomainDefFree(def); - virObjectUnref(monConfig); - virDomainObjEndAPI(&vm); - VIR_FREE(pidfile); - virObjectUnref(caps); - virObjectUnref(qemuCaps); - return dom; + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + _("attaching to a non-libvirt qemu process is no longer= supported")); + return NULL; } --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list