Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to clear deleted containers? #49

Open
zhong-ys opened this issue Sep 24, 2024 · 4 comments
Open

How to clear deleted containers? #49

zhong-ys opened this issue Sep 24, 2024 · 4 comments

Comments

@zhong-ys
Copy link

I had some exited containers inside the Raspberry Pi. After installing this container plugin, they all showed up on the platform. I have deleted them from the hardware but they still exist on the platform.

I can see that there are retained mqtt messages in the thin-edge's broker. Is sending a blank message to each service topic the only way to delete them on the platform? Is there a smarter way to delete them or keep the container list up to date?

(Containers in the screenshot no longer exist)
Screenshot 2024-09-24 at 16 25 22

@reubenmiller
Copy link
Collaborator

Technically deleting the container's "should" be fairly easy, though it is probably more involved than desired (we want to add some more convenient way to do this in thin-edge.io), but the docs are here for now:

https://thin-edge.github.io/thin-edge.io/operate/registration/deregister/

However, I think we're reaching the limit of the container and container-group scripts (as they are written in posix shell)...it might be time that we start rewriting these elements using either Rust or golang (I would prefer golang in this case as it can re-use the official docker libs as they are also written in go).

@reubenmiller
Copy link
Collaborator

FYI: There is a proposal to introduce new api to help register and deregister components. thin-edge/thin-edge.io#2779

@zhong-ys
Copy link
Author

Thank you Reuben!

@reubenmiller
Copy link
Collaborator

There is some ongoing work which is looking at porting the monitoring part to a golang application which would support deleting services via thin-edge.io's Cumulocity local proxy.

The work is being done here, https://github.com/reubenmiller/tedge-container-monitor, but it might find its way back to this repo once the design is proven first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants