Ticket #561 (closed task: fixed)
improvement on runit scripts
| Reported by: | juruen@… | Owned by: | ejhernandez@… |
|---|---|---|---|
| Milestone: | 0.10 | Component: | base |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by ejhernandez@…) (diff)
We use runit to start/stop eBox services like: squid, samba, ntp... We are doing a very primitive use of runit at the moment. Basically, we just let runit start the services everytime they go down by unknown reasons.
This behaviour can be dramatically improved and we should at least do the following:
- Log whenever a service has been restarted
- Do not try to restart a service infinitely, that is, if there's an error and a service cannot be started, runit will be trying to start the service all the time. A better approach would be to set a period of time, and a limit of restarting attempts during that period, in case of reach that limit it should stop trying and log the issue properly.
- The log will be watched by EBox::Event::Watcher::Runit to inform administrator what it happens
Attachments
Change History
comment:1 Changed 6 years ago by ejhernandez@…
- Owner changed from juruen@… to ejhernandez@…
- Status changed from new to assigned
- Description modified (diff)
comment:4 Changed 6 years ago by ejhernandez@…
(In [7796]) * Added script to be called in finish scripts inside the runit arch to log how many times a service has been restarted in a time interval. If maximum restart number is exceeded, the eBox module which owns the service will be stopped
- Added a configuration script to set the maximum number of restarts and the time interval
- apache-perl in apache eBox module is already controlled by this new framework
refs #561
comment:7 Changed 6 years ago by ejhernandez@…
(In [7799]) * Added Runit event watcher to check if some service is out of control to notice the eBox admin in some way
- Change return value from run to get back an array ref of EBox::Event instead a single EBox::Event since Runit watcher may return more than one event at the same execution
refs #561
I will do it right now!
Event watcher to that problem is added