kurtosis-tech / kurtosis

A platform for packaging and launching ephemeral backend stacks with a focus on approachability for the average developer.
https://docs.kurtosistech.com/
Apache License 2.0
341 stars 44 forks source link

kurtosis clean doesn't remove stopped containers #592

Open adschwartz opened 1 year ago

adschwartz commented 1 year ago

What's your CLI version?

0.76.3

Description & steps to reproduce

Looks like cleaning stopped containers isn't working:

kurtosiss-MacBook-Pro:novu-package ads$ kurtosis clean
INFO[2023-05-03T14:56:32-04:00] Cleaning old Kurtosis engine containers...   
INFO[2023-05-03T14:56:32-04:00] Successfully cleaned old Kurtosis engine containers 
INFO[2023-05-03T14:56:32-04:00] Cleaning enclaves...                         
INFO[2023-05-03T14:56:32-04:00] Successfully cleaned enclaves                
kurtosiss-MacBook-Pro:novu-package ads$ kurtosis enclave inspect novu 
Name:            novu
UUID:            f75d088f11a7
Status:          RUNNING
Creation Time:   Tue, 02 May 2023 13:48:30 EDT

========================================= Files Artifacts =========================================
UUID           Name
1bebbf8ff8e4   test

========================================== User Services ==========================================
UUID           Name          Ports                                              Status
bf91f7cfe07a   mongodb       mongodb: 27017/tcp -> mongodb://127.0.0.1:64707    RUNNING
94b8f2caa42d   nginx         http: 80/tcp -> http://127.0.0.1:57335             STOPPED
93245374e55f   nginx         http: 80/tcp -> http://127.0.0.1:57335             RUNNING
0782f0eb0498   nginx         http: 80/tcp -> http://127.0.0.1:57335             STOPPED
c2fa02e0ec2b   novu_api      novu_api_port: 3000/tcp -> http://127.0.0.1:3000   RUNNING
a946202f8545   novu_embed    novu_embed: 4701/tcp -> http://127.0.0.1:64768     RUNNING
a05763799427   novu_web      novu_web: 4200/tcp -> http://127.0.0.1:57327       STOPPED
9cd98ad3c08a   novu_web      novu_web: 4200/tcp -> http://127.0.0.1:57327       RUNNING
197aacefdb0d   novu_web      novu_web: 4200/tcp -> http://127.0.0.1:57327       STOPPED
42a6988a8814   novu_widget   novu_widget: 4500/tcp -> http://127.0.0.1:64758    RUNNING
600bed3cd3b9   novu_worker   <none>                                             RUNNING
aa221bbf5c72   novu_ws       novu_ws: 3002/tcp -> ws://127.0.0.1:3002           RUNNING
19927fb17f5c   redis         client: 6379/tcp -> 127.0.0.1:64699                RUNNING

Desired behavior

It should have cleaned out the stopped containers, but they remain.

What is the severity of this bug?

Papercut; this bug is frustrating, but I have a workaround.

adschwartz commented 1 year ago

@mieubrisse Is this actually expected behaviour? I.e. stopped containers are not removed unless the enclave is deleted completely? If so I guess it's working as intended, although this behaviour doesn't seem ideal to me. I'd rather have old stopped containers removed if I run clean.

adschwartz commented 1 year ago

Comment 2

mieubrisse commented 1 year ago

@adschwartz yep for now this is expected behaviour, else we lose the logs of those containers. @gbouv is working on a better logging solution, so that should help - we'd be able to just remove the containers directly

adschwartz commented 1 year ago

I think the confusion is just as much around the command: what does kurtosis clean do? the docs are not clear on this.