raokrutarth / manufacturing-os

A POC distributed operating system for geo-seperated automotive manufacturing
Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

bootstrap_flow throws start_node = nodes[0].node_id IndexError: list index out of range #142

Closed chuanqichen closed 4 years ago

chuanqichen commented 4 years ago

` python main.py --num_types 5 --nodes_per_type 2 --failure_rate 0 --recover_rate 0 --update_dep_rate 4 | grep -e "death"

INFO 07:51:30 heartbeat-3 threads.py:106::send_message_for_dead_nodes | Node 3 informing leader of death InformLeaderOfDeathReq(from:3, to:6, dead_node:5) INFO 07:51:30 heartbeat-1 threads.py:106::send_message_for_dead_nodes | Node 1 informing leader of death InformLeaderOfDeathReq(from:1, to:6, dead_node:5) WARNING 07:51:30 subscriber-6 messages.py:512::on_inform_death_req | Received Death information request from 5 WARNING 07:51:30 subscriber-6 messages.py:512::on_inform_death_req | Received Death information request from 5 WARNING 07:51:30 subscriber-6 messages.py:512::on_inform_death_req | Received Death information request from 5 Exception in thread subscriber-6: Traceback (most recent call last): File "/Users/chuanqi/opt/anaconda3/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/Users/chuanqi/Projects/cs244b/manufacturing-os/src/threads.py", line 40, in run self.node_process.onMessage(message) File "/Users/chuanqi/Projects/cs244b/manufacturing-os/src/processes.py", line 148, in onMessage self.msg_handler.onMessage(message) File "/Users/chuanqi/Projects/cs244b/manufacturing-os/src/messages.py", line 397, in onMessage return self.callbacks[message.type]message.action File "/Users/chuanqi/Projects/cs244b/manufacturing-os/src/messages.py", line 511, in on_inform_death_req self.node_process.update_flow() File "/Users/chuanqi/Projects/cs244b/manufacturing-os/src/processes.py", line 217, in update_flow new_flow = ctr.bootstrap_flow_with_active_nodes(self.cluster().nodes, self.metrics, self.node_id) File "/Users/chuanqi/Projects/cs244b/manufacturing-os/src/cluster.py", line 276, in bootstrap_flow_with_active_nodes return bootstrap_flow(active_nodes, metrics, node_id) File "/Users/chuanqi/Projects/cs244b/manufacturing-os/src/cluster.py", line 244, in bootstrap_flow start_node = nodes[0].node_id IndexError: list index out of range `

chuanqichen commented 4 years ago

Not issues. It works. My bad, forget to turn off update_dep python main.py --num_types 5 --nodes_per_type 2 --failure_rate 0 --recover_rate 0 --update_dep_rate 0 | grep -e "death"