Bug 146472

Summary: Subdomain daemon fails to quit
Product: [openSUSE] SUSE Linux 10.1 Reporter: Michael Stather <kontakt>
Component: AppArmorAssignee: Steve Beattie <sbeattie>
Status: RESOLVED FIXED QA Contact: Dominic W Reynolds <dreynolds>
Severity: Normal    
Priority: P5 - None CC: aj
Version: Beta 3   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Michael Stather 2006-01-28 18:27:47 UTC
When shuttong down I always get a "failed" message for the subdomain even daemon, but no additional information.
Comment 1 Dominic W Reynolds 2006-01-30 22:22:37 UTC
Is this during the system shutdown? Or whenever your shutdown apparmor? 

To just shutdown apparmor run: 'rcsubdomain stop' from a console as the root user.

The SubDomain evetn daemon is /usr/sbin/sd-event-dispatch.pl (in beta 3 it will be renamed /usr/sbin/aa-eventd).

Thanks



Comment 2 Michael Stather 2006-01-31 00:47:26 UTC
I wanted to test it out but unfortunately even as root there is no "rcsubdomain" to execute
Comment 3 Steve Beattie 2006-01-31 17:08:25 UTC
There should be an /sbin/rcsubdomain symlink (and starting in beta 3, an /sbin/rcapparmor as well); if there's not, then somethings been corrupted in the apparmor-parser package. 
Comment 4 Michael Stather 2006-01-31 17:44:51 UTC
Strange, now the command works.
I can stop and restart subdomain with success, but on shutdown I get always a "failed". Sometimes also on startup.
Comment 5 Christian Boltz 2006-02-01 22:59:56 UTC
*** Bug 147312 has been marked as a duplicate of this bug. ***
Comment 6 Michael Stather 2006-02-04 23:45:59 UTC
Still the same in beta3
Comment 7 Dominic W Reynolds 2006-02-07 06:48:38 UTC
Steve,

 I think this is addressed by the recent shutdown changes you made for aa-eventd. If this is the case can you close when this goes into abuild?
If not re-assign to me and I can look into it some more.

Comment 8 Steve Beattie 2006-02-07 20:07:23 UTC
Okay, I see what's happening here. This is a result of the event daemon being moved into the boot.apparmor initscript. During a shutdown, init runs the kill scripts in the current runlevel, then sends sigterm and sigkill to all running processes, and only then does it call the boot.d/ scripts with the stop argument. So by the time boot.apparmor gets called to shutdown, init has already killed the apparmor event daemon (by sending it sigkill, which the bug I fixed wouldn't have stopped) without removing the pidfile. Because the pidfile still exists, the boot.apparmor script tries to kill the daemon and fails.

Really, this is yet another call for resurrecting the initscript dedicated to just the event daemon itself. Alas, it's awfully late in the beta cycle to do so.
Comment 9 Dominic W Reynolds 2006-04-03 05:55:45 UTC
Should be fixed by the separation of the aa-eventd into it's own init script. No longer any daemons running as part of boot.apparmor - profile initialization only.