Kathara
Kathara copied to clipboard
Better error handling for `network/endpoint does not exist` exception throwed by Kathara NP
Describe the bug If you reboot the host system while a network scenario is running, after the reboot you get an error from the network plugin when you try to run a device attached to a collision domain that has the same name of ones used in the network scenario deployed before the reboot.
To Reproduce Steps to reproduce the behavior:
- Run a network scenario
- Reboot the host system
- After the reboot, run a device attached to a collision domain with the same name of ones in the network scenario run before.
- Get the
network does not exist
exception from the network plugin.
Expected behavior
We need to improve the error handling adding a custom exception that clearly explains the error, which can be solved using the wipe
command.
To Do
We need to improve error handling in the DockerMachine
class in the following methods:
- [x] connect_to_link(machine: Machine, link: Link) -> None
- [x] start(machine: Machine) -> None
- [x] Add relative unit tests
We will throw the DockerPluginError("Kathara has been left in an inconsistent state! Please run 'kathara wipe'.")
instead of the APIError exception.