reboot on init panic instead of restart

Asked by Alex Nekrasov on 2009-05-05

upstart 0.3.9

I'm trying to deal with the following situation:

- have some jobs running
- init panics. There's a core, etc. This is not a problem
- init restarts
- the jobs are still running, but initctl status does not know about it. This is a problem
- system becomes incoherent, for example Linux HA resources get cloned, etc., for they query Upstart for status. All kind of bad things happen from here on

I need to tell init to reboot the machine when it crashes or I need it to notify me right away - call or emit something, etc.

Is there a way to do that?

thanks,
Alex

Question information

Language:
English Edit question
Status:
Solved
For:
upstart Edit question
Assignee:
No assignee Edit question
Solved by:
Scott James Remnant (Canonical)
Solved:
2009-05-07
Last query:
2009-05-07
Last reply:
2009-05-07

On Tue, 2009-05-05 at 14:49 +0000, Alex Nekrasov wrote:

> upstart 0.3.9
>
> I'm trying to deal with the following situation:
>
> - have some jobs running
> - init panics. There's a core, etc. This is not a problem
> - init restarts
> - the jobs are still running, but initctl status does not know about it. This is a problem
> - system becomes incoherent, for example Linux HA resources get cloned, etc., for they query Upstart for status. All kind of bad things happen from here on
>
> I need to tell init to reboot the machine when it crashes or I need it to notify me right away - call or emit something, etc.
>
> Is there a way to do that?
>
No, there is no facility to do that.

Future versions will probably just let the kernel panic.

Scott
--
Scott James Remnant
<email address hidden>

Alex Nekrasov (ennnot) said : #2

since I'm stuck with 0.3.8 on my system, if I were to do that to my version,

- where would be the right place (I think term_handler in init/main.c)?

- would you be interested in having this change delivered to you (I think not, for I'm not going to do much)

On Wed, 2009-05-06 at 14:20 +0000, Alex Nekrasov wrote:

> Question #70039 on upstart changed:
> https://answers.launchpad.net/upstart/+question/70039
>
> Status: Answered => Open
>
> Alex Nekrasov is still having a problem:
> since I'm stuck with 0.3.8 on my system, if I were to do that to my
> version,
>
> - where would be the right place (I think term_handler in init/main.c)?
>
crash_handler I think.

> - would you be interested in having this change delivered to you (I
> think not, for I'm not going to do much)
>
Sure.

Scott
--
Scott James Remnant
<email address hidden>

Alex Nekrasov (ennnot) said : #4

Thanks Scott James Remnant, that solved my question.