eclipse-kanto / container-management

container-management
Other
6 stars 10 forks source link

Removed container is restored after reboot #195

Closed LudwigWeise closed 1 year ago

LudwigWeise commented 1 year ago

Please note: I'm not sure, if the below described issue is a bug or feature. Please check and reject the issue on your decision.

Precondition:

Test steps:

  1. list containers
  2. remove self-update-agent with option forced (-f) [command "kanto-cm remove -f -n self-update-agent"]
  3. list containers and image
  4. reboot
  5. list containers

Results:

Expectation:

stoyan-zoubev commented 1 year ago

@LudwigWeise How is your container created? Is it automatically created by the Kanto CM deployment service? If yes, and its container descriptor file remains in the deployment service directory, then it is expected that the container is recreated upon restart of the container management service. This is exactly the feature of the deployment service.

LudwigWeise commented 1 year ago

You are right. After removing the descriptor file, container is no longer restored after reboot (only the image seems to be restored somehow).

Please close this issue and sorry for bothering you with this issue!

stoyan-zoubev commented 1 year ago

Container image should not be restored by Kanto CM. Rather it is not deleted with the removal of the container instance. The removal of container images can be controlled by the container management image_expiry config property. By default, it's value is 744h (31 days). If you need that Kanto CM removes the container image too, please adjust the Kanto CM configuration. More info - https://eclipse.dev/kanto/docs/references/containers/container-manager-config/