Skip to content

Resolve "Stop container if DMS is killed"

khaled yasser requested to merge 72-stop-container-if-dms-is-killed into develop

Description

  1. Watcher Mechanism:

    • Introduced a watcher mechanism that continuously monitors the heartbeat of the main DMS.
    • The watcher initiates cleanup if no heartbeat from the DMS is received for a specified timeout.
  2. Communication via Local Socket:

    • Established a local TCP socket communication on localhost:9898 between the main DMS and the watcher.
    • The main DMS sends heartbeat signals to the watcher through this socket.
  3. Container Cleanup:

    • Used the Docker SDK to interact with Docker and manage containers.
    • Containers with a specific naming convention (DMS_...) are targeted for cleanup.
    • When a cleanup is initiated, the watcher stops and removes the containers following the naming convention.

Checklist

  • I have update updated the @version string in main.go. See https://semver.org/
  • I have update CHANGELOG.md with a short description of changes.
  • I have run swag init to update the swagger docs.

Closes #72 Closes #71

Edited by khaled yasser

Merge request reports