Skip to content

Stray containers are not pruned #1614

Description

@rical

Current Behavior

Infix only removes containers it has configurational knowledge about. This means any containers created but not committed to startup configuration lingers on persistent storage.

Expected Behavior

Any containers not explicitly stated in the startup / running configuration shall be removed / pruned.

Steps To Reproduce

admin@test-05-25-f8:/> configure                                                                                                                                                          
admin@test-05-25-f8:/config/> set container foo
admin@test-05-25-f8:/config/> edit container foo
admin@test-05-25-f8:/config/container/foo/> set image oci-archive:/lib/oci/curios-httpd-latest.tar.gz
admin@test-05-25-f8:/config/container/foo/> diff
+containers {                                 
+  container foo {                            
+    image oci-archive:/lib/oci/curios-httpd-latest.tar.gz;
+  }                                          
+}                                            
admin@test-05-25-f8:/config/container/foo/> leave                                            
admin@test-05-25-f8:/> show container 
NAME       STATUS        NETWORK         MEMORY (KiB)  CPU%
foo        Up 2 seconds  -                         80  0.22

admin@test-05-25-f8:/> reboot

....

admin@test-05-25-f8:/config/> show container
admin@test-05-25-f8:/config/> 
admin@test-05-25-f8:/config/> exit
admin@test-05-25-f8:/> show container 
NAME       STATUS                      NETWORK         MEMORY (KiB)  CPU%
foo        Exited (143) 9 minutes ago  -                          -   0.0

Additional information

Pruning in podman solves this problem but gives a massive hit to boot performance as containers has to be unpacked from archive at every boot. The solution to this problem is likely to replace podman with something that can read containers directly from the image.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcn:styxCommon Name: Styx Project

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions