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

Error when handling new switch event and using vlan_pool #137

Closed
italovalcy opened this issue Jun 15, 2023 · 2 comments
Closed

Error when handling new switch event and using vlan_pool #137

italovalcy opened this issue Jun 15, 2023 · 2 comments
Assignees
Labels
2023.2 Kytos-ng 2023.2 bug Something isn't working priority_major Major priority

Comments

@italovalcy
Copy link

Hi,

Using vlan_pool config gives the following error:

Jun 15 17:58:22 be420d5eb226 kytos.core.controller:INFO controller:713:  Loading vlan_pool configuration for dpid 00:00:00:00:00:00:00:03
Jun 15 17:58:22 be420d5eb226 kytos.napps.kytos/of_core:INFO main:158:  Connection ('127.0.0.1', 48418), Switch 00:00:00:00:00:00:00:03: OPENFLOW HANDSHAKE COMPLETE
Jun 15 17:58:22 be420d5eb226 kytos.core.interface:WARNING interface:340:  Couldn't get port 2 speed, sw 00:...:03, feats None
Jun 15 17:58:22 be420d5eb226 kytos.core.helpers:ERROR helpers:143:  listen_to handler: <function Main.on_new_switch at 0x7f73445a1a60>, args: (<Main(topology, stopped 140129943414528)>, KytosEvent('kytos/core.switch.new', {'switch': Switch('00:00:00:00:00:00:00:03')}, 0)) traceback: Traceback (most recent call last):,   File "/usr/local/lib/python3.9/dist-packages/kytos/core/helpers.py", line 139, in handler_context,     result = handler(*args),   File "//var/lib/kytos/napps/kytos/topology/main.py", line 662, in on_new_switch,     self.handle_new_switch(event),   File "//var/lib/kytos/napps/kytos/topology/main.py", line 668, in handle_new_switch,     self.topo_controller.upsert_switch(switch.id, switch.as_dict()),   File "/usr/local/lib/python3.9/dist-packages/tenacity/__init__.py", line 324, in wrapped_f,     return self(f, *args, **kw),   File "/usr/local/lib/python3.9/dist-packages/tenacity/__init__.py", line 404, in __call__,     do = self.iter(retry_state=retry_state),   File "/usr/local/lib/python3.9/dist-packages/tenacity/__init__.py", line 349, in iter,     return fut.result(),   File "/usr/lib/python3.9/concurrent/futures/_base.py", line 433, in result,     return self.__get_result(),   File "/usr/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result,     raise self._exception,   File "/usr/local/lib/python3.9/dist-packages/tenacity/__init__.py", line 407, in __call__,     result = fn(*args, **kwargs),   File "/usr/local/lib/python3.9/dist-packages/kytos/core/retry.py", line 25, in decorated,     return func(*args, **kwargs),   File "//var/lib/kytos/napps/../napps/kytos/topology/controllers/__init__.py", line 111, in upsert_switch,     model = SwitchDoc(,   File "pydantic/main.py", line 331, in pydantic.main.BaseModel.__init__, pydantic.error_wrappers.ValidationError: 2 validation errors for SwitchDoc, interfaces -> 0 -> mac,   none is not an allowed value (type=type_error.none.not_allowed), interfaces -> 0 -> speed,   none is not an allowed value (type=type_error.none.not_allowed),

Steps to reproduce:

  1. Create a simple topology in MN (using linear,3 here)
  2. Config Kytos's vlan_pool for a certain link:
# grep vlan_pool /etc/kytos/kytos.conf
# vlan_pool = {}
vlan_pool = {"00:00:00:00:00:00:00:02": {"3": [[100, 200]]}, "00:00:00:00:00:00:00:03": {"2":[[100, 200]]}}
  1. Start kytos and monitor logs (/var/log/syslog or console)
@italovalcy italovalcy added bug Something isn't working 2023.2 Kytos-ng 2023.2 labels Jun 15, 2023
@viniarck viniarck added the priority_major Major priority label Jun 19, 2023
@viniarck
Copy link
Member

@Alopalao once your related PRs land, let's close this one here and also point out how tag_ranges can be set, probably pointing a e2e test for a ref.

@viniarck
Copy link
Member

Landed on #166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2023.2 Kytos-ng 2023.2 bug Something isn't working priority_major Major priority
Projects
None yet
Development

No branches or pull requests

3 participants