Bug 117962

Summary: Runlevel editor: Xend service cannot be disabled in simple mode
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Ladislav Slezák <lslezak>
Component: YaST2Assignee: Charles Coffing <ccoffing>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None    
Version: RC 4   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs

Description Ladislav Slezák 2005-09-20 08:56:07 UTC
Select Xend service in the runlevel editor and press Disable - yast asks to
disable depending service xendomains - press Continue. Then close the info dialog. 

Xend service is still enabled. I have to disable it in the expert mode.
Comment 1 Lukas Ocilka 2005-09-20 10:07:50 UTC
Logs :)?
Comment 2 Ladislav Slezák 2005-09-20 10:38:23 UTC
Created attachment 50406 [details]
y2logs
Comment 3 Lukas Ocilka 2005-09-21 09:20:41 UTC
I have all xen-related packages installed

Stopping the xend produces this error:
--- cut ---
/etc/init.d/xendomains stop returned 0 (success):
/etc/init.d/xend stop returned 5 (program is not installed):
xend ..skipped
--- cut ---

On console:
liche:/ # /etc/init.d/xend status
xend 
liche:/ # /etc/init.d/xend stop
xend                                                                  skipped
liche:/ # /etc/init.d/xend start
xend                                                                  skipped
liche:/ # 

Behavior compared to cron
liche:/ # /etc/init.d/cron status
Checking for Cron:                                                    running
liche:/ # /etc/init.d/cron stop
Shutting down CRON daemon                                             done
liche:/ # /etc/init.d/cron status
Checking for Cron:                                                    unused
liche:/ # /etc/init.d/cron start
Starting CRON daemon                                                  done
liche:/ #

From my point of view, the xend init script behaves somehow wrong...
Comment 4 Kurt Garloff 2005-12-05 13:28:13 UTC
Lukas, if you have not booted Xen, your xend of course can't be activated.
Status code 5 for start and stop is correct IMHO.
However, the status output is wrong in that case, it should be 3.

The init scripts needs to be changed to something like

if [ -d /proc/xen/net -o ! -e /proc/xen/privcmd ]; then
        echo -n "xend "
        if [ "$1" = "status" ]; then
                rc_failed 3
        else
                rc_failed 5
        fi
        rc_status -v
        rc_exit
fi

Assigning to Clyde & team for further processing.
Comment 5 Charles Coffing 2006-01-26 00:04:17 UTC
I have this fixed (3.0_8659 or later, coming in beta 3).

But I took the liberty in changing the return codes when trying to stop xend when Xen isn't running.  Here's my logic:

"rcxend stop" should return 0, since LSB says stopping an already-stopped service should be treated as success.  It seems to me that the fact that xend couldn't possibly be running (since Xen isn't running) is irrelevant.

"rcxend start" should return 6 when not on Xen.  "Program is not configured" (6) seems to be more appropriate than "program is not installed" (5).  Clearly it's installed, otherwise you couldn't run the script.  :-)  And "program is not running" (7) isn't right either, since it's Xen that isn't running, not xend.

I've tested from yast, and it behaves well.