Univention Bugzilla – Attachment 3723 Details for
Bug 19145
libvirt Initskript
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Convert back to libvirt-bin
19145-Drop-runit-wrapper-for-libvirt-bin.patch (text/plain), 13.94 KB, created by
Philipp Hahn
on 2011-11-02 18:12 CET
(
hide
)
Description:
Convert back to libvirt-bin
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2011-11-02 18:12 CET
Size:
13.94 KB
patch
obsolete
>From ce6a60cd6a2dcbda3d67d19b4fc59187770e6bbe Mon Sep 17 00:00:00 2001 >Message-Id: <ce6a60cd6a2dcbda3d67d19b4fc59187770e6bbe.1320253870.git.hahn@univention.de> >From: Philipp Hahn <hahn@univention.de> >Date: Tue, 1 Nov 2011 19:57:04 +0100 >Subject: [PATCH] Bug #19145: Drop runit wrapper for libvirt-bin >Organization: Univention GmbH, Bremen, Germany > >univention-virtual-machine-manager-node-common is a replacement for >libvirt-bin, which uses runit as a wrapper. This was used to restart >libvirtd after observed crashed, which later turned out to be bugs in >the Listener module. > >Remove the wrapper and turn back to using simple libvirt-bin. >--- > .../conffiles/etc/default/libvirt-bin | 2 +- > .../debian/changelog | 6 ++ > .../debian/control | 1 + > .../debian/rules | 3 - > ...ention-virtual-machine-manager-node-common.init | 86 -------------------- > ...on-virtual-machine-manager-node-common.postinst | 20 +++-- > ...tion-virtual-machine-manager-node-common.postrm | 11 ++- > ...ion-virtual-machine-manager-node-common.preinst | 46 +++++++++++ > .../libvirtd-acl.py | 2 +- > 9 files changed, 77 insertions(+), 100 deletions(-) > delete mode 100644 branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.init > create mode 100644 branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.preinst > >diff --git a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/conffiles/etc/default/libvirt-bin b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/conffiles/etc/default/libvirt-bin >index 9b5ad3e..0687950 100644 >--- a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/conffiles/etc/default/libvirt-bin >+++ b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/conffiles/etc/default/libvirt-bin >@@ -4,7 +4,7 @@ > # This is a POSIX shell fragment > > # Start libvirtd to handle qemu/kvm: >-start_libvirtd="no" # handled by /etc/service/univention-libvirt >+start_libvirtd="yes" > > # options passed to libvirtd, add "-l" to listen on tcp > libvirtd_opts="-d -l" >diff --git a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/changelog b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/changelog >index e0d3172..5426b67 100644 >--- a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/changelog >+++ b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/changelog >@@ -1,3 +1,9 @@ >+univention-virtual-machine-manager-node (1.0.2-1) unstable; urgency=low >+ >+ * Drop runit wrapper for libvirt-bin (Bug #19145) >+ >+ -- Philipp Hahn <hahn@univention.de> Tue, 01 Nov 2011 18:46:11 +0100 >+ > univention-virtual-machine-manager-node (1.0.1-2) unstable; urgency=low > > * Added dependency to univention-directory-manager-tools (Bug #23342) >diff --git a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/control b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/control >index 018ea17..d69ee32 100644 >--- a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/control >+++ b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/control >@@ -11,6 +11,7 @@ Homepage: http://www.univention.de/ > > Package: univention-virtual-machine-manager-node-common > Architecture: all >+Pre-Depends: dpkg (>= 1.15.7.2) > Depends: ${misc:Depends}, > univention-directory-manager-tools (>> 7.0.147), > libvirt-bin, >diff --git a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/rules b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/rules >index fdba625..be23a20 100755 >--- a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/rules >+++ b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/rules >@@ -41,9 +41,6 @@ override_dh_auto_install: > touch debian/univention-virtual-machine-manager-node-common/etc/runit/univention-libvirt/down > dh_auto_install > >-override_dh_installinit: >- dh_installinit --no-restart-on-upgrade >- > override_dh_auto_clean: > $(RM) debian/univention-virtual-machine-manager-node-*{pre,post}{inst,rm}.debhelper > $(RM) debian/univention-virtual-machine-manager-node-*.conffiles >diff --git a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.init b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.init >deleted file mode 100644 >index 6354925..0000000 >--- a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.init >+++ /dev/null >@@ -1,86 +0,0 @@ >-#!/bin/sh >-# >-# Univention libvirt >-# init script for libvirtd >-# >-# Copyright 2010 Univention GmbH >-# >-# http://www.univention.de/ >-# >-# All rights reserved. >-# >-# The source code of this program is made available >-# under the terms of the GNU Affero General Public License version 3 >-# (GNU AGPL V3) as published by the Free Software Foundation. >-# >-# Binary versions of this program provided by Univention to you as >-# well as other copyrighted, protected or trademarked materials like >-# Logos, graphics, fonts, specific documentations and configurations, >-# cryptographic keys etc. are subject to a license agreement between >-# you and Univention and not subject to the GNU AGPL V3. >-# >-# In the case you use this program under the terms of the GNU AGPL V3, >-# the program is provided in the hope that it will be useful, >-# but WITHOUT ANY WARRANTY; without even the implied warranty of >-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >-# GNU Affero General Public License for more details. >-# >-# You should have received a copy of the GNU Affero General Public >-# License with the Debian GNU/Linux or Univention distribution in file >-# /usr/share/common-licenses/AGPL-3; if not, see >-# <http://www.gnu.org/licenses/>. >- >-if [ ! -e /etc/runit/univention/univention-libvirt ] >-then >- exit 0 >-fi >- >-. /lib/lsb/init-functions >- >-case "$1" in >- start) >- # check ucr autostart setting >- if [ -f "/usr/share/univention-config-registry/init-autostart.lib" ] >- then >- . "/usr/share/univention-config-registry/init-autostart.lib" >- check_autostart univention-libvirt libvirt/autostart >- fi >- log_action_msg "Starting univention-libvirt daemon:" >- sv up univention-libvirt >- log_action_end_msg 0 >- ;; >- stop) >- log_action_msg "Stopping univention-libvirt daemon: " >- sv down univention-libvirt >- log_action_end_msg 0 >- ;; >- restart|force-reload) >- # check ucr autostart setting >- if [ -f "/usr/share/univention-config-registry/init-autostart.lib" ] >- then >- . "/usr/share/univention-config-registry/init-autostart.lib" >- check_autostart univention-libvirt libvirt/autostart >- fi >- log_action_msg "Restarting univention-libvirt daemon: " >- sv restart univention-libvirt >- log_action_end_msg 0 >- ;; >- crestart) >- # check ucr autostart setting >- if [ -f "/usr/share/univention-config-registry/init-autostart.lib" ] >- then >- . "/usr/share/univention-config-registry/init-autostart.lib" >- check_autostart univention-libvirt libvirt/autostart >- fi >- if sv status univention-libvirt | grep -q -s ^run: >- then >- "$0" restart >- else >- log_action_msg "sv status return no running libvirt, don't need to restart." >- fi >- ;; >- *) >- log_action_msg "Usage: $0 {start|stop|restart|crestart|force-reload}" >- exit 1 >- ;; >-esac >diff --git a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.postinst b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.postinst >index a3ff7e2..2c87016 100644 >--- a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.postinst >+++ b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.postinst >@@ -3,7 +3,7 @@ > # UCS Virtual Machine Manager Node Common > # postinst script > # >-# Copyright 2010 Univention GmbH >+# Copyright 2010-2011 Univention GmbH > # > # http://www.univention.de/ > # >@@ -34,6 +34,8 @@ eval "$(univention-config-registry shell server/role)" > > univention-config-registry set "uvmm/backup/directory?/var/backups/univention-virtual-machine-manager-daemon" > >+#DEBHELPER# >+ > case "$1" in > configure) > if [ "$server_role" = "domaincontroller_master" -o "$server_role" = "domaincontroller_backup" ]; then >@@ -55,9 +57,17 @@ case "$1" in > fi > fi > invoke-rc.d univention-directory-listener restart >- update-rc.d -f libvirt-bin remove >- test -e /etc/runit/univention/univention-libvirt || \ >- ln -s ../univention-libvirt /etc/runit/univention/univention-libvirt >+ # Rename back to libvirt-bin >+ if dpkg --compare-versions "$2" lt-nl 1.0.2 >+ then >+ [ -L /etc/runit/univention/univention-libvirt ] && rm -f /etc/runit/univention/univention-libvirt >+ dpkg-maintscript-helper rm_conffile /etc/init.d/univention-virtual-machine-manager-node-common 1.0.2 -- "$@" >+ dpkg-trigger univention-config-wrapper # univention-config-registry update >+ update-rc.d -f univention-virtual-machine-manager-node-common remove >/dev/null >+ update-rc.d -f libvirt-bin remove >/dev/null >+ update-rc.d libvirt-bin defaults 28 72 >/dev/null >+ invoke-rc.d libvirt-bin start >+ fi > ;; > > abort-upgrade|abort-remove|abort-deconfigure) >@@ -69,6 +79,4 @@ case "$1" in > ;; > esac > >-#DEBHELPER# >- > exit 0 >diff --git a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.postrm b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.postrm >index 10b6888..6f50c83 100644 >--- a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.postrm >+++ b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.postrm >@@ -1,9 +1,9 @@ > #!/bin/sh > # > # UCS Virtual Machine Manager Node >-# postinst script >+# postrm script > # >-# Copyright 2010 Univention GmbH >+# Copyright 2010-2011 Univention GmbH > # > # http://www.univention.de/ > # >@@ -33,7 +33,7 @@ > > case "$1" in > purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) >- invoke-rc.d univention-directory-listener restart >+ invoke-rc.d univention-directory-listener restart > ;; > > *) >@@ -41,6 +41,11 @@ case "$1" in > exit 1 > ;; > esac >+case "$1" in >+remove|abort-install|disappear) >+ dpkg-maintscript-helper rm_conffile /etc/init.d/univention-virtual-machine-manager-node-common 1.0.2 -- "$@" >+ ;; >+esac > > #DEBHELPER# > >diff --git a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.preinst b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.preinst >new file mode 100644 >index 0000000..ce9fea0 >--- /dev/null >+++ b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/debian/univention-virtual-machine-manager-node-common.preinst >@@ -0,0 +1,46 @@ >+#!/bin/sh >+# >+# UCS Virtual Machine Manager Node Common >+# preinst script >+# >+# Copyright 2010-2011 Univention GmbH >+# >+# http://www.univention.de/ >+# >+# All rights reserved. >+# >+# The source code of this program is made available >+# under the terms of the GNU Affero General Public License version 3 >+# (GNU AGPL V3) as published by the Free Software Foundation. >+# >+# Binary versions of this program provided by Univention to you as >+# well as other copyrighted, protected or trademarked materials like >+# Logos, graphics, fonts, specific documentations and configurations, >+# cryptographic keys etc. are subject to a license agreement between >+# you and Univention and not subject to the GNU AGPL V3. >+# >+# In the case you use this program under the terms of the GNU AGPL V3, >+# the program is provided in the hope that it will be useful, >+# but WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU Affero General Public License for more details. >+# >+# You should have received a copy of the GNU Affero General Public >+# License with the Debian GNU/Linux or Univention distribution in file >+# /usr/share/common-licenses/AGPL-3; if not, see >+# <http://www.gnu.org/licenses/>. >+ >+case "$1" in >+install|upgrade) >+ # Rename back to libvirt-bin >+ if dpkg --compare-versions "$2" lt-nl 1.0.2 >+ then >+ invoke-rc.d univention-virtual-machine-manager-node-common stop >+ fi >+ dpkg-maintscript-helper rm_conffile /etc/init.d/univention-virtual-machine-manager-node-common 1.0.2 -- "$@" >+ ;; >+esac >+ >+#DEBHELPER# >+ >+exit 0 >diff --git a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/libvirtd-acl.py b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/libvirtd-acl.py >index 509fda3..f15189d 100644 >--- a/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/libvirtd-acl.py >+++ b/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-node/libvirtd-acl.py >@@ -101,7 +101,7 @@ def postrun(): > listener.setuid(0) > try: > # "libvirtd reload" only reloads the driver state, not the config file! >- ret = subprocess.call(['invoke-rc.d', 'univention-virtual-machine-manager-node-common', 'restart']) >+ ret = subprocess.call(['invoke-rc.d', 'libvirt-bin', 'restart']) > need_restart = False > finally: > listener.unsetuid() >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 19145
: 3723