marek-sezemsky / coreemu

Automatically exported from code.google.com/p/coreemu
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

false check emulation light (CEL) warnings for service validate using pidof #228

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Run a scenario observe the CEL warning in the bottom right.

"DATE: Tue Oct  1 07:09:01 2013
LEVEL: ERROR (2)
NODE: 2 (n2)
SESSION: 41413
SOURCE: service:OSPFv2

validate command failed: pidof ospfd"

The pidof validate command is invoked before the quaggaboot.sh script has a 
chance to launch the ospfd service.

This happens with many of the "pidof" validate commands.

Original issue reported on code.google.com by ahrenh...@gmail.com on 1 Oct 2013 at 2:42

GoogleCodeExporter commented 9 years ago
Session.instantiate() has these calls:
        self.bootnodes(handler)
        # allow time for processes to start
        time.sleep(0.125)
        self.validatenodes()

A more robust method would allow for processes that background themselves and 
those that do not. Default would be assuming they do not daemonize.

Quagga service could be changed such that zebra, ospfd, etc. are started with 
node.cmd(..., wait=True); the validate command could be queued for running 
after the start command completes.

Another option is to have a pidof helper script that repeatedly checks for PID. 
Or have a session option "settle time" that is configurable (default = 1s).

Original comment by ahrenh...@gmail.com on 19 Dec 2013 at 3:06