KatharaFramework / Kathara

A lightweight container-based network emulation system.
https://www.kathara.org/
GNU General Public License v3.0
433 stars 64 forks source link

Add lab hash to Docker networks names #256

Closed tcaiazzi closed 8 months ago

tcaiazzi commented 9 months ago

Description: The current implementation of DockerLink in Kathará lacks the inclusion of the lab_hash in the names of Docker networks. This omission can lead to collision domains sharing the same name when multiple network scenarios, run by the same user, collide in the namespace.

https://github.com/KatharaFramework/Kathara/blob/aaa0b721cdc1e4ec44a09841e99448313e315e7b/src/Kathara/manager/docker/DockerLink.py#L355-L367

This not only contradicts the model where Link objects have a reference to their lab but also introduces potential issues, as observed in #253.

Proposed Solution: To resolve this issue and improve the consistency of network naming within the Kathará framework, we need to add the lab_hash in the name of Docker networks. Then, we need to add an option in the Kathará settings to allow users to share collision domains between the network scenarios (without adding the lab_hash), as we already have for sharing collision domains between users.