[Xorp-hackers] process auto restart
Pavlin Radoslavov
pavlin@icir.org
Mon, 09 Aug 2004 11:12:06 -0700
> I have one question. How is process auto restart addressed in XORP design?
> By process auto restart, I mean to automatically restart a process
> which exits abnormally, e.g. crash.
>
> How can the restarted process get its configuration information?
Ray,
The restarting can be done as follows:
1. The rtrmgr detects that the process has exit abnormally by using
one of the following mechanisms:
(a) If the process is running on the same machine as the rtrmgr,
then the rtrmgr can check the process' exit status after
SIGCHLD.
(b) The rtrmgr registers interest with the finder in that
particular process' status. E.g., see the following XRL
interfaces: finder_event_notifier/0.1 and
finder_event_observer/0.1 (inside files
xrl/interfaces/finder_event_notifier.xif and
xrl/interfaces/finder_event_observer.xif).
2. Once the abnormal exit is detected, the rtrmgr can check its
current configuration related to this particular process, and
will execute only those tasks that are needed to start the
process and configure it. Those tasks include the particular
command to start the process, and the XRLs to configure it
(remember that all configuration is done via XRLs sent by the
rtrmgr to the process).
In other words, the rtrmgr has all the responsibility for restarting
and configuring the process, and the process itself does not need to
do anything special.
Note that currently the rtrmgr only detects (using 1(a)) that a
process has exit abnormally, but it does not attempt to restart it.
The restarting should be added in one of the future releases.
Regards,
Pavlin