Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 481672 - sys-apps/openrc-0.12 - Unable to mark a service as failed
Summary: sys-apps/openrc-0.12 - Unable to mark a service as failed
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
Depends on:
Blocks: 481064
  Show dependency tree
Reported: 2013-08-19 16:57 UTC by Thomas Deutschmann
Modified: 2013-08-20 05:58 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann gentoo-dev Security 2013-08-19 16:57:49 UTC

while trying Alexander's suggestion in #481064 I noticed I cannot mark a service as failed:

# /lib64/rc/bin/service_started test
# echo $?
# /lib64/rc/sbin/mark_service_started test
# echo $?
# /lib64/rc/bin/service_started test
# echo $?
# /lib64/rc/sbin/mark_service_failed test
# echo $?
# /lib64/rc/bin/service_crashed test
# echo $?

Tried with openrc-0.11.8 and openrc-0.12, same result: Unable to mark server "test" as failed".

Reproducible: Always
Comment 1 Alexander Vershilov (RETIRED) gentoo-dev 2013-08-20 05:58:27 UTC
the real problem I have not discovered at the moment of suggesting a  solution, that failed state is an internal one that is used while we are switching runlevels and it's not shown to user:

# /lib64/rc/sbin/mark_service_failed test
 ls /run/openrc/failed/

So service now is in failed state, however rc-status will show just stopped, but if you'll try to start service depending on 'test' it will failed.

Original suggestion will not work because rc clears failed service on exit. See clean_failed function in rc.c. So after runlevel is switched and before new one is started we loose all information on failed services.

I'll close this bug as WORKSFORME. Feel free to reopen. We will work on a double start in a original bug.