openBackhaul / MicroWaveDeviceInventory

Physical and logical inventory of the MW SDN Domain
Apache License 2.0
5 stars 1 forks source link

Unable to find the updated device-list after realignment process #933

Closed Ziabatcha closed 4 months ago

Ziabatcha commented 4 months ago

It would be helpful when MWDI showing the updated device-list after re-alignment process. Also, if it is showing for deleted device list, new devices planning to add list in log, it would be better.

zaia-siae commented 4 months ago

We have the following proposal:

we can create two log files:

"before_realignment_file": current device list in use (before realignment)

"after_realignment_file": contains three kinds of information 1) new device list (calculated after comparison) 2) list of elements dropped 3) list of new elements added

Each time a rialignment occurs these files are overwritten The files are placed inside a folder named "/devicelist_log" Given the volatile nature of docker, both the files will be lost when the operator destroy the container.

We are waiting for a feedback before starting with the implementation

kmohr-soprasteria commented 4 months ago

Looks good to me. Maybe for debugging purposes we can also keep older versions of the file (configurable). Just like with logfiles like logfile.1, logfile.2 etc.; but that would depend on if this would be useful for TechM.

As for the files getting lost when the docker container is destroyed... if I remember correctly, it's possible to configure file locations outside the docker container, we the files could be written to. So we could go with that approach.

zaia-siae commented 4 months ago

We provided MWDI a new feature that each time the realignment event occurs creates a new log file named as:

date_time.log (for example: 2024.05.06_13.20.19.log)

The log file prints both the device list and the sliding window before and after the realignment event. In addition both the added and the dropped elements are listed.

All these files are saved to the "realignment_logs" external volume. The procedure checks for the volume before saving the log file. If the volume doesn't exist the procedure doesn't save any file.

Following the options to add to docker run command for mapping the volume that must be created with:

docker run --mount source=realignment_logs,target=/realignment_logs

The above command mounts the volume on the root of the container.

Ziabatcha commented 3 months ago

Tested okay with 1.1.2d. Re-aligment logs are collected in docker path /var/lib/docker/volumes/realignment_logs/_data

image realignment_logs.txt