kytos-ng / flow_manager

Kytos NApp that manages OpenFlow 1.3 entries
https://kytos-ng.github.io/api/flow_manager.html
MIT License
0 stars 7 forks source link

KeyError: 'flow' when running Mininet #8

Closed ajoaoff closed 9 months ago

ajoaoff commented 3 years ago

Original issue opened by @hdiogenes at https://github.com/kytos/flow_manager/issues/103.

When upgrading from kytos 2020.2rc1 to 2020.2 with flow_manager 3.0 and running mininet, a KeyError: 'flow' is issued on the Kytos console. After that it says Flows loaded.

Steps to reproduce: upgrade an existing instance of Kytos, run kytosd -f and then run Mininet.

sudo mn --topo linear,3 --mac --controller=remote,ip=127.0.0.1 --switch ovsk,protocols=OpenFlow13

2020-12-30 17:11:01,817 - INFO [kytos.core.atcp_server] (MainThread) New connection from 127.0.0.1:35060
2020-12-30 17:11:01,820 - INFO [kytos.core.atcp_server] (MainThread) New connection from 127.0.0.1:35062
2020-12-30 17:11:01,821 - INFO [kytos.core.atcp_server] (MainThread) New connection from 127.0.0.1:35064
2020-12-30 17:11:02,399 - INFO [kytos.napps.kytos/of_core] (Thread-38) Connection ('127.0.0.1', 35060), Switch 00:00:00:00:00:00:00:01: OPENFLOW HANDSHAKE COMPLETE
2020-12-30 17:11:02,402 - INFO [kytos.napps.kytos/of_core] (Thread-40) Connection ('127.0.0.1', 35064), Switch 00:00:00:00:00:00:00:02: OPENFLOW HANDSHAKE COMPLETE
2020-12-30 17:11:02,409 - INFO [kytos.napps.kytos/of_core] (Thread-39) Connection ('127.0.0.1', 35062), Switch 00:00:00:00:00:00:00:03: OPENFLOW HANDSHAKE COMPLETE
Exception in thread Thread-45:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File kytos/core/helpers.py", line 70, in threaded_handler
    handler(*args)
  File "venv/ky/var/lib/kytos/napps/kytos/flow_manager/main.py", line 68, in resend_stored_flows
    flows_dict = {"flows": [flow['flow']]}
KeyError: 'flow'
kytos $> 2020-12-30 17:12:00,421 - INFO [kytos.napps.kytos/flow_manager] (flow_manager) Flows loaded.
viniarck commented 9 months ago

I'll go ahead and close this one. That version was really old and we've had database changes since then.