CubeCoders / AMP

Issue tracking and documentation for AMP
https://cubecoders.com/AMP
207 stars 38 forks source link

AMP doesn't stop instances/applications properly #1019

Open BroOtti opened 7 months ago

BroOtti commented 7 months ago

Bug Report

System Information

┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Key                  ┃ Value                                 ┃
┣━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃ Operating System     ┃ Linux - Debian GNU/Linux 12 on x86_64 ┃
┃ Product              ┃ AMP 'Callisto' v2.5.0.4 (Mainline)    ┃
┃ Virtualization       ┃ ProxmoxLXC                            ┃
┃ Application          ┃ Application Deployment                ┃
┃ Module               ┃ ADSModule                             ┃
┃ Running in Container ┃ No                                    ┃
┃ Current State        ┃ Indeterminate                         ┃
┗━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

I confirm:

Symptoms

Trying to stop an instance through ampinstmgr stop or all instances through ampinstmgr -o doesn't work as expected. It just hangs after the first instance, killing only the first instance. (Only happens for instances running in docker) Example:

  CubeCoders AMP  💻amp@amp  📁~  ampinstmgr stop Minecraft
[Info] AMP Instance Manager v2.5.0.4 built 03/04/2024 18:20
[Info] Stream: Mainline / Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] Stopping Instance: 'Minecraft01'
[Info] Stopping instance Minecraft01...
AMP_Minecraft01
[Info] Error response from daemon: cannot kill container: AMP_Minecraft01: No such container: AMP_Minecraft01

I need to CTRL+C to end ampinstmgr. What happens, the container gets killed without a proper shutdown of the application. There is no shutdown visible in the minecraft logs. I expect the application to shutdown properly on instance shutdown to prevent data loss. That happens unrelated to docker.

Reproduction

  1. Create multiple instances with docker enabled. (In my test case, I chose a minecraft instance)
  2. Manage the instances, update and start them.
  3. Try stopping the instances through ampinstmgr -o
  4. Notice only one instance gets killed and the other keep running.
  5. Check the application log if it was stopped properly. (In my test case with minecraft, the server was just killed and not stopped properly)
BroOtti commented 7 months ago

First posted on discord: https://ptb.discord.com/channels/266012086423912458/1225357651848724531 Currently, no extra info at discord. I will keep it here.

Nazgile94 commented 7 months ago

+1 for this

Error response from daemon: cannot kill container

used ampinstmgr upgradeall

K1ller0561 commented 6 months ago

I can confirm this issue, same for me.