Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rc_crashed_stop=YES doesn't function
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Perfect Gentleman
l33t
l33t


Joined: 18 May 2014
Posts: 799

PostPosted: Tue Feb 07, 2017 3:36 pm    Post subject: rc_crashed_stop=YES doesn't function Reply with quote

I got in rc.conf
Code:
rc_crashed_stop=YES
rc_crashed_start=YES

but crashed service neither starts nor stops.

WTF?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Feb 07, 2017 3:54 pm    Post subject: Re: rc_crashed_stop=YES doesn't function Reply with quote

Perfect Gentleman wrote:
I got in rc.conf

Code:
rc_crashed_stop=YES
rc_crashed_start=YES

but crashed service neither starts nor stops.

Perfect Gentleman ... I think you are expecting these to be seperate operations, when in my understanding they are the same ... so in this case one cancels the other.

rc.conf:
# rc will attempt to start crashed services by default.
# However, it will not stop them by default as that could bring down other
# critical services.
#rc_crashed_stop=NO
#rc_crashed_start=YES

... those being the default values, if you want to reverse the 'default' operation, and have crashed services 'stoped' then you need to provide YES, NO, respectively.

That said, I've never felt the need to change this, and so my understanding of how this works may be faulty. Perhaps you should explain why you feel the need to change this, and what you expect to happen.

best ... khay
Back to top
View user's profile Send private message
Perfect Gentleman
l33t
l33t


Joined: 18 May 2014
Posts: 799

PostPosted: Tue Feb 07, 2017 4:17 pm    Post subject: Reply with quote

khayyam, according to wiki
Quote:
By default openrc will attempt just to start crashed services, not restart. This сontrolled by rc_crashed_stop (default NO) and rc_crashed_start (default YES) options in /etc/rc.conf.

So I understood that
Code:
rc_crashed_stop=YES
rc_crashed_start=YES

at first, would stop service, and then would start it.
Some crashed services need to be stopped before starting again, amuled for a example.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Feb 07, 2017 8:33 pm    Post subject: Reply with quote

Perfect Gentleman wrote:
So I understood that

Code:
rc_crashed_stop=YES
rc_crashed_start=YES

at first, would stop service, and then would start it. Some crashed services need to be stopped before starting again, amuled for a example.

Perfect Gentleman ... ok, you're probably right, and giving it some additional thought that would seem to be the correct setting for getting a 'stop start'. However, once the service is started (successfully) openrc isn't doing supervision (for that you need a supervision suite), you might look at app-admin/monit (or s6, daemontools, and others).

BTW, so that you only target amuled can you comment the above in rc.conf and add the following to conf.d/amuled:

/etc/conf.d/amuled:
rc_crashed_stop=YES
rc_crashed_start=YES

... I don't think that will help, because I think the issue here is that once started amuled isn't speaking to openrc and saying "I be crashed, and can I have a 'stop start'".

best ... khay
Back to top
View user's profile Send private message
Perfect Gentleman
l33t
l33t


Joined: 18 May 2014
Posts: 799

PostPosted: Wed Feb 08, 2017 10:36 am    Post subject: Reply with quote

yep, adding
Code:
rc_crashed_stop=YES
rc_crashed_start=YES
also to /etc/conf.d/foo seems to make it work.
it seems to me that settings from rc.conf didn't work as amuled should be stopped two times (sick!) before starting
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Wed Feb 08, 2017 11:22 am    Post subject: Reply with quote

Perfect Gentleman wrote:
yep, adding

Code:
rc_crashed_stop=YES
rc_crashed_start=YES

also to /etc/conf.d/foo seems to make it work. it seems to me that settings from rc.conf didn't work as amuled should be stopped two times (sick!) before starting

Perfect Gentleman ... I'm surprised, but anyway, good. You don't need these in both rc.conf and conf.d/foo, the later should suffice (the later being service specific, and the former being global).

It seems to me that this may be the result of the reversal of global configuration (see: 2016-09-27-openrc_0_22_updates). I'm not using =sys-apps/openrc-0.22 so I can't check the behavior but if the global (rc.conf) setting isn't applied 'globally' (and so including conf.d/foo) then this suggests its broken.

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum