Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322309 - baselayout/openrc: Stop-order init-script dependencies?
Summary: baselayout/openrc: Stop-order init-script dependencies?
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-31 21:56 UTC by Marek Szuba (RETIRED)
Modified: 2010-07-14 14:38 UTC (History)
2 users (show)

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 Marek Szuba (RETIRED) archtester gentoo-dev 2010-05-31 21:56:40 UTC
Hello,

Correct me if I am wrong but I am under the impression that it is at present impossible to control the order in which started init scripts are stopped during shutdown. If this is indeed the case, I believe it would be useful to add support for this - especially in case of OpenRC-based systems, on which operations formerly handled by the baselayout-1 core (e.g. LVM, dmcrypt) have got their own init scripts as well.

What has brought me to think such a feature might be useful is when I noticed current OpenRC messes up the shutdown of dmcrypt volumes when rc_parallel is set to yes. As far as I can tell, what happens is that "dmcrypt stop" is called alphabetically, i.e. pretty early - and fails because the volumes in question (which happen to be this system's /usr and /var) are still busy.

What do you think? I'll be happy to provide more information, should you need any.

Cheers,
-- 
MS
Comment 1 Michael Weber (RETIRED) gentoo-dev 2010-06-08 13:59:45 UTC
This is a good point. You can provide the version of openrc you're using in the subject, but i don't think it makes much difference. I'll assign it to the maintainer of openrc, maybe thay can provide some informations about this.
Comment 2 SpanKY gentoo-dev 2010-06-08 19:32:46 UTC
stop order is implicit in reverse of the start order.  so if you have some dependency you arent expressing, fix your conf.d settings.
Comment 3 Jory A. Pratt gentoo-dev 2010-07-13 03:24:29 UTC
(In reply to comment #2)
> stop order is implicit in reverse of the start order.  so if you have some
> dependency you arent expressing, fix your conf.d settings.
> 

This is correct nothing for us to do here.
Comment 4 Marek Szuba (RETIRED) archtester gentoo-dev 2010-07-13 09:06:31 UTC
Sorry about the long silence, I've been rather busy lately. Anyhow, my two cents:

> stop order is implicit in reverse of the start order.
This only seems to be the case when the scripts are called sequentially, not in parallel mode... Yes, I know about the disclaimer related to this mode - it's just I've been wondering about how this problem could be addressed.

> so if you have some dependency you arent expressing, fix your conf.d settings.
Oh? How can I specify dependencies (in this particular case, making sure "dmcrypt stop" is only called after successful termination of "localmount stop") in conf.d? This would indeed solve the problem, then again OpenRC documentation is rather terse when it comes to the subject of configuration.
Comment 5 William Hubbs gentoo-dev 2010-07-14 14:38:55 UTC
(In reply to comment #4)
> > so if you have some dependency you arent expressing, fix your conf.d settings.
> Oh? How can I specify dependencies (in this particular case, making sure
> "dmcrypt stop" is only called after successful termination of "localmount
> stop") in conf.d? This would indeed solve the problem, then again OpenRC
> documentation is rather terse when it comes to the subject of configuration.

Take a look at the section of /etc/rc.conf called "service configuration variables" and enable the appropriate settings in /etc/conf.d/mdcrypt.

Thanks,

William