You are on page 1of 5

Main loop

While 1

If t >= lastT+MINUTE

Printf->checking

Scans for the client systems.

ssystem->stateif == systemAlive

ssystem->state == systemDying

systemExiting

Dead

systemInvalidated

send it an rpcPing packet

DeathCh eck(ssyst em, t)

Death not confirmed

SystemDead

expect ed

systemL imbo

rpcExpected

System Dead

System limbo

SystemInvalidate

Syste mInv alidat e

resource s not released "

PINGS

MainPing

systemAliv e

0 => not rebooted 1 => rebooted -1 => alive but does not appear to have gone down

SystemSelect

This routine scans all of the sockets connecting to all of the client Which ==3

*/

Break if any packet from management process

while ssystem == NULL

if which_ssystem != NULL

setjmp(mainEnv)

ior == MLPR && argSockRead

ior == MLPS && argSockWrite

argSockLocal

Case 0 data to receive on the RPC socket

Case 1 data to receive on the stderr socket

Case 2 data to receive on the heartbeat socket Rc<0

Case 3 data to receive on the mgmt socket rc>0

Read a line

PacketReceiv e>0

We get this on forced shutdown/rebo ot but not on forced panic

manualreboot == 1

SystemDying

systemAlive

SYSHA LT

SYSBO OT

SYSPA NIC

aborti ng

rpcDynamic Device

Mainphase

You might also like