Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"TypeError: cannot unpack non-iterable NoneType object" #170

Open
sajith opened this issue Feb 6, 2024 · 0 comments
Open

"TypeError: cannot unpack non-iterable NoneType object" #170

sajith opened this issue Feb 6, 2024 · 0 comments
Assignees

Comments

@sajith
Copy link
Member

sajith commented Feb 6, 2024

This surfaced when testing SDX Controller. I think this happens when the static topologies are added in an unexpected order, perhaps? I'm not sure.

sdx-controller-sdx-controller-1  | INFO:sdx_pce.load_balancing.te_solver:Adding edge (9, 7) for request ConnectionRequest(source=9, destination=6, required_bandwidth=10, required_latency=300)                                                                                                                              
sdx-controller-sdx-controller-1  | INFO:sdx_pce.load_balancing.te_solver:Adding edge (7, 2) for request ConnectionRequest(source=9, destination=6, required_bandwidth=10, required_latency=300)                                                                                                                              
sdx-controller-sdx-controller-1  | INFO:sdx_pce.load_balancing.te_solver:Adding edge (2, 0) for request ConnectionRequest(source=9, destination=6, required_bandwidth=10, required_latency=300)                                                                                                                              
sdx-controller-sdx-controller-1  | INFO:sdx_pce.load_balancing.te_solver:Adding edge (0, 4) for request ConnectionRequest(source=9, destination=6, required_bandwidth=10, required_latency=300)                                                                                                                              
sdx-controller-sdx-controller-1  | INFO:sdx_pce.load_balancing.te_solver:Adding edge (4, 6) for request ConnectionRequest(source=9, destination=6, required_bandwidth=10, required_latency=300)                                                                                                                              
sdx-controller-sdx-controller-1  | INFO:sdx_pce.load_balancing.te_solver:solution_translator result: ConnectionSolution(connection_map={ConnectionRequest(source=9, destination=6, required_bandwidth=10, required_latency=300): [ConnectionPath(source=9, destination=7), ConnectionPath(source=7, destination=2), ConnectionPath(source=2, destination=0), ConnectionPath(source=0, destination=4), ConnectionPath(source=4, destination=6)]}, cost=5.0, request_id='test-connection-request')                                                                                                                                                           
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:domain: ConnectionRequest(source=9, destination=6, required_bandwidth=10, required_latency=300), links: [ConnectionPath(source=9, destination=7), ConnectionPath(source=7, destination=2), ConnectionPath(source=2, destination=0), ConnectionPath(source=0, destination=4), ConnectionPath(source=4, destination=6)]
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:count: 0, link: ConnectionPath(source=9, destination=7)
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:source node: {'id': 'urn:ogf:network:sdx:node:zaoxi:A1'}, destination node: {'id': 'urn:ogf:network:sdx:node:zaoxi:B1'}                                                                                                                                   
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:source domain: urn:ogf:network:sdx:topology:zaoxi.net, destination domain: urn:ogf:network:sdx:topology:zaoxi.net                                                                                                                                         
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:count: 1, link: ConnectionPath(source=7, destination=2)
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:source node: {'id': 'urn:ogf:network:sdx:node:zaoxi:B1'}, destination node: {'id': 'urn:ogf:network:sdx:node:sax:B3'}                                                                                                                                     
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:source domain: urn:ogf:network:sdx:topology:zaoxi.net, destination domain: urn:ogf:network:sdx:topology:sax.net                                                                                                                                           
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:count: 2, link: ConnectionPath(source=2, destination=0)
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:source node: {'id': 'urn:ogf:network:sdx:node:sax:B3'}, destination node: {'id': 'urn:ogf:network:sdx:node:sax:B1'}                                                                                                                                       
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:source domain: urn:ogf:network:sdx:topology:sax.net, destination domain: urn:ogf:network:sdx:topology:sax.net                                                                                                                                             
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:count: 3, link: ConnectionPath(source=0, destination=4)
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:source node: {'id': 'urn:ogf:network:sdx:node:sax:B1'}, destination node: {'id': 'urn:sdx:node:amlight.net:B1'}                                                                                                                                           
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:source domain: urn:ogf:network:sdx:topology:sax.net, destination domain: urn:ogf:network:sdx:topology:amlight.net                                                                                                                                         
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:count: 4, link: ConnectionPath(source=4, destination=6)
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:source node: {'id': 'urn:sdx:node:amlight.net:B1'}, destination node: {'id': 'urn:sdx:node:amlight.net:A1'}                                                                                                                                               
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:source domain: urn:ogf:network:sdx:topology:amlight.net, destination domain: urn:ogf:network:sdx:topology:amlight.net                                                                                                                                     
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:[intermediate] breakdown: {'urn:ogf:network:sdx:topology:zaoxi.net': [ConnectionPath(source=9, destination=7), ConnectionPath(source=7, destination=2)], 'urn:ogf:network:sdx:topology:sax.net': [ConnectionPath(source=2, destination=0), ConnectionPath(source=0, destination=4)], 'urn:ogf:network:sdx:topology:amlight.net': [ConnectionPath(source=4, destination=6)]}
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:Creating domain_breakdown: domain: urn:ogf:network:sdx:topology:zaoxi.net, links: [ConnectionPath(source=9, destination=7), ConnectionPath(source=7, destination=2)]                                                                                      
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:segment for urn:ogf:network:sdx:topology:zaoxi.net: {'ingress_port': {'id': 'urn:ogf:network:sdx:port:zaoxi:A1:1', 'label_range': ['100-200', '1000'], 'name': 'Novi100:1', 'node': 'urn:ogf:network:sdx:node:zaoxi:A1', 'short_name': 'A1:1', 'status': 'up'}, 'egress_port': {'id': 'urn:ogf:network:sdx:port:zaoxi:B1:1', 'name': 'Novi01:1', 'node': 'urn:ogf:network:sdx:node:zaoxi:B1', 'short_name': 'B1:1', 'label_range': ['100-200', '10001'], 'status': 'up'}}                                                                                                               
sdx-controller-sdx-controller-1  | INFO:sdx_pce.topology.temanager:Creating domain_breakdown: domain: urn:ogf:network:sdx:topology:sax.net, links: [ConnectionPath(source=2, destination=0), ConnectionPath(source=0, destination=4)]                                                                                        
sdx-controller-sdx-controller-1  | ERROR:sdx_controller:Exception on /SDX-Controller/1.0.0/connection [POST]
sdx-controller-sdx-controller-1  | Traceback (most recent call last):
sdx-controller-sdx-controller-1  |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2529, in wsgi_app
sdx-controller-sdx-controller-1  |     response = self.full_dispatch_request()
sdx-controller-sdx-controller-1  |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
sdx-controller-sdx-controller-1  |     rv = self.handle_user_exception(e)
sdx-controller-sdx-controller-1  |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
sdx-controller-sdx-controller-1  |     rv = self.dispatch_request()
sdx-controller-sdx-controller-1  |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
sdx-controller-sdx-controller-1  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
sdx-controller-sdx-controller-1  |   File "/usr/local/lib/python3.9/site-packages/connexion/decorators/decorator.py", line 68, in wrapper
sdx-controller-sdx-controller-1  |     response = function(request)
sdx-controller-sdx-controller-1  |   File "/usr/local/lib/python3.9/site-packages/connexion/decorators/uri_parsing.py", line 149, in wrapper
sdx-controller-sdx-controller-1  |     response = function(request)
sdx-controller-sdx-controller-1  |   File "/usr/local/lib/python3.9/site-packages/connexion/decorators/validation.py", line 196, in wrapper
sdx-controller-sdx-controller-1  |     response = function(request)
sdx-controller-sdx-controller-1  |   File "/usr/local/lib/python3.9/site-packages/connexion/decorators/parameter.py", line 120, in wrapper
sdx-controller-sdx-controller-1  |     return function(**kwargs)
sdx-controller-sdx-controller-1  |   File "/usr/src/app/sdx_controller/controllers/connection_controller.py", line 70, in place_connection
sdx-controller-sdx-controller-1  |     reason, code = connection_handler.place_connection(current_app.te_manager, body)
sdx-controller-sdx-controller-1  |   File "/usr/src/app/sdx_controller/handlers/connection_handler.py", line 123, in place_connection
sdx-controller-sdx-controller-1  |     breakdown = te_manager.generate_connection_breakdown(solution)
sdx-controller-sdx-controller-1  |   File "/usr/local/lib/python3.9/site-packages/sdx_pce/topology/temanager.py", line 425, in generate_connection_breakdown
sdx-controller-sdx-controller-1  |     egress_port, next_ingress_port = self._get_ports_by_link(links[-1])
sdx-controller-sdx-controller-1  | TypeError: cannot unpack non-iterable NoneType object
sdx-controller-sdx-controller-1  | INFO:     174.170.111.107:43394 - "POST /SDX-Controller/1.0.0/connection HTTP/1.1" 500 Internal Server Error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant