kytos-ng / kytos

Kytos SDN Platform. Kytos is designed to be easy to install, use, develop and share Network Apps (NApps).
https://kytos-ng.github.io/
MIT License
2 stars 7 forks source link

Export error from the routine "primary_path.choose_vlans" to the kytos.log #474

Open RenataFrez opened 1 month ago

RenataFrez commented 1 month ago

While redeploying some EVCs, the kytos.log was populated with the error No available path was found. This led the operation team to check the whole environment to confirm that the path was up.

Using the Kytos console, we executed the routine to choose the primary path for these EVCs, and the error returned was KytosNoTagAvailableError: Link 3e7d3a447f6034a6b10a69e5a7f2b7a85edddc58f896c7a3d003a873c77383bf has no vlan available.

Please consider exporting the error from the routine "primary_path.choose_vlans" to the log. This will help narrow down some issues during the operation.

kytos $> mef_eline.circuits['3d8cd150c7bb41'].primary_path.choose_vlans()
---------------------------------------------------------------------------
KytosNoTagAvailableError                  Traceback (most recent call last)
File <ipython-input-98-58249dcbbec4>:1, in <cell line: 1>()
----> 1 mef_eline.circuits['3d8cd150c7bb41'].primary_path.choose_vlans()

File //var/lib/kytos/napps/../napps/kytos/mef_eline/models/path.py:38, in Path.choose_vlans(self)
     36 """Choose the VLANs to be used for the circuit."""
     37 for link in self:
---> 38     tag = link.get_next_available_tag()
     39     link.add_metadata("s_vlan", tag)

File /usr/local/lib/python3.9/dist-packages/kytos/core/link.py:148, in Link.get_next_available_tag(self)
    145     # Tag used successfully by both endpoints. Returning.
    146     return tag
--> 148 raise KytosNoTagAvailableError(self)

KytosNoTagAvailableError: Link 3e7d3a447f6034a6b10a69e5a7f2b7a85edddc58f896c7a3d003a873c77383bf has no vlan available.