|
|
In some cases might happen that some component is not working or reporting errors.
|
|
|
In those cases it makes sense to activate DEBUG mode on those components and collect the logs.
|
|
|
|
|
|
|
|
|
## Activate DEBUG mode in components
|
|
|
|
|
|
Before deploying the TeraFlowSDN, in the [manifests](https://labs.etsi.org/rep/tfs/controller/-/tree/master/manifests) folder, modify the appropriate files for the microservices to be inspected, e.g. `contextservice.yaml`, `deviceservice.yaml`, `serviceservice.yaml`, `pathcompservice.yaml`, and `nbiservice.yaml`, by changing environment variable `LOG_LEVEL` to `DEBUG`.
|
|
|
|
|
|
```yaml
|
|
|
apiVersion: apps/v1
|
|
|
kind: Deployment
|
|
|
#...
|
|
|
spec:
|
|
|
# ...
|
|
|
template:
|
|
|
# ...
|
|
|
spec:
|
|
|
# ...
|
|
|
containers:
|
|
|
# ...
|
|
|
- name: server
|
|
|
# ...
|
|
|
env:
|
|
|
# ...
|
|
|
- name: LOG_LEVEL
|
|
|
value: "INFO" # change to "DEBUG"
|
|
|
# ...
|
|
|
```
|
|
|
|
|
|
## Redeploy TeraFlowSDN
|
|
|
|
|
|
Redeploy TeraFlowSDN as usual using the example `my_deploy.sh` specifications or whatever file you created with your deploy specs.
|
|
|
```bash
|
|
|
source my_deploy.sh
|
|
|
./deploy/all.sh
|
|
|
```
|
|
|
Wait for the deployment to finish.
|
|
|
|
|
|
## Use TeraFlowSDN
|
|
|
|
|
|
Do whatever actions you were testing and were missbehaving, such as onboarding a topology, creating a connectivity service, etc.
|
|
|
|
|
|
## Collect log files
|
|
|
|
|
|
A number of helper scripts, named as `show_logs_<component>.sh`, are provided to facilitate log collection in the [scripts](https://labs.etsi.org/rep/tfs/controller/-/tree/master/scripts) folder.
|
|
|
These scripts dump, by default, the logs on the screen, but can be redirected to files when needed.
|
|
|
|
|
|
In the following example, the logs of `context`, `device`, `service`, `pathcomp-frontend`, and `nbi` are stored in respective log files instead of the screen.
|
|
|
|
|
|
```bash
|
|
|
cd ~/tfs-ctrl
|
|
|
./scripts/show_logs_context.sh > context.log
|
|
|
./scripts/show_logs_device.sh > device.log
|
|
|
./scripts/show_logs_service.sh > service.log
|
|
|
./scripts/show_logs_pathcomp_frontend.sh > pathcomp_frontend.log
|
|
|
./scripts/show_logs_nbi.sh > nbi.log
|
|
|
```
|
|
|
|
|
|
The resulting logs will be stored in the root TeraFlowSDN folder. |