Russell Coker
2010-Sep-19 12:45 UTC
[Pkg-xen-devel] Bug#597403: xen-utils-common: need to run restorecon in /etc/init.d/xend on SE Linux systems
Package: xen-utils-common Version: 4.0.0-1 Severity: important After running modules_setup you need to have the following line: [ -x /sbin/restorecon ] && /sbin/restorecon -R /dev/xen The reason is that the module load causes the kernel to create device nodes in the devtmpfs. This bypasses the udev code for labelling the device node and results in xenstored being unable to access /dev/xen/evtchn and therefore not working. In Squeeze+1 this will probably be fixed by upstream changes to the kernel and udev. But for Squeeze it would be good if this could get included. It's one line of shell code that results in nothing being done if policycoreutils is not installed. I can't imagine any way that such a change could break anything. -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.32-5-xen-686 (SMP w/1 CPU core) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages xen-utils-common depends on: ii gawk 1:3.1.7.dfsg-5 GNU awk, a pattern scanning and pr ii lsb-base 3.2-23.1 Linux Standard Base 3.2 init scrip ii udev 160-1 /dev/ and hotplug management daemo ii xenstore-utils 4.0.1~rc6-1 Xenstore utilities for Xen xen-utils-common recommends no packages. xen-utils-common suggests no packages. -- Configuration Files: /etc/init.d/xend changed: PATH=/usr/lib/xen-common/bin:/sbin:/bin:/usr/sbin:/usr/bin DESC="Xen daemons" VERSION=$(xen-version) ROOT=/usr/lib/xen-$VERSION XEND="$ROOT"/bin/xend XENCONSOLED="$ROOT"/bin/xenconsoled XENCONSOLED_PIDFILE="/var/run/xenconsoled.pid" XENSTORED="$ROOT"/bin/xenstored XENSTORED_DIR="/var/run/xenstored" XENSTORED_PIDFILE="/var/run/xenstore.pid" [ "$VERSION" ] || exit 0 [ -x "$XEND" ] || exit 0 [ -r /etc/default/xend ] && . /etc/default/xend . /lib/init/vars.sh . /lib/lsb/init-functions modules_setup() { modprobe xenfs 2>/dev/null modprobe xen-evtchn 2>/dev/null } xenfs_setup() { [ -e "/proc/xen/capabilities" ] && return 0 log_progress_msg "xenfs" [ -d "/proc/xen" ] || return 1 mount -t xenfs xenfs /proc/xen || return 1 return 0 } capability_check() { [ -e "/proc/xen/capabilities" ] || return 1 grep -q "control_d" /proc/xen/capabilities || return 1 return 0 } xend_start() { log_progress_msg "xend" $XEND status && return 1 $XEND start || return 2 i=0 while [ $i -lt 10 ]; do $XEND status && return 0 || true i=$(($i + 1)) sleep 1 done return 2 } xend_stop() { log_progress_msg "xend" $XEND status || return 0 $XEND stop || return 1 } xenconsoled_start() { log_progress_msg "xenconsoled" start-stop-daemon --start --quiet --pidfile "$XENCONSOLED_PIDFILE" -- exec "$XENCONSOLED" --test > /dev/null \ || return 1 start-stop-daemon --start --quiet --pidfile "$XENCONSOLED_PIDFILE" -- exec "$XENCONSOLED" -- \ $XENCONSOLED_ARGS --pid-file="$XENCONSOLED_PIDFILE" \ || return 2 } xenstored_start() { log_progress_msg "xenstored" start-stop-daemon --start --quiet --pidfile "$XENSTORED_PIDFILE" -- exec "$XENSTORED" --test > /dev/null \ || return 1 [ -d "$XENSTORED_DIR" ] || mkdir -p "$XENSTORED_DIR" start-stop-daemon --start --quiet --pidfile "$XENSTORED_PIDFILE" -- exec "$XENSTORED" -- \ $XENSTORED_ARGS --pid-file="$XENSTORED_PIDFILE" \ || return 2 } case "$1" in start) log_daemon_msg "Starting $DESC" modules_setup [ -x /sbin/restorecon ] && /sbin/restorecon -R /dev xenfs_setup case "$?" in 0) ;; *) log_end_msg 1; exit ;; esac capability_check case "$?" in 0) ;; *) log_end_msg 255; exit ;; esac xenstored_start case "$?" in 0|1) ;; *) log_end_msg 1; exit ;; esac xenconsoled_start case "$?" in 0|1) ;; *) log_end_msg 1; exit ;; esac xend_start case "$?" in 0|1) ;; *) log_end_msg 1; exit ;; esac log_end_msg 0 ;; stop) capability_check case "$?" in 0) ;; *) exit ;; esac log_daemon_msg "Stopping $DESC" xend_stop case "$?" in 0|1) log_end_msg 0 ;; *) log_end_msg 1 ;; esac ;; restart|force-reload) capability_check case "$?" in 0) ;; *) exit ;; esac log_daemon_msg "Restarting $DESC" xend_stop case "$?" in 0|1) xend_start case "$?" in 0) log_end_msg 0 ;; *) log_end_msg 1 ;; esac ;; *) log_end_msg 1 ;; esac ;; *) echo "Usage: $0 {start|stop|restart|force-reload}" >&2 exit 3 ;; esac exit 0 -- no debconf information
Bastian Blank
2010-Sep-19 13:13 UTC
[Pkg-xen-devel] Bug#597403: Bug#597403: xen-utils-common: need to run restorecon in /etc/init.d/xend on SE Linux systems
tags 597403 moreinfo thanks On Sun, Sep 19, 2010 at 10:45:06PM +1000, Russell Coker wrote:> The reason is that the module load causes the kernel to create device nodes in > the devtmpfs. This bypasses the udev code for labelling the device node and > results in xenstored being unable to access /dev/xen/evtchn and therefore > not working.No, it does not. The code to create devices in libxc was removed.> But for Squeeze it would be good if this could get included. It's one line of > shell code that results in nothing being done if policycoreutils is not > installed. I can't imagine any way that such a change could break anything.You want do change a undefined number of packages? Bastian -- Every living thing wants to survive. -- Spock, "The Ultimate Computer", stardate 4731.3
Debian Bug Tracking System
2010-Sep-19 13:15 UTC
[Pkg-xen-devel] Processed: Re: Bug#597403: xen-utils-common: need to run restorecon in /etc/init.d/xend on SE Linux systems
Processing commands for control at bugs.debian.org:> tags 597403 moreinfoBug #597403 [xen-utils-common] xen-utils-common: need to run restorecon in /etc/init.d/xend on SE Linux systems Added tag(s) moreinfo.> thanksStopping processing here. Please contact me if you need assistance. -- 597403: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597403 Debian Bug Tracking System Contact owner at bugs.debian.org with problems
Debian Bug Tracking System
2012-Apr-14 17:03 UTC
[Pkg-xen-devel] Bug#597403: marked as done (xen-utils-common: need to run restorecon in /etc/init.d/xend on SE Linux systems)
Your message dated Sat, 14 Apr 2012 18:59:50 +0200 with message-id <20120414165950.GA24776 at wavehammer.waldi.eu.org> and subject line Re: [Pkg-xen-devel] Bug#597403: Bug#597403: Bug#597403: xen-utils-common: need to run restorecon in /etc/init.d/xend on SE Linux systems has caused the Debian Bug report #597403, regarding xen-utils-common: need to run restorecon in /etc/init.d/xend on SE Linux systems to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 597403: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597403 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Russell Coker <russell at coker.com.au> Subject: xen-utils-common: need to run restorecon in /etc/init.d/xend on SE Linux systems Date: Sun, 19 Sep 2010 22:45:06 +1000 Size: 7839 URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20120414/8dae8b21/attachment-0002.mht> -------------- next part -------------- An embedded message was scrubbed... From: Bastian Blank <waldi at debian.org> Subject: Re: [Pkg-xen-devel] Bug#597403: Bug#597403: Bug#597403: xen-utils-common: need to run restorecon in /etc/init.d/xend on SE Linux systems Date: Sat, 14 Apr 2012 18:59:50 +0200 Size: 2066 URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20120414/8dae8b21/attachment-0003.mht>
Apparently Analagous Threads
- Bug#764912: xen-utils-common: needs to apply SE Linux labels after creating directories in start script
- Bug#678719: xen-utils-common: please label all created directories for SE Linux
- Bug#742397: xen-utils-common: /etc/init.d/dom0weight is hardcoded to use xm
- Bug#770456: Bug#770456: Please start a qemu process in domain 0.
- Bug#770456: Please start a qemu process in domain 0.