Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 467368 - sys-apps/openrc - stacked runlevels only work one level deep (and other fixes)
Summary: sys-apps/openrc - stacked runlevels only work one level deep (and other fixes)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 481182
  Show dependency tree
 
Reported: 2013-04-26 17:37 UTC by Max Hacking
Modified: 2013-09-20 20:23 UTC (History)
0 users

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


Attachments
Patch to fix run-level stacking (chaining) issues. (openrc-0.11.8-runlevel_chaining.patch,4.12 KB, text/plain)
2013-04-26 17:37 UTC, Max Hacking
Details
Patch to fix run-level stacking (chaining) issues. (openrc-0.11.8-readonly_bind_mount.patch,717 bytes, patch)
2013-04-28 23:08 UTC, Max Hacking
Details | Diff
Patch to fix run-level stacking (chaining) issues. (openrc-0.11.8-runlevel_chaining.patch,14.71 KB, patch)
2013-04-28 23:13 UTC, Max Hacking
Details | Diff
Patch (against current Git master) to fix run-level stacking (chaining) issues. (openrc-10a4385-runlevel_chaining.patch,14.83 KB, patch)
2013-04-29 11:13 UTC, Max Hacking
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Max Hacking 2013-04-26 17:37:40 UTC
Created attachment 346656 [details]
Patch to fix run-level stacking (chaining) issues.

OpenRC support for stacked (chained) runlevels is limited to a single level.  

Also there are other issues with dependency order and incorrect status display when using rc-status (see bug 298826 and bug 426948).

The attached patch should fix these issues.
Comment 1 Max Hacking 2013-04-28 23:08:58 UTC
Created attachment 346840 [details, diff]
Patch to fix run-level stacking (chaining) issues.

It seems the problem space for this bug was more interesting than I originally thought.  :-)

I've attached a more comprehensive patch which should resolve some additional issues.
Comment 2 Max Hacking 2013-04-28 23:13:52 UTC
Created attachment 346842 [details, diff]
Patch to fix run-level stacking (chaining) issues.

Sorry, added the wrong patch there.  Fixed now.
Comment 3 William Hubbs gentoo-dev 2013-04-29 05:18:26 UTC
 Max,

 your patch does not apply cleanly to git master.
 Can you please update your patch so that I can apply it cleanly?

 Thanks,

 William
Comment 4 Max Hacking 2013-04-29 11:13:37 UTC
Created attachment 346876 [details, diff]
Patch (against current Git master) to fix run-level stacking (chaining) issues.

Rebased patch attached as requested.
Comment 5 William Hubbs gentoo-dev 2013-04-30 20:28:33 UTC
What is the reason for adding rc_get_runlevel_chain() instead of
using rc_runlevel_stacks()?

Thanks,

William
Comment 6 Max Hacking 2013-05-01 08:37:51 UTC
(In reply to comment #5)
> What is the reason for adding rc_get_runlevel_chain() instead of
> using rc_runlevel_stacks()?
> 
> Thanks,
> 
> William

rc_runlevel_stacks() returns the stacks a single level deep while rc_get_runlevel_chain() returns the complete chain moving more recently used links to retain dpendency order when multiple runlevels are used.

Eg: Given the runlevel chain below (A uses B & C, B & C use D)

A -> B -> D
  -> C ->

rc_runlevel_stacks() called on A will return B, C.
rc_get_runlevel_chain() called on A will return A, B, C, D.
Comment 7 William Hubbs gentoo-dev 2013-05-01 16:22:15 UTC
Let me phrase my question another way. Why add rc_get_runlevel_chain instead of fixing rc_runlevel_stacks?

Thanks,

William
Comment 8 Max Hacking 2013-05-01 17:31:12 UTC
(In reply to comment #7)
> Let me phrase my question another way. Why add rc_get_runlevel_chain instead
> of fixing rc_runlevel_stacks?
> 
> Thanks,
> 
> William

Because rc_runlevel_stacks() may be used in other places where its current behaviour is expected.  Also, I don't intend to search for every call to rc_runlevel_stacks() and refactor it to pass the list instead of expecting it to be returned.  :-)
Comment 9 Alexander Vershilov (RETIRED) gentoo-dev 2013-07-14 07:26:27 UTC
Sorry but what is the state of this bug? is code applied/reviewed/rejected? Can I somehow help to speedup process?
Comment 10 Alexander Vershilov (RETIRED) gentoo-dev 2013-08-07 06:54:45 UTC
Patch works fine for me, (except I've removed some code style fixes), if you want them please send separate patch. I'd like someone with a real usecase test (bug 426948).

Also I want to check if it's possible to fix rc_runlevel_stacks instead of introducing new function, as it's hidden function and we are free to change it.
Comment 11 William Hubbs gentoo-dev 2013-09-20 20:23:52 UTC
The fix for this is in commit 7716bf3 and will be included in
OpenRC-0.13.