prona-p4-learning-platform / learn-sdn-hub

12 stars 6 forks source link

Expired containers not pruning correctly #183

Closed S-Schickentanz closed 4 months ago

S-Schickentanz commented 5 months ago

Backend will mention that an expired container needs to be pruned, but will not prune it currently.

Tomtec331 commented 5 months ago

Deleting containers is currently disabled:

https://github.com/prona-p4-learning-platform/learn-sdn-hub/blob/0d56b80830a7906b7866f56f2c4d13d5acbc00d7/backend/src/providers/DockerProvider.ts#L347-L354

Introduced via 124489b

srieger1 commented 4 months ago

https://github.com/prona-p4-learning-platform/learn-sdn-hub/commit/124489b77285904ce599e2a76480a9242c480876 introduced a fix for instance pruning for Firecracker and Docker provider. The deletion was done twice, https://github.com/prona-p4-learning-platform/learn-sdn-hub/blob/0d56b80830a7906b7866f56f2c4d13d5acbc00d7/backend/src/providers/DockerProvider.ts#L355 does the deletion.

I just double checked it and Docker containers are pruned correctly using 91-merge tree. I'll remove the code fragment that was commented out during the fix of the double deletion.

@S-Schickentanz can you maybe reduce the instance lifetime and send a log output to see what goes wrong in your case during the pruning?

S-Schickentanz commented 4 months ago

After further work on this branch, the problem did not reoccur. Even after setting the instance lifetime and pruning scheduler to a shorter time, it now seems to work perfectly and I can't reproduce the issue. I'll keep an eye on the situation and update this issue if the error occurs again.

srieger1 commented 4 months ago

Thanks. Same here. Will wait a couple of days and then possibly close the issue.