From nobody Sun Feb 8 14:53:37 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=1564420342; cv=none; d=zoho.com; s=zohoarc; b=X1lzlKaPPAnxifJ1YcbOpCJbVf4nUeEO4lLciPZERtXQLUtlBw9BrKRy5kyLyIAQg3L0PFUCTPNXF+MA/4eD4UEcwfGBTfb5phRhin3VDW92ojAgTat/4/ovBlfv/jk2vVpXhwXt7LXcFdmuAf5+SVXgc2IxVbDV56lABvhsiYs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564420342; h=Content-Type:Content-Transfer-Encoding:Cc: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=qL7wo1v1nE9bC5QF8z/W1aeBXsMrMtlkqFk8SvVbNeo=; b=NGOW1dteyRDtBZnITAp7K7B4gd3lmpP0KG3pgPE8UFn2e7qoZuBinF24NQ4tqbK+Shoap9nfufeSQXS78ZOgzjaoo97A8ab6UxJ5vf0ZaVuGOvJrL4Ti8Jh9cIiN9OdllO/cHR7GPTz07kgEMkvZG0foVWl3V9sbJvTAgMU6s/A= 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 1564420342238604.2733951520437; Mon, 29 Jul 2019 10:12:22 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DF2FA30C1E2F; Mon, 29 Jul 2019 17:12:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AFA8C601A9; Mon, 29 Jul 2019 17:12:20 +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 68757180BAA1; Mon, 29 Jul 2019 17:12:20 +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 x6THCESF027886 for ; Mon, 29 Jul 2019 13:12:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id C33085C206; Mon, 29 Jul 2019 17:12:14 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-51.ams2.redhat.com [10.36.112.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id C41245C21F; Mon, 29 Jul 2019 17:12:13 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Mon, 29 Jul 2019 18:11:07 +0100 Message-Id: <20190729171130.25484-26-berrange@redhat.com> In-Reply-To: <20190729171130.25484-1-berrange@redhat.com> References: <20190729171130.25484-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Andrea Bolognani Subject: [libvirt] [PATCH v3 25/48] nodedev: introduce virtnodedevd daemon 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-Type: text/plain; charset="utf-8" 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 29 Jul 2019 17:12:21 +0000 (UTC) The virtnodedevd daemon will be responsible for providing the nodedev API driver functionality. The nodedev driver is still loaded by the main libvirtd daemon at this stage, so virtnodedevd must not be running at the same time. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrang=C3=A9 --- .gitignore | 4 ++ libvirt.spec.in | 8 ++++ src/node_device/Makefile.inc.am | 62 +++++++++++++++++++++++++ src/node_device/virtnodedevd.service.in | 24 ++++++++++ 4 files changed, 98 insertions(+) create mode 100644 src/node_device/virtnodedevd.service.in diff --git a/.gitignore b/.gitignore index 3b86183bee..ada72fd618 100644 --- a/.gitignore +++ b/.gitignore @@ -160,6 +160,9 @@ /src/network/test_virtnetworkd.aug /src/network/virtnetworkd.aug /src/network/virtnetworkd.conf +/src/node_device/test_virtnodedevd.aug +/src/node_device/virtnodedevd.aug +/src/node_device/virtnodedevd.conf /src/qemu/test_libvirtd_qemu.aug /src/remote/*_client_bodies.h /src/remote/*_protocol.[ch] @@ -185,6 +188,7 @@ /src/virtlockd /src/virtlogd /src/virtnetworkd +/src/virtnodedevd /src/virtproxyd /src/virtsecretd /src/virtstoraged diff --git a/libvirt.spec.in b/libvirt.spec.in index c34445090d..7519ebebcf 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1642,6 +1642,14 @@ exit 0 %endif =20 %files daemon-driver-nodedev +%config(noreplace) %{_sysconfdir}/libvirt/virtnodedevd.conf +%{_datadir}/augeas/lenses/virtnodedevd.aug +%{_datadir}/augeas/lenses/tests/test_virtnodedevd.aug +%{_unitdir}/virtnodedevd.service +%{_unitdir}/virtnodedevd.socket +%{_unitdir}/virtnodedevd-ro.socket +%{_unitdir}/virtnodedevd-admin.socket +%attr(0755, root, root) %{_sbindir}/virtnodedevd %{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so =20 %files daemon-driver-nwfilter diff --git a/src/node_device/Makefile.inc.am b/src/node_device/Makefile.inc= .am index 3e04651e8c..e71b790735 100644 --- a/src/node_device/Makefile.inc.am +++ b/src/node_device/Makefile.inc.am @@ -64,4 +64,66 @@ libvirt_driver_nodedev_la_LIBADD +=3D \ endif WITH_UDEV =20 libvirt_driver_nodedev_la_LIBADD +=3D ../gnulib/lib/libgnu.la + +sbin_PROGRAMS +=3D virtnodedevd + +nodist_conf_DATA +=3D node_device/virtnodedevd.conf +augeas_DATA +=3D node_device/virtnodedevd.aug +augeastest_DATA +=3D node_device/test_virtnodedevd.aug +CLEANFILES +=3D node_device/virtnodedevd.aug + +virtnodedevd_SOURCES =3D $(REMOTE_DAEMON_SOURCES) +virtnodedevd_CFLAGS =3D \ + $(REMOTE_DAEMON_CFLAGS) \ + -DDAEMON_NAME=3D"\"virtnodedevd\"" \ + -DMODULE_NAME=3D"\"nodedev\"" \ + $(NULL) +virtnodedevd_LDFLAGS =3D $(REMOTE_DAEMON_LD_FLAGS) +virtnodedevd_LDADD =3D $(REMOTE_DAEMON_LD_ADD) + +SYSTEMD_UNIT_FILES +=3D \ + virtnodedevd.service \ + virtnodedevd.socket \ + virtnodedevd-ro.socket \ + virtnodedevd-admin.socket \ + $(NULL) +SYSTEMD_UNIT_FILES_IN +=3D \ + node_device/virtnodedevd.service.in \ + $(NULL) + +VIRTNODEDEVD_UNIT_VARS =3D \ + $(VIRTD_UNIT_VARS) \ + -e 's|[@]name[@]|Libvirt nodedev|g' \ + -e 's|[@]service[@]|virtnodedevd|g' \ + -e 's|[@]sockprefix[@]|virtnodedevd|g' \ + $(NULL) + +virtnodedevd.service: node_device/virtnodedevd.service.in $(top_builddir)/= config.status + $(AM_V_GEN)sed $(VIRTNODEDEVD_UNIT_VARS) < $< > $@-t && mv $@-t $@ + +virtnodedev%.socket: remote/libvirt%.socket.in $(top_builddir)/config.stat= us + $(AM_V_GEN)sed $(VIRTNODEDEVD_UNIT_VARS) < $< > $@-t && mv $@-t $@ + +node_device/virtnodedevd.conf: remote/libvirtd.conf.in + $(AM_V_GEN)sed \ + -e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \ + -e 's/[@]DAEMON_NAME[@]/virtnodedevd/' \ + < $^ > $@ + +node_device/virtnodedevd.aug: remote/libvirtd.aug.in + $(AM_V_GEN)$(SED) \ + -e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \ + -e 's/[@]DAEMON_NAME[@]/virtnodedevd/' \ + -e 's/[@]DAEMON_NAME_UC[@]/Virtnodedevd/' \ + $< > $@ + +node_device/test_virtnodedevd.aug: remote/test_libvirtd.aug.in \ + node_device/virtnodedevd.conf $(AUG_GENTEST) + $(AM_V_GEN)$(AUG_GENTEST) node_device/virtnodedevd.conf \ + $(srcdir)/remote/test_libvirtd.aug.in | \ + $(SED) -e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \ + -e 's/[@]DAEMON_NAME[@]/virtnodedevd/' \ + -e 's/[@]DAEMON_NAME_UC[@]/Virtnodedevd/' \ + > $@ || rm -f $@ + endif WITH_NODE_DEVICES diff --git a/src/node_device/virtnodedevd.service.in b/src/node_device/virt= nodedevd.service.in new file mode 100644 index 0000000000..132ee05a7f --- /dev/null +++ b/src/node_device/virtnodedevd.service.in @@ -0,0 +1,24 @@ +[Unit] +Description=3DVirtualization nodedev daemon +Conflicts=3Dlibvirtd.service +Requires=3Dvirtnodedevd.socket +Requires=3Dvirtnodedevd-ro.socket +Requires=3Dvirtnodedevd-admin.socket +After=3Dnetwork.target +After=3Ddbus.service +After=3Dapparmor.service +After=3Dlocal-fs.target +Documentation=3Dman:libvirtd(8) +Documentation=3Dhttps://libvirt.org + +[Service] +Type=3Dnotify +ExecStart=3D@sbindir@/virtnodedevd --timeout 120 +ExecReload=3D/bin/kill -HUP $MAINPID +Restart=3Don-failure + +[Install] +WantedBy=3Dmulti-user.target +Also=3Dvirtnodedevd.socket +Also=3Dvirtnodedevd-ro.socket +Also=3Dvirtnodedevd-admin.socket --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list