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
3 stars 7 forks source link

Enabling new Napp while Kytos is running makes the endpoint not being accessible #469

Open italovalcy opened 5 months ago

italovalcy commented 5 months ago

If you enable a new Napp while kytos is running, the endpoints of the Napp wont be accessible. Even though you see on the logs that the Napp was enabled and its endpoints were loaded, you cannot submit requests:

# Kytos logs:
Apr 12 20:07:44 bcd69a5b0fea kytos.core.api_server:INFO api_server:429:  Started /api/talitarp/contention_block/v1/contention_block - POST

# Kytos napps list:

root@bcd69a5b0fea:/contention_block# kytos napps list
WARNING Config file /root/.kytosrc not found.
WARNING Creating a new empty config file.

Status |            NApp ID            |                                                                Description
=======+===============================+===========================================================================================================================================
 [ie]  | amlight/coloring:2023.1.0     | NApp to color a network topology
 [ie]  | amlight/kytos_stats:2023.1.0  | Show statistics about flows and tables.
 [ie]  | amlight/sdntrace:2023.1.0     | An OpenFlow Data Path Tracing
 [ie]  | amlight/sdntrace_cp:2023.1.0  | Run tracepaths on OpenFlow in the Control Plane
 [ie]  | kytos/flow_manager:2023.1.0   | Manage switches' flows through a REST API.
 [ie]  | kytos/maintenance:2023.1.0    | This NApp creates maintenance windows, allowing the maintenance of network devices (switch, link, and interface) without receiving alerts.
 [ie]  | kytos/mef_eline:2023.1.0      | NApp to provision circuits from user request
 [ie]  | kytos/of_core:2023.1.0        | OpenFlow Core of Kytos Controller, responsible for main OpenFlow operations.
 [ie]  | kytos/of_lldp:2023.1.0        | Discover network-to-network interfaces (NNIs) using the LLDP protocol.
 [ie]  | kytos/of_multi_table:2023.1.0 | This NApp implements Oplenflow multi tables
 [ie]  | kytos/pathfinder:2023.1.0     | Keeps track of topology changes, and calculates the best path between two points.
 [ie]  | kytos/topology:2023.1.0       | Manage the network topology.
 [ie]  | talitarp/contention_block:1.0 | Napp kytos for lock-type containment

Status: (i)nstalled, (e)nabled
root@bcd69a5b0fea:/contention_block# curl -X POST http://127.0.0.1:8181/api/talitarp/contention_block/v1/contention_block -d '{"xpto": 123}'
{"description":"Method Not Allowed","code":405}root@bcd69a5b0fea:/contention_block#

If you restart Kytos, then it starts working fine.