[libvirt] [PATCH 15/29] nodedev: introduce virtnodedevd daemon

Daniel P. Berrangé berrange at redhat.com
Thu Jul 11 16:05:02 UTC 2019


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.

Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 .gitignore                      |  1 +
 libvirt.spec.in                 |  1 +
 src/node_device/Makefile.inc.am | 14 ++++++++++++++
 3 files changed, 16 insertions(+)

diff --git a/.gitignore b/.gitignore
index 4c5c0ba732..d8dd7ab5e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -166,6 +166,7 @@
 /src/virtlockd
 /src/virtlogd
 /src/virtnetworkd
+/src/virtnodedevd
 /src/virtsecretd
 /src/virtstoraged
 /src/virt-guest-shutdown.target
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 453c640b5e..8904d1a28f 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1596,6 +1596,7 @@ exit 0
 %endif
 
 %files daemon-driver-nodedev
+%attr(0755, root, root) %{_sbindir}/virtnodedevd
 %{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so
 
 %files daemon-driver-nwfilter
diff --git a/src/node_device/Makefile.inc.am b/src/node_device/Makefile.inc.am
index 3e04651e8c..8265fbb0c2 100644
--- a/src/node_device/Makefile.inc.am
+++ b/src/node_device/Makefile.inc.am
@@ -64,4 +64,18 @@ libvirt_driver_nodedev_la_LIBADD += \
 endif WITH_UDEV
 
 libvirt_driver_nodedev_la_LIBADD += ../gnulib/lib/libgnu.la
+
+sbin_PROGRAMS += virtnodedevd
+
+virtnodedevd_SOURCES = $(REMOTE_DAEMON_SOURCES)
+virtnodedevd_CFLAGS = \
+       $(REMOTE_DAEMON_CFLAGS) \
+       -DSOCK_NAME="\"virtnodedevd-sock\"" \
+       -DSOCK_NAME_RO="\"virtnodedevd-sock-ro\"" \
+       -DSOCK_NAME_ADMIN="\"virtnodedevd-admin-sock\"" \
+       -DDAEMON_NAME="\"virtnodedevd\"" \
+       -DMODULE_NAME="\"nodedev\"" \
+       $(NULL)
+virtnodedevd_LDFLAGS = $(REMOTE_DAEMON_LDFLAGS)
+virtnodedevd_LDADD = $(REMOTE_DAEMON_LDADD)
 endif WITH_NODE_DEVICES
-- 
2.21.0




More information about the libvir-list mailing list