ThingsJS icon indicating copy to clipboard operation
ThingsJS copied to clipboard

Scheduler: Incorrect view of the network for nodes that don't exit elegantly

Open marusshi opened this issue 7 years ago • 0 comments

Code Engine will report that it is dead over pubsub upon receiving a kill call, which Scheduler relies on to find available devices:

			if (engine.status !== 'dead'){
				var stat = engine.getStat();
				mapping[engine.id] = {
					available_memory: (stat.device_memory / 1000000),
					processes: {}
				};
			}

This is a problem if a Code Engine instance crashes or exits with Ctrl+C. Currently, these dead engines remain on the list of available devices for every new invoke period of Scheduler, but should be considered dead.

marusshi avatar Sep 18 '18 23:09 marusshi