Confirmed kytosd got terminated as expected with the existing sys.exit cases.
Confirmed no side effects when stopping kytosd in foreground normally with CTRL-D
Confirmed that the moved print(exc) printed out SystemExit content.
Here's the same exec with the reported issue:
2023-10-25 09:52:17,053 - INFO [kytos.core.api_server] [api_server.py:429:_start_endpoint] (MainThread) Started /api/amlight/sdntrace_cp/v1/trace - PUT
2023-10-25 09:52:17,053 - INFO [kytos.core.api_server] [api_server.py:429:_start_endpoint] (MainThread) Started /api/amlight/sdntrace_cp/v1/traces - PUT
2023-10-25 09:52:17,053 - INFO [kytos.core.controller] [controller.py:847:load_napps] (MainThread) Loading NApp amlight/noviflow
2023-10-25 09:52:17,056 - INFO [kytos.core.napps.base] [base.py:248:run] (noviflow) Running NApp: <Main(noviflow, started 140440724563648)>
2023-10-25 09:52:17,056 - INFO [kytos.core.controller] [controller.py:847:load_napps] (MainThread) Loading NApp kytos/mef_eline
2023-10-25 09:52:17,270 - INFO [apscheduler.scheduler] [base.py:171:start] (MainThread) Scheduler started
Kytos couldn't start because of KytosNAppSetupException: NApp kytos/mef_eline exception some err Traceback (most recent call last):
File "/home/viniarck/repos/kytos/kytos/core/controller.py", line 813, in load_napp
napp = napp_module.Main(controller=self)
File "/home/viniarck/repos/kytos/kytos/core/napps/base.py", line 194, in __init__
self.setup()
File "/home/viniarck/repos/napps/napps/kytos/mef_eline/main.py", line 66, in setup
raise ValueError("some err")
ValueError: some err
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/viniarck/repos/kytos/kytos/core/controller.py", line 262, in start
self.start_controller()
File "/home/viniarck/repos/kytos/kytos/core/controller.py", line 358, in start_controller
self.load_napps()
File "/home/viniarck/repos/kytos/kytos/core/controller.py", line 848, in load_napps
self.load_napp(napp.username, napp.name)
File "/home/viniarck/repos/kytos/kytos/core/controller.py", line 816, in load_napp
raise KytosNAppSetupException(msg) from exc
kytos.core.exceptions.KytosNAppSetupException: KytosNAppSetupException: NApp kytos/mef_eline exception some err
Shutting down Kytos...
[1] 28495 terminated kytosd -f --database mongodb -E
Closes #424
Summary
See updated changelog
Local Tests
kytosd
got terminated as expected with the existing sys.exit cases.kytosd
in foreground normally with CTRL-Dprint(exc)
printed outSystemExit
content.Here's the same exec with the reported issue:
End-to-End Tests