From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 10 12:09:41 2022 Received: (at submit) by debbugs.gnu.org; 10 Feb 2022 17:09:41 +0000 Received: from localhost ([127.0.0.1]:56940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nICwv-000320-Gd for submit@debbugs.gnu.org; Thu, 10 Feb 2022 12:09:41 -0500 Received: from lists.gnu.org ([209.51.188.17]:39034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nICws-00031q-NV for submit@debbugs.gnu.org; Thu, 10 Feb 2022 12:09:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nICwo-0008R8-IS for bug-guix@gnu.org; Thu, 10 Feb 2022 12:09:38 -0500 Received: from [2607:f8b0:4864:20::d34] (port=36376 helo=mail-io1-xd34.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nICwm-0007ha-9K for bug-guix@gnu.org; Thu, 10 Feb 2022 12:09:33 -0500 Received: by mail-io1-xd34.google.com with SMTP id h7so8168220iof.3 for ; Thu, 10 Feb 2022 09:09:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:user-agent:mime-version; bh=04cNBgt7Rgn/9O3kUCFx6zzBySo0kC0/jpDsTPdL8nM=; b=pnRNZfonGO9XBWbTzJdOBnA3enEHQGRAOz2Z/qyE5pDPr2nu2yFT6aJ5znJl/1HOPa Ei52G9/hBSigxTlWZBoWAPNBP6JcnUR8y+RVo5IkBFSwy70bJhTUKWFM8fUN9idFkbdw ensl+ElrQiLeXLF/WBz02S/HlsqvPePI0c7jxxvAzDRz1/GAsGfUDGmt420Cwb4XW1kH HgXAfnRp6t1l69mHklTPO9gOa/BgY8mRqb3gy9aRBfp7jpIac5u96wGKYEQc8EakKoml mOX5dmKe4SSzJYF6WjGNS+yQWDO9P0wXHZmZKia4P5BqK9QkMUkrjwn6x7RHRLrMdTnH XvVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=04cNBgt7Rgn/9O3kUCFx6zzBySo0kC0/jpDsTPdL8nM=; b=B2tJDWSg48ge26j/tjyNjG6BouZgqIoobblixBHyWNvjq/8Me0sfNY4I7JnUUCPaXA VCutrWBFMwAATICWF0FJ/50teEGgLNaK9ABb/2QDAabpkJDaFfDPmdhxUewmDmkUZ3dv XuNTOIZfZXi1169zsCOlsReROksaASd8Kwie7bcZsDpa2TiWYj1oz8IHZRLkHUo1bycg ypOxFgqITSf4D7EsKMiltFyS02dr4JXoQnlbjUgQp4zF9+DeOYhNVA3NTK5FNnc23fj4 UqzH/UB4fbACsiqJ2av0HATT1O+oDebdjlK2oj3uVnwmO0IxWrp2VL4IrTqUhHnODuok 1Z0A== X-Gm-Message-State: AOAM530G6kgAmkFPeJQFVETC5evcVsRdGFETsIXQbPrLB4QEecVRZYD2 SxywrtpExX+T16seEnUBkORVwfmRz14= X-Google-Smtp-Source: ABdhPJzaSQX3IlgL/ck2O3a+w+0cXnfAuY6g186Sttg7g7/g2hsnqGf+01W4iR7ZzWWIfg7+oBq2cw== X-Received: by 2002:a02:3b67:: with SMTP id i39mr4444729jaf.50.1644512970480; Thu, 10 Feb 2022 09:09:30 -0800 (PST) Received: from washu-v4 (172-221-246-205.res.spectrum.com. [172.221.246.205]) by smtp.gmail.com with ESMTPSA id b4sm7316757iln.15.2022.02.10.09.09.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 09:09:30 -0800 (PST) From: Katherine Cox-Buday To: Guix Bugs Subject: The libvirt service does not contain a way to turn-on remote listening Date: Thu, 10 Feb 2022 11:09:29 -0600 Message-ID: <8735kq8x86.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::d34 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::d34; envelope-from=cox.katherine.e@gmail.com; helo=mail-io1-xd34.google.com X-Spam_score_int: 17 X-Spam_score: 1.7 X-Spam_bar: + X-Spam_report: (1.7 / 5.0 requ) AC_FROM_MANY_DOTS=2.996, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) The shepherd libvirt service contains ways to configure "listening mode" (i.e. listening over TCP) capabilities, but contains no way to actually turn this feature on, despite referencing[1] an unimplemented `listen` option: > You must set listen for this to have any effect. >From libvirt's documentation[2]: > Note: it is also necessary to start the server in listening mode by > running it with --listen or adding a LIBVIRTD_ARGS="--listen" line to > /etc/sysconfig/libvirtd. Our service definition requires the ability to specify that shepherd should start the service with the `--listen` flag. [1] - https://guix.gnu.org/manual/en/guix.html#index-listen_002dtcp_003f [2] - https://libvirt.org/remote.html#Remote_libvirtd_configuration -- Katherine From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 12 07:30:43 2022 Received: (at 53921) by debbugs.gnu.org; 12 Feb 2022 12:30:43 +0000 Received: from localhost ([127.0.0.1]:33683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIrY2-0003nw-Is for submit@debbugs.gnu.org; Sat, 12 Feb 2022 07:30:43 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:41949) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIrY0-0003e7-BJ for 53921@debbugs.gnu.org; Sat, 12 Feb 2022 07:30:41 -0500 Received: (Authenticated sender: brice@waegenei.re) by mail.gandi.net (Postfix) with ESMTPSA id 5BCC0240009; Sat, 12 Feb 2022 12:30:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waegenei.re; s=gm1; t=1644669033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pFlYNhMAWLanA6ire5qib5V8fLCinpdudJoj18yzkNM=; b=nZULQiP7IafQZg25Q4fxyy1vMaaTBbFk1LNlUjgQl1kZzBQX+7/Om7DdJ4F+fXsHvKIEhO CDUEMmGyC7DF/ns61fqa9zvUYpB5vKAqMXvtmopyGrAxuBl/pTy3sLYu2Gfk+CPw4c6MTX thwTad/ASc0mVf/yCCrrwwSrpB9xavGAZvWZGiRliRVIrVKpVHOXrJF9ZRrGtRYHEQS7rK ZKfG87pmi9dO572mhxsHSa7wYZSZ5M22DpftUSIqzFAokjyvBv6U6m3qyRoem8t+KI6EOQ BLC8MyrTcUYSOFekpxRPn4VhfMNhMSD2+/Jc4KCCS3beG8Q9sCHizX98bjnpng== From: Brice Waegeneire To: cox.katherine.e@gmail.com Subject: [PATCH] services: libvirt: Enable listening mode based on configuration. Date: Sat, 12 Feb 2022 13:30:28 +0100 Message-Id: <20220212123028.6320-1-brice@waegenei.re> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53921 Cc: 53921@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Fixes . * gnu/services/virtualization.scm (libvirt-shepherd-service): Use 'match-record' instead of accessors. Conditionally add "--listen" flag to the start command. --- Hello Katherine, Katherine Cox-Buday writes: > The shepherd libvirt service contains ways to configure "listening mode" > (i.e. listening over TCP) capabilities, but contains no way to actually turn > this feature on, despite referencing[1] an unimplemented `listen` option: Good catch! This patch fixes the reported issue, I've tested it with success. Cheers, - Brice gnu/services/virtualization.scm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index 66ae1a1565..ba9fe0505c 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2018, 2020, 2021 Ludovic Courtès ;;; Copyright © 2020,2021 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Timotej Lazar +;;; Copyright © 2022 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -467,16 +468,18 @@ (define (%libvirt-activation config) (use-modules (guix build utils)) (mkdir-p #$sock-dir)))) - (define (libvirt-shepherd-service config) - (let* ((config-file (libvirt-conf-file config)) - (libvirt (libvirt-configuration-libvirt config))) + (match-record config + (libvirt listen-tcp? listen-tls?) (list (shepherd-service (documentation "Run the libvirt daemon.") (provision '(libvirtd)) (start #~(make-forkexec-constructor - (list (string-append #$libvirt "/sbin/libvirtd") - "-f" #$config-file) + (list #$(file-append libvirt "/sbin/libvirtd") + (if (or #$listen-tcp? #$listen-tls?) + "--listen" + "") + "-f" #$(libvirt-conf-file config)) ;; For finding qemu and ip binaries. #:environment-variables (list (string-append base-commit: 068d99978a0c9c6fb66f95455060c8d08ba55ac5 -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 12 10:56:48 2022 Received: (at 53921) by debbugs.gnu.org; 12 Feb 2022 15:56:48 +0000 Received: from localhost ([127.0.0.1]:35475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIulT-0004oH-Vv for submit@debbugs.gnu.org; Sat, 12 Feb 2022 10:56:48 -0500 Received: from mail-il1-f173.google.com ([209.85.166.173]:45739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIulS-0004ny-G0 for 53921@debbugs.gnu.org; Sat, 12 Feb 2022 10:56:46 -0500 Received: by mail-il1-f173.google.com with SMTP id n5so9153423ilk.12 for <53921@debbugs.gnu.org>; Sat, 12 Feb 2022 07:56:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=//lJwI0u0SkVYH43eLZ+A0x2riDKqYf+dJJItNf6iAs=; b=RA8n3fRcLsRpA0Q4MDqyoGCeq/PZmvvTXXalvR4qc1p6S34GbgQH3XG0JPuiZReaEP s8CcgDv8VMchnkZgNrNpgyQJv1lLsk4iw+tjNakgN8BBEsShxhEIbeifkIGfSOdX5TmT mZFC8KR24hQj3AFpLukiAriiEksCS7bjIpO/c9jK71suck3cEkjwqfx9hpTxYFBjiCzJ tG9YmKflJwh++UYxF8kg8dUgMz98lRnP6Jjb59uIvxp791Wii9+gmlnUorWTTjWYk8rP pZYryfW2CevnJU1Jba83As70MZOyhXQgcV5ITCJkxF39yLCbhh/YfFfJQ9iJFEnkSmWb 0zKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=//lJwI0u0SkVYH43eLZ+A0x2riDKqYf+dJJItNf6iAs=; b=NBSKJxJN/OLai+A2f84HVALSuyJVvJ8wRoj7Qvc9fTAhZ3ZaOmfCnox3ILWbtAKL+J DiDgY9bNW4J3qW1u/+uEuK3n2st4G+e/jtdIhyoJswuFRNszcrCi4ESIArg1W8Se5wDL pK48g9THtIKxiFR28e0aCmyJBNwin375pdUnK1rWPz8mNwrurmNXQVU9dPRpmoRpJ8hZ sg1WLvjnnHpYX972SCmDGIxVf0PfjBJLslIY+g/LQ5ufxrPzTr8MXtk7eHXf0csIl9Jb KxQfh8VFm5skgSx0yFHtZ71V55GC/lFbEuJFEOurVYqBnGVRvJ0IQrmXLvecAkn6zeAT lcug== X-Gm-Message-State: AOAM5324PILf342ytF5iII03sfu/J1GB90/Nbm5cN8pw1xmnXLuXFhns tgC35cEjQ9gHoE/J8LNScOBFDRuFZhU= X-Google-Smtp-Source: ABdhPJxDLe8N6K69yA1kUKlH7bj3PSZFeDbSJC8sySnC2CwMiOXnKUlLJs86cMbFHRk51Wte0/d3zw== X-Received: by 2002:a05:6e02:16ca:: with SMTP id 10mr1061840ilx.222.1644681400773; Sat, 12 Feb 2022 07:56:40 -0800 (PST) Received: from washu-v4 (172-221-246-205.res.spectrum.com. [172.221.246.205]) by smtp.gmail.com with ESMTPSA id f15sm468401ila.86.2022.02.12.07.56.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Feb 2022 07:56:40 -0800 (PST) From: Katherine Cox-Buday To: Brice Waegeneire Subject: Re: [PATCH] services: libvirt: Enable listening mode based on configuration. References: <20220212123028.6320-1-brice@waegenei.re> Date: Sat, 12 Feb 2022 09:56:39 -0600 In-Reply-To: <20220212123028.6320-1-brice@waegenei.re> (Brice Waegeneire's message of "Sat, 12 Feb 2022 13:30:28 +0100") Message-ID: <87v8xk6pu0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53921 Cc: 53921@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Brice Waegeneire writes: > Good catch! This patch fixes the reported issue, I've tested it with > success. Thanks, Brice! This looks great! -- Katherine