提交 e4de8857 编写于 作者: D Daniel P. Berrangé

nodedev: introduce virtnodedevd daemon

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: NAndrea Bolognani <abologna@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 e23d5b04
...@@ -160,6 +160,9 @@ ...@@ -160,6 +160,9 @@
/src/network/test_virtnetworkd.aug /src/network/test_virtnetworkd.aug
/src/network/virtnetworkd.aug /src/network/virtnetworkd.aug
/src/network/virtnetworkd.conf /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/qemu/test_libvirtd_qemu.aug
/src/remote/*_client_bodies.h /src/remote/*_client_bodies.h
/src/remote/*_protocol.[ch] /src/remote/*_protocol.[ch]
...@@ -186,6 +189,7 @@ ...@@ -186,6 +189,7 @@
/src/virtlockd /src/virtlockd
/src/virtlogd /src/virtlogd
/src/virtnetworkd /src/virtnetworkd
/src/virtnodedevd
/src/virtproxyd /src/virtproxyd
/src/virtsecretd /src/virtsecretd
/src/virtstoraged /src/virtstoraged
......
...@@ -1642,6 +1642,14 @@ exit 0 ...@@ -1642,6 +1642,14 @@ exit 0
%endif %endif
%files daemon-driver-nodedev %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 %{_libdir}/%{name}/connection-driver/libvirt_driver_nodedev.so
%files daemon-driver-nwfilter %files daemon-driver-nwfilter
......
...@@ -64,4 +64,67 @@ libvirt_driver_nodedev_la_LIBADD += \ ...@@ -64,4 +64,67 @@ libvirt_driver_nodedev_la_LIBADD += \
endif WITH_UDEV endif WITH_UDEV
libvirt_driver_nodedev_la_LIBADD += ../gnulib/lib/libgnu.la libvirt_driver_nodedev_la_LIBADD += ../gnulib/lib/libgnu.la
sbin_PROGRAMS += virtnodedevd
nodist_conf_DATA += node_device/virtnodedevd.conf
augeas_DATA += node_device/virtnodedevd.aug
augeastest_DATA += node_device/test_virtnodedevd.aug
CLEANFILES += node_device/virtnodedevd.aug
virtnodedevd_SOURCES = $(REMOTE_DAEMON_SOURCES)
virtnodedevd_CFLAGS = \
$(REMOTE_DAEMON_CFLAGS) \
-DDAEMON_NAME="\"virtnodedevd\"" \
-DMODULE_NAME="\"nodedev\"" \
$(NULL)
virtnodedevd_LDFLAGS = $(REMOTE_DAEMON_LD_FLAGS)
virtnodedevd_LDADD = $(REMOTE_DAEMON_LD_ADD)
SYSTEMD_UNIT_FILES += \
virtnodedevd.service \
virtnodedevd.socket \
virtnodedevd-ro.socket \
virtnodedevd-admin.socket \
$(NULL)
SYSTEMD_UNIT_FILES_IN += \
node_device/virtnodedevd.service.in \
$(NULL)
VIRTNODEDEVD_UNIT_VARS = \
$(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.status
$(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 endif WITH_NODE_DEVICES
[Unit]
Description=Virtualization nodedev daemon
Conflicts=libvirtd.service
Requires=virtnodedevd.socket
Requires=virtnodedevd-ro.socket
Requires=virtnodedevd-admin.socket
After=network.target
After=dbus.service
After=apparmor.service
After=local-fs.target
Documentation=man:libvirtd(8)
Documentation=https://libvirt.org
[Service]
Type=notify
ExecStart=@sbindir@/virtnodedevd --timeout 120
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target
Also=virtnodedevd.socket
Also=virtnodedevd-ro.socket
Also=virtnodedevd-admin.socket
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册