From nobody Sun Feb 8 07:08:01 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=1565277258; cv=none; d=zoho.com; s=zohoarc; b=jNZHss8UUwNvinZm5v5yRTR8gHW63bIIY0My4viGFrDWR/HgNhdsCacjAUyTZ6337qF+mekX8VyeSy7yzjRUwxFWkKcsSrgFxhj/la1y+RXEjDcVAwxbNifXc2jomCObFd4bwDTFtaIlN+i135djPcI7OqsLLSg2SeBoX+s5tek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565277258; 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=YfALX+gfG+VROZNKTUXUQUOrzDv6aFpEobwAHqUBWps=; b=Abdfj8Xoh11+ucqVcPFEPrH2mXt4Y+fhy+EiPX1nrYUsRFh7MUq0LXGdwrA9lJEs5zNObOwj7pnQtheBOjec4V7d9jjo0UXY7oRW6nYIp1wDgMj6ctVnW02vm6MVnJzCHUFgtG/0+errmMFN2gf8AJKe7OugmRKFnQUnSLLuOX4= 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 1565277258315835.807915555806; Thu, 8 Aug 2019 08:14:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1204230A5418; Thu, 8 Aug 2019 15:14:17 +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 DF12B17F85; Thu, 8 Aug 2019 15:14:16 +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 9B6A11803B4D; Thu, 8 Aug 2019 15:14:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x78FBngm027555 for ; Thu, 8 Aug 2019 11:11:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4CCE91001948; Thu, 8 Aug 2019 15:11:49 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-28.ams2.redhat.com [10.36.112.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E3A31001284; Thu, 8 Aug 2019 15:11:48 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 8 Aug 2019 16:10:27 +0100 Message-Id: <20190808151044.11385-26-berrange@redhat.com> In-Reply-To: <20190808151044.11385-1-berrange@redhat.com> References: <20190808151044.11385-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Andrea Bolognani Subject: [libvirt] [PATCH v4 25/42] 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 08 Aug 2019 15:14:17 +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 | 63 +++++++++++++++++++++++++ src/node_device/virtnodedevd.service.in | 24 ++++++++++ 4 files changed, 99 insertions(+) create mode 100644 src/node_device/virtnodedevd.service.in diff --git a/.gitignore b/.gitignore index 58a1ef1293..c4f6c0ab2f 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] @@ -186,6 +189,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 35288b0e2d..a3c01e7d21 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..5a6525d843 100644 --- a/src/node_device/Makefile.inc.am +++ b/src/node_device/Makefile.inc.am @@ -64,4 +64,67 @@ 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