mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
Revert "daemon: use socket activation with systemd"
This reverts commit 1e9808d3a1
.
We shouldn't advertise libvirtd.socket activation, since currently
it means VM/network/... autostart won't work as expected.
We tried to find a middle ground by installing the config file without
an [Install] section, since systemd won't allow .socket to be enabled
without one... or at least it did do that; presently on f24 it allows
activating the socket quite happily. This also caused user confusion[1]
Just remove the socket file. I've filed a new RFE to track coming up
with a solution to the autostart problem[2], we can point users at that
if there's more confusion:
[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1279348
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1326136
This commit is contained in:
parent
bf01999e9f
commit
3b9100a4d2
1
.gitignore
vendored
1
.gitignore
vendored
@ -63,7 +63,6 @@
|
|||||||
/daemon/libvirtd.pod
|
/daemon/libvirtd.pod
|
||||||
/daemon/libvirtd.policy
|
/daemon/libvirtd.policy
|
||||||
/daemon/libvirtd.service
|
/daemon/libvirtd.service
|
||||||
/daemon/libvirtd.socket
|
|
||||||
/daemon/test_libvirtd.aug
|
/daemon/test_libvirtd.aug
|
||||||
/docs/aclperms.htmlinc
|
/docs/aclperms.htmlinc
|
||||||
/docs/apibuild.py.stamp
|
/docs/apibuild.py.stamp
|
||||||
|
@ -59,7 +59,6 @@ EXTRA_DIST = \
|
|||||||
libvirt.rules \
|
libvirt.rules \
|
||||||
libvirtd.sasl \
|
libvirtd.sasl \
|
||||||
libvirtd.service.in \
|
libvirtd.service.in \
|
||||||
libvirtd.socket.in \
|
|
||||||
libvirtd.sysconf \
|
libvirtd.sysconf \
|
||||||
libvirtd.sysctl \
|
libvirtd.sysctl \
|
||||||
libvirtd.aug \
|
libvirtd.aug \
|
||||||
@ -450,18 +449,15 @@ endif ! LIBVIRT_INIT_SCRIPT_UPSTART
|
|||||||
if LIBVIRT_INIT_SCRIPT_SYSTEMD
|
if LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||||
|
|
||||||
SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
|
SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
|
||||||
BUILT_SOURCES += libvirtd.service libvirtd.socket
|
BUILT_SOURCES += libvirtd.service
|
||||||
|
|
||||||
install-init-systemd: install-sysconfig libvirtd.service libvirtd.socket
|
install-init-systemd: install-sysconfig libvirtd.service
|
||||||
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
|
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
|
||||||
$(INSTALL_DATA) libvirtd.service \
|
$(INSTALL_DATA) libvirtd.service \
|
||||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
|
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
|
||||||
$(INSTALL_DATA) libvirtd.socket \
|
|
||||||
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.socket
|
|
||||||
|
|
||||||
uninstall-init-systemd: uninstall-sysconfig
|
uninstall-init-systemd: uninstall-sysconfig
|
||||||
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
|
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.service
|
||||||
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirtd.socket
|
|
||||||
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
|
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
|
||||||
else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
|
else ! LIBVIRT_INIT_SCRIPT_SYSTEMD
|
||||||
install-init-systemd:
|
install-init-systemd:
|
||||||
@ -485,12 +481,6 @@ libvirtd.service: libvirtd.service.in $(top_builddir)/config.status
|
|||||||
< $< > $@-t && \
|
< $< > $@-t && \
|
||||||
mv $@-t $@
|
mv $@-t $@
|
||||||
|
|
||||||
libvirtd.socket: libvirtd.socket.in $(top_builddir)/config.status
|
|
||||||
$(AM_V_GEN)sed \
|
|
||||||
-e 's|[@]runstatedir[@]|$(runstatedir)|g' \
|
|
||||||
< $< > $@-t && \
|
|
||||||
mv $@-t $@
|
|
||||||
|
|
||||||
|
|
||||||
check-local: check-augeas
|
check-local: check-augeas
|
||||||
|
|
||||||
|
@ -77,11 +77,6 @@
|
|||||||
# UNIX socket access controls
|
# UNIX socket access controls
|
||||||
#
|
#
|
||||||
|
|
||||||
# Beware that if you are changing *any* of these options, and you use
|
|
||||||
# socket activation with systemd, you need to adjust the settings in
|
|
||||||
# the libvirtd.socket file as well since it could impose a security
|
|
||||||
# risk if you rely on file permission checking only.
|
|
||||||
|
|
||||||
# Set the UNIX domain socket group ownership. This can be used to
|
# Set the UNIX domain socket group ownership. This can be used to
|
||||||
# allow a 'trusted' set of users access to management capabilities
|
# allow a 'trusted' set of users access to management capabilities
|
||||||
# without becoming root.
|
# without becoming root.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
# NB we don't use socket activation. When libvirtd starts it will
|
||||||
|
# spawn any virtual machines registered for autostart. We want this
|
||||||
|
# to occur on every boot, regardless of whether any client connects
|
||||||
|
# to a socket. Thus socket activation doesn't have any benefit
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Virtualization daemon
|
Description=Virtualization daemon
|
||||||
Before=libvirt-guests.service
|
Before=libvirt-guests.service
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
[Socket]
|
|
||||||
ListenStream=@runstatedir@/libvirt/libvirt-sock
|
|
||||||
ListenStream=@runstatedir@/libvirt/libvirt-sock-ro
|
|
||||||
|
|
||||||
; The following settings must match libvirtd.conf file in order to
|
|
||||||
; work as expected because libvirtd can't change them later.
|
|
||||||
; SocketMode=0777 is safe only if authentication on the socket is set
|
|
||||||
; up. For further information, please see the libvirtd.conf file.
|
|
||||||
SocketMode=0777
|
|
||||||
SocketUser=root
|
|
||||||
SocketGroup=root
|
|
@ -1709,7 +1709,7 @@ exit 0
|
|||||||
|
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%if %{with_systemd_macros}
|
%if %{with_systemd_macros}
|
||||||
%systemd_post virtlockd.socket virtlogd.socket libvirtd.service libvirtd.socket
|
%systemd_post virtlockd.socket virtlogd.socket libvirtd.service
|
||||||
%else
|
%else
|
||||||
if [ $1 -eq 1 ] ; then
|
if [ $1 -eq 1 ] ; then
|
||||||
# Initial installation
|
# Initial installation
|
||||||
@ -1738,19 +1738,17 @@ fi
|
|||||||
%preun daemon
|
%preun daemon
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%if %{with_systemd_macros}
|
%if %{with_systemd_macros}
|
||||||
%systemd_preun libvirtd.socket libvirtd.service virtlogd.socket virtlogd.service virtlockd.socket virtlockd.service
|
%systemd_preun libvirtd.service virtlogd.socket virtlogd.service virtlockd.socket virtlockd.service
|
||||||
%else
|
%else
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
# Package removal, not upgrade
|
# Package removal, not upgrade
|
||||||
/bin/systemctl --no-reload disable \
|
/bin/systemctl --no-reload disable \
|
||||||
libvirtd.socket \
|
|
||||||
libvirtd.service \
|
libvirtd.service \
|
||||||
virtlogd.socket \
|
virtlogd.socket \
|
||||||
virtlogd.service \
|
virtlogd.service \
|
||||||
virtlockd.socket \
|
virtlockd.socket \
|
||||||
virtlockd.service > /dev/null 2>&1 || :
|
virtlockd.service > /dev/null 2>&1 || :
|
||||||
/bin/systemctl stop \
|
/bin/systemctl stop \
|
||||||
libvirtd.socket \
|
|
||||||
libvirtd.service \
|
libvirtd.service \
|
||||||
virtlogd.socket \
|
virtlogd.socket \
|
||||||
virtlogd.service \
|
virtlogd.service \
|
||||||
@ -1977,7 +1975,6 @@ exit 0
|
|||||||
|
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%{_unitdir}/libvirtd.service
|
%{_unitdir}/libvirtd.service
|
||||||
%{_unitdir}/libvirtd.socket
|
|
||||||
%{_unitdir}/virtlogd.service
|
%{_unitdir}/virtlogd.service
|
||||||
%{_unitdir}/virtlogd.socket
|
%{_unitdir}/virtlogd.socket
|
||||||
%{_unitdir}/virtlockd.service
|
%{_unitdir}/virtlockd.service
|
||||||
|
Loading…
Reference in New Issue
Block a user