Closed italovalcy closed 2 months ago
I'm trying to reproduce this. I think it's because the previous connection was not placed correctly. @italovalcy What was the response for your create connection POST request?
I'm trying to reproduce this. I think it's because the previous connection was not placed correctly. @italovalcy What was the response for your create connection POST request?
The return from creating a connection from the sdx-controller was success, @congwang09 . I also confirmed by looking into the individual components (SDX-LC and OXPOs/Kytos). From the stack trace above it seems one attribute returned from MongoDB called ObjectId
is not JSON serializable. I can run new tests if needed.
Hi,
When getting a connection by ID, the 500 error is returned and logs include the following statement:
Not sure if I'm doing something wrong.
Steps to reproduce:
Apply some patches that are pending from review
curl -LO https://github.com/atlanticwave-sdx/sdx-continuous-development/pull/108.diff curl -LO https://github.com/atlanticwave-sdx/sdx-continuous-development/pull/109.diff patch -p1 < 108.diff patch -p1 < 109.diff cd data-plane/container-kytos-sdx-topology/ curl -LO https://github.com/atlanticwave-sdx/kytos-sdx-topology/pull/37.diff patch -p1 < 37.diff cd ../
build and run
cp template.env .env ./1_build_kytos.sh ./2_build_oxpos.sh ./3_build_local_controllers.sh ./4_build_mongo.sh cd container-sdx-controller docker build -t sdx-controller . cd .. docker compose up -d
wait until all OXPs and components finishes booting UP
Ampath, 3 switches (see container-mininet/link-hosts.py)
EXP_SW=3; while true; do N_SW=$(curl -s http://0.0.0.0:8181/api/kytos/topology/v3/switches | jq -r '.switches[].id' | wc -l); echo "waiting switches $N_SW / $EXP_SW"; if [ $N_SW -eq $EXP_SW ]; then break; fi; sleep 1; done
SAX, 2 switches (see container-mininet/link-hosts.py)
EXP_SW=2; while true; do N_SW=$(curl -s http://0.0.0.0:8282/api/kytos/topology/v3/switches | jq -r '.switches[].id' | wc -l); echo "waiting switches $N_SW / $EXP_SW"; if [ $N_SW -eq $EXP_SW ]; then break; fi; sleep 1; done
Tenet, 3 switches (see container-mininet/link-hosts.py)
EXP_SW=3; while true; do N_SW=$(curl -s http://0.0.0.0:8383/api/kytos/topology/v3/switches | jq -r '.switches[].id' | wc -l); echo "waiting switches $N_SW / $EXP_SW"; if [ $N_SW -eq $EXP_SW ]; then break; fi; sleep 1; done
configure OXPs
enable switches, ports and links. Furthermore, configure some metadata that will be needed for SDX
./container-kytos-sdx-topology/curl/2.enable_all.sh
this step is needed so that the kytos-sdx-topology Napp starts sending the topology for SDX-LC
./container-kytos-sdx-topology/curl/0a.version_control.sh ./container-kytos-sdx-topology/curl/0b.version_control.sh ./container-kytos-sdx-topology/curl/0c.version_control.sh
check if the topology is correctly identified by SDX-Controller:
curl -s http://0.0.0.0:8080/SDX-Controller/1.0.0/topology | jq -r '.nodes[] | (.ports[] | .id)' curl -s http://0.0.0.0:8080/SDX-Controller/1.0.0/topology | jq -r '.links[] | .id + " " + .ports[0].id + " " + .ports[1].id'
curl -X POST http://0.0.0.0:8080/SDX-Controller/1.0.0/connection -H 'Content-Type: application/json' -d '{"id": "3", "name": "Test connection request 22", "start_time": "2000-01-23T04:56:07.000Z", "end_time": "2000-01-23T04:56:07.000Z", "bandwidth_required": 10, "latency_required": 300, "egress_port": {"id": "urn:sdx:port:tenet.ac.za:Tenet03:50", "name": "Tenet03:50", "node": "urn:sdx:port:tenet.ac.za:Tenet03", "status": "up"}, "ingress_port": {"id": "urn:sdx:port:ampath.net:Ampath3:50", "name": "Ampath3:50", "node": "urn:sdx:port:ampath.net:Ampath3", "status": "up"}}'
$ curl http://0.0.0.0:8080/SDX-Controller/1.0.0/connection/3 { "detail": "The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.", "status": 500, "title": "Internal Server Error", "type": "about:blank" }