Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 338862 - app-emulation/xen-tools-4.0.0: /etc/init.d/xendomains fails sometimes if screen support is enabled
Summary: app-emulation/xen-tools-4.0.0: /etc/init.d/xendomains fails sometimes if scre...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-26 22:04 UTC by Pierre Nast
Modified: 2011-03-26 11:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Nast 2010-09-26 22:04:43 UTC
When xen-tools is built with screen support, the xendomains script sometimes fails to start.
The screen session has been created, but the domains are not started.
It seems that the screen's zombie command fails, leading the whole script to failure.
see /etc/init.d/xendomains:42: && ${screen_cmd} zombie dr \

I tried to move the zombie command at the end of the screen's commands and it solved the problem.
--- /etc/init.d/xendomains	2010-09-26 23:48:24.218508438 +0200
+++ /etc/init.d/xendomains.new	2010-09-26 23:02:09.062508370 +0200
@@ -39,12 +39,12 @@
 	if using_screen ; then
 		ebegin "Creating screen session to hold domain consoles"
 		(  screen -d -m -S ${SCREEN_NAME} -t dom0 \
-		&& ${screen_cmd} zombie dr \
 		&& logrotate -f /etc/xen/xen-consoles.logrotate \
 		&& ${screen_cmd} logfile  /var/log/xen-consoles/%t.log \
 		&& ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \
 		&& ${screen_cmd} log on \
-		&& ${screen_cmd} deflog on ) >/dev/null
+		&& ${screen_cmd} deflog on \
+		&& ${screen_cmd} zombie dr ) >/dev/null
 		if [[ $? -ne 0 ]] ; then
 			eend 1
 			return 1


Reproducible: Sometimes

Steps to Reproduce:
1. start xendomains /etc/init.d/xendomains start

Actual Results:  
gaia ~ # /etc/init.d/xendomains start
 * Starting Xen domains from /etc/xen/auto
 * Creating screen session to hold domain consoles ...                    [ !! ]

Expected Results:  
gaia ~ # /etc/init.d/xendomains start
 * Starting Xen domains from /etc/xen/auto
 * Creating screen session to hold domain consoles ...                                                                       [ ok ]
 *   Starting domain anubis ...                                                                       [ ok ]

Linux gaia 2.6.34-xen-r3-xen #1 SMP Wed Sep 15 11:46:49 CEST 2010 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux
Comment 1 Alexey Shvetsov archtester gentoo-dev 2011-03-26 11:39:49 UTC
Xen 4.1 in tree. Please test with it and reopen if it doesnt work