Bug 218834

Summary: Failure when running the xendomains init script to obtain status
Product: [Fedora] Fedora Reporter: Douglas Furlong <bugzilla_rhn>
Component: xenAssignee: Xen Maintainance List <xen-maint>
Status: CLOSED DUPLICATE QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: medium    
Version: 6CC: bstein, jan.iven, katzj
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-11 14:37:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Douglas Furlong 2006-12-07 18:54:44 UTC
Description of problem:
When attempting to use the xendomains init script without any switch, or to
retreive a status responce an error message is generated.

Version-Release number of selected component (if applicable):
xen-3.0.3-0.1.rc3


How reproducible:
100%

Steps to Reproduce:
1. service xendomains status/
1a. service xendoamins

  
Actual results:
service xendomains status
Checking for xendomains:/etc/init.d/xendomains: line 69: log_failure_msg:
command not found

or

service xendomains
Usage: /etc/init.d/xendomains {start|stop|restart|reload|status}
/etc/init.d/xendomains: line 69: log_failure_msg: command not found


Expected results:
for no error messages to be generated.

Additional info:

Comment 1 Douglas Furlong 2006-12-07 19:00:25 UTC
In all honesty, I do not think that xendomains is being started on my system.

When running service xendomains start, it comes back with out any form of
prompt, checking for the lock file in /var/lock/subsystem/xendomains it is not
present.

I can't seem to find any log output in either dmesg, /var/log/messages or
/var/log/xen/* when running service xendomains restart.

I hope this provides some additional info

Comment 2 Hugh Brock 2006-12-07 19:21:50 UTC
xendomains won't do anything unless you move domain config files into the
XENDOMAINS_AUTO directory, which is specified in /etc/sysconfig/xendomains
(defaults to /etc/xen/auto). If you have a domU config in XENDOMAINS_AUTO, the
xendomains script will automatically start and stop it when your host machine
comes up and goes down. In addition, depending on some other parameters in that
file, it will automatically save and then restore a domain that is running when
dom0 is shut down normally.

The log_failure_msg error is an artifact of broken shell scripting but is more
or less inconsequential.

Comment 3 Hugh Brock 2006-12-07 19:23:20 UTC
If you are actually trying to autostart/stop domains, please give us more
information about the error condition; if not, please close.

Comment 4 Jan Iven 2006-12-08 10:46:42 UTC
Looks like some issue between /etc/init.d/xendomains and
/lib/lsb/init-functions, the LSB "alias"es are not being seen:

# /bin/bash -x /etc/init.d/xendomains status 
..
+ test -e /lib/lsb/init-functions
+ . /lib/lsb/init-functions
++ alias start_daemon=/etc/redhat-lsb/lsb_start_daemon
++ alias killproc=/etc/redhat-lsb/lsb_killproc
++ alias pidofproc=/etc/redhat-lsb/lsb_pidofproc
++ alias 'log_success_msg=/etc/redhat-lsb/lsb_log_message success'
++ alias 'log_failure_msg=/etc/redhat-lsb/lsb_log_message failure'
++ alias 'log_warning_msg=/etc/redhat-lsb/lsb_log_message warning'
..
+ log_success_msg '  [running] '
/etc/init.d/xendomains: line 67: log_success_msg: command not found


(and I do have images in /etc/xen/auto that start up as expected)

Comment 5 Hugh Brock 2006-12-11 14:37:50 UTC
This is fixed in rhel5 and rawhide, a fix will be in the next fc6 push as well.
The aliases in /lib/lsb/init-functions should in fact be shell functions; they
have been rewritten as such in redhat-lsb-3.1-12.2.EL.i386.rpm.

*** This bug has been marked as a duplicate of 217570 ***