Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 268598 - sys-apps/baselayout all 1.* versions have broken service dependency order
Summary: sys-apps/baselayout all 1.* versions have broken service dependency order
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-04 13:34 UTC by Rick Harris
Modified: 2009-10-11 04:08 UTC (History)
1 user (show)

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


Attachments
baselayout-1.12.11.1-servicedep_fix.diff (baselayout-1.12.11.1-servicedep_fix.diff,3.79 KB, patch)
2009-05-04 13:35 UTC, Rick Harris
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Harris 2009-05-04 13:34:50 UTC
1.
Services listed in /sbin/rc's CRITICAL_SERVICES (checkroot modules checkfs localmount clock bootmisc) are started before service dependency considerations.
Not really a problem there, but services contained in the CRITICAL_SERVICES list also have entries in various /etc/init.d/ scripts expecting to start *before* these services are started.
Some examples of init scripts broken by this are:
/etc/init.d/device-mapper:    before checkfs fsck
/etc/init.d/hdparm:    before bootmisc
/etc/init.d/pciparm:    before bootmisc hdparm
/etc/init.d/udev:    before checkfs fsck
/etc/init.d/hibernate-cleanup:    before localmount
(See bug #234596)

2.
Init script depend 'need net' is not respected.
All init scripts depending on 'need net' start regardless of whether this dependency is met or not.

3.
Checking for whether the 'need net' dependency is met is weak as it simply checks to see if the init script controlling a network interface has been started and doesn't actually check if the network interface is up or has an IP address.
This results in init script failure for all those 'need net' scripts which require an IP address to operate.
One common example of where this check falls over is because DHCP IP requests or wireless authentication take longer than a split second to configure an interface's IP address.

Attached is a patch to address all these issues with the following summary of changes:
* CRITICAL_SERVICES="checkroot modules" (fixes bug #234596)
* New variable in /etc/conf.d/rc, RC_UP_INTERFACE_TIMEOUT="20" to allow time in seconds for a network interface to gain an IP address
* Only attempt to start scripts depending on 'need net' if that dependency has been met, and if it hasn't, warn that it has not been started for that reason
* Fix problem of wpa_supplicant.sh backgrounding before associating to an AP if no 'associate_timeout_${ifvar}' is set in /etc/conf.d/net (fixes bug #266721)
Comment 1 Rick Harris 2009-05-04 13:35:43 UTC
Created attachment 190307 [details, diff]
baselayout-1.12.11.1-servicedep_fix.diff
Comment 2 SpanKY gentoo-dev 2009-10-11 04:08:31 UTC
one of the main points of the openrc rewrite was to address the CRITICAL_SERVICES.  of course we know about the problem.

as for the net stuff, that should all be addressed in openrc as well.

no plans on addressing this in baselayout-1