UniversalRobots / Universal_Robots_Client_Library

A C++ library for accessing the UR interfaces that facilitate the use of UR robotic manipulators by external applications.
Apache License 2.0
117 stars 86 forks source link

Wait after docker kill to prevent name conflicts #187

Closed RobertWilbrandt closed 10 months ago

RobertWilbrandt commented 10 months ago

While working on ros2 driver unit tests, i noticed sporadically failing tests with the error message

2: [INFO] [start_ursim-15]: process started with pid [88538]
2: [start_ursim-15] ursim_net already exists
2: [start_ursim-15] docker: Error response from daemon: Conflict. The container name "/ursim" is already in use by container "f3ac67680b8da8c476966ac9b3ee2a4193b273379fa584647663bf5eb478c590". You have to remove (or rename) that container to be able to reuse that name.
2: [start_ursim-15] See 'docker run --help'.
2: [ERROR] [start_ursim-15]: process has died [pid 88538, exit code 125, cmd '/home/wilbrandt/robot_folders/checkout/ur_rolling/colcon_ws/install/ur_client_library/lib/ur_client_library/start_ursim.sh -m  ur5e'].

I also found examples for this in our CI, e.g. https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/actions/runs/6464858675/job/17550136726

Using docker wait after docker kill seems to fix this for me.

codecov[bot] commented 10 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

see 3 files with indirect coverage changes

:loudspeaker: Thoughts on this report? Let us know!.