From nobody Sun Dec 22 08:11:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1733507428519256.3277181070391; Fri, 6 Dec 2024 09:50:28 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 933461429; Fri, 6 Dec 2024 12:50:27 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 27E9C139A; Fri, 6 Dec 2024 12:48:06 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 94B1BC64; Fri, 6 Dec 2024 12:47:58 -0500 (EST) Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 51A72A74 for ; Fri, 6 Dec 2024 12:47:56 -0500 (EST) Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-27d0e994ae3so1305684fac.3 for ; Fri, 06 Dec 2024 09:47:56 -0800 (PST) Received: from home.. ([2603:8081:c640:1::100a]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-29f566ea976sm932125fac.15.2024.12.06.09.47.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2024 09:47:54 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733507275; x=1734112075; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VWfcDpcyesClfmcLFvkUwnqVLuI6/proSN2wjh7KIfU=; b=D8HzcuVla9LT0cJ5RX7yemdZDms6diizhsmsb+2AaXcAxJoFy6FLXB8ezVT8MkA3tC DKeEbw1YKU3rZUC1mefBWe1EEMGAl7E5X/VLBa6vbvQZbMehV4pDrcHkwf+bMhqYWfrg Ip5IwOWcIWLnh697/nEr3+FxoXKHDurIq6qpTeuHgLWipiaAy/2hN6QV1ROnzxu58Z5Z FKOzpAO8MBPWEfDaa48/e4zD+FQrpNPHzDklpMB6kaXusG5VO9+OnfaHKwAC9RlWB1RC yO9doChEpDV51Xkv1YhqYIWxSKrRGsKIURQoyHQcwByG/I1Brtj/Bf+fMDwW0VQnVN9r 2a5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733507275; x=1734112075; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VWfcDpcyesClfmcLFvkUwnqVLuI6/proSN2wjh7KIfU=; b=W7KGRpI5Qsyxyue4G+2mbk1FcGxhPfOPWOkLuO5MwKsQd1SOgcFbVOEwdIroQWBrcf P+egvnOv807USUraD5cZwE2nk3YUhRE1KQ311RGEK7Tg6WGrYuRidygt0mR8ZCFGDaD5 XAKuqyLKuCy6Sc5S4f14ylSceYRwkkUfVzTT42TCEMo+Mvzn1CopUame/pcJ4gl66G41 caZiQbvwaLALoCcG18yS75Fg2KwSRLYc/ZE+dcUgwexZoaX8zMvaGFQ1d+MyvZ0epI25 TZU5p96PZodMrFEJHbjf0a1Q9KsF0ayjdM87lMBiyHZSKp6vIzri4rEvcNz1OzLWc8E2 9aAg== X-Gm-Message-State: AOJu0Yx7s7q+7HWeFBGeuVnrMKIEVC7zaHID5XOEHvDC9NuoQt1hhoAS Igwr7sz9FZi9WP1jeHlm1ULSqqggwheMI9BAl6Q7Q233jt8/azsfnPP0CBlr X-Gm-Gg: ASbGncsOFwgFEIUcQTvqnKhDK2t92vMIVAiL3ZP1/k2aHMNZVqaF3qlL+eJLa8WAL3P UKtG6MmYD5LIaGIQZIv9MFyV1ktcyKd3hJfpVf7ROlbDRGn1heizgJk1a4fedzhlAxvph7yh8bj B/CXneIh2Y7eEhetl8zFnRqvKCQAGajLsyC3zuzh6+0MeG5j50qjXvcrQwZFp8fUMoJqgVwPWDB IATR5zk2ZH9tV9lyeoDRADtEIe5Pt1pKw== X-Google-Smtp-Source: AGHT+IE29JMZumQa+Ufop5+nZCEWHTtKb6vCVy7pAtESAmL+CVlQfJy0iW8iRIrQ7Y3OMM3uw+n0qg== X-Received: by 2002:a05:6870:dc4b:b0:29e:63b3:8e2b with SMTP id 586e51a60fabf-29f735a1d74mr2031720fac.37.1733507275301; Fri, 06 Dec 2024 09:47:55 -0800 (PST) From: Praveen K Paladugu To: devel@lists.libvirt.org Subject: [PATCH 3/8] qemu: Fix domainLogContextNew invocations in qemu driver Date: Fri, 6 Dec 2024 11:47:44 -0600 Message-ID: <20241206174749.33455-4-praveenkpaladugu@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241206174749.33455-1-praveenkpaladugu@gmail.com> References: <20241206174749.33455-1-praveenkpaladugu@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: GN5N4B5LU773HKHNYP7AZ6EVV6QUZ7WC X-Message-ID-Hash: GN5N4B5LU773HKHNYP7AZ6EVV6QUZ7WC X-MailFrom: praveenkpaladugu@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: liuwe@microsoft.com X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1733507428933116600 Content-Type: text/plain; charset="utf-8" Fix the invocations of domainLogContextNew in qemu driver to use hypervisor agnostic arguments. Signed-off-by: Praveen K Paladugu --- src/qemu/qemu_nbdkit.c | 6 +++++- src/qemu/qemu_process.c | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_nbdkit.c b/src/qemu/qemu_nbdkit.c index de7c62a037..65c98de017 100644 --- a/src/qemu/qemu_nbdkit.c +++ b/src/qemu/qemu_nbdkit.c @@ -1177,6 +1177,7 @@ qemuNbdkitProcessStart(qemuNbdkitProcess *proc, virQEMUDriver *driver) { g_autoptr(virCommand) cmd =3D NULL; + g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); int rc; int exitstatus =3D 0; g_autofree char *errbuf =3D NULL; @@ -1200,7 +1201,10 @@ qemuNbdkitProcessStart(qemuNbdkitProcess *proc, if (!(cmd =3D qemuNbdkitProcessBuildCommand(proc))) return -1; =20 - if (!(logContext =3D domainLogContextNew(driver, vm, basename))) { + if (!(logContext =3D domainLogContextNew(cfg->stdioLogD, cfg->logDir, + QEMU_DRIVER_NAME, + vm, driver->privileged, + basename))) { virLastErrorPrefixMessage("%s", _("can't connect to virtlogd")); return -1; } diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d182206f20..d02105cf44 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4755,8 +4755,7 @@ qemuLogOperation(virDomainObj *vm, return; =20 if (domainLogContextWrite(logCtxt, - "%s: %s %s, qemu version: %d.%d.%d%s, kernel= : %s, - hostname: %s\n", + "%s: %s %s, qemu version: %d.%d.%d%s, kernel= : %s, hostname: %s\n", timestamp, msg, VIR_LOG_VERSION_STRING, (qemuVersion / 1000000) % 1000, (qemuVersion / 1000) % 1000, @@ -7816,7 +7815,10 @@ qemuProcessLaunch(virConnectPtr conn, hookData.cfg =3D cfg; =20 VIR_DEBUG("Creating domain log file"); - if (!(logCtxt =3D domainLogContextNew(driver, vm, vm->def->name))) { + if (!(logCtxt =3D domainLogContextNew(cfg->stdioLogD, cfg->logDir, + QEMU_DRIVER_NAME, + vm, driver->privileged, + vm->def->name))) { virLastErrorPrefixMessage("%s", _("can't connect to virtlogd")); goto cleanup; } --=20 2.47.0