gregtampa / coreemu

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

update session state transitions from distributed servers #151

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The RUNTIME and SHUTDOWN states should not be entered by the master session 
until the slave sessions on distributed emulation servers have entered those 
states. Instead of keeping node counts, we can just wait for the slave server 
to keep track of its nodes and enter the state.

Currently, RUNTIME is reached by snooping node STR messages, the ones that 
cause the red square node highlight to turn green. SHUTDOWN is currently 
declared possibly before all of the slaves have been shutdown.

Once SHUTDOWN is reached, the Broker.recvloop() should be terminated.

Original issue reported on code.google.com by ahrenh...@gmail.com on 23 Jul 2012 at 10:12

GoogleCodeExporter commented 9 years ago
related workaround in r729:
don't disconnect to create a new session number when running distributed

a new session number will not be created when you press "stop" on a distributed
session

-------------------
the correct behavior would be for each server to declare "shutdown" when the 
nodes it is responsible for are shutdown; then the master session can declare 
"shutdown" for the whole thing, and tell the GUI; the GUI can then disconnect 
to allocate a new session number

Original comment by ahrenh...@gmail.com on 20 Mar 2013 at 4:18

GoogleCodeExporter commented 9 years ago
Tested in r538 (Boeing r1855) and daemons still operate independently.

Sample log messages from slave server:

SESSION 51932 STATE 4: RUNTIME at Mon Jul 28 08:07:10 2014
SESSION 51932 STATE 5: DATACOLLECT at Mon Jul 28 08:09:36 2014
SESSION 51932 STATE 6: SHUTDOWN at Mon Jul 28 08:09:38 2014
SESSION 51932 STATE 6: SHUTDOWN at Mon Jul 28 08:09:38 2014
IOError: error receiving header ([Errno 104] Connection reset by peer)
connection closed: 10.250.0.91:51932

Master server is disconnecting after declaring the SHUDOWN state for itself:

Checking for runtime with 10 of 10 session nodes
SESSION 38786 STATE 4: RUNTIME at Mon Jul 28 08:07:20 2014
SESSION 38786 STATE 5: DATACOLLECT at Mon Jul 28 08:09:46 2014
SESSION 38786 STATE 6: SHUTDOWN at Mon Jul 28 08:09:47 2014
connection with hp2 @ 10.250.0.92:4038 has closed
connection closed: 127.0.0.1:38786

Original comment by ahrenh...@gmail.com on 28 Jul 2014 at 3:13