Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error handling for network/endpoint does not exist exception throwed by Kathara NP #183

Closed
3 tasks done
tcaiazzi opened this issue Sep 9, 2022 · 0 comments
Closed
3 tasks done
Assignees
Labels
intended behavior minor issue next release The feature will be added in the next release

Comments

@tcaiazzi
Copy link
Member

tcaiazzi commented Sep 9, 2022

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:

  1. Run a network scenario
  2. Reboot the host system
  3. After the reboot, run a device attached to a collision domain with the same name of ones in the network scenario run before.
  4. 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:

  • connect_to_link(machine: Machine, link: Link) -> None
  • start(machine: Machine) -> None
  • 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.

tcaiazzi added a commit that referenced this issue Sep 9, 2022
@tcaiazzi tcaiazzi added the next release The feature will be added in the next release label Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intended behavior minor issue next release The feature will be added in the next release
Projects
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants