eclipse-iceoryx / iceoryx2

Eclipse iceoryx2™ - true zero-copy inter-process-communication in pure Rust
https://iceoryx.io
Apache License 2.0
930 stars 36 forks source link

Cleanup tool/internal service for resources of crashed applications #21

Open elfenpiff opened 10 months ago

elfenpiff commented 10 months ago

Brief feature description

When an application crashes, it can happen that a service is only partially removed and becomes unusable. An internal service and/or a command line application shall cleanup the remainders of such services.

The following use cases shall be considered:

elfenpiff commented 10 months ago

Previous discussions:

@elBoberido : Could this be done on the startup of the application?

@elfenpiff : Yes. The basic idea would be to implement a "function" that does it in a thread-safe manner and then either everyone can do this in a decentral fashion or one central daemon or command line tool does this.

This is then up to the deployment/user.

elfenpiff commented 2 weeks ago

cc @orecham This would be something for our cli tool iox2. Detect and cleanup stale resources from dead nodes or if the system is completely corrupted, remove anything which belongs to iceoryx2.

Also, we need to be able to support a different config in the iox2 tool, see https://github.com/eclipse-iceoryx/iceoryx2/tree/main/config - not now, but we should keep this in our Radar. The idea is, that a user may want to customize the config to create multiple iceoryx2 domains with different suffixes and prefixes and what not, and then it would be nice if the cli tool would support this.

There is already an example on how this could look like: https://github.com/eclipse-iceoryx/iceoryx2/tree/main/examples/rust/domains

elBoberido commented 2 weeks ago

@elfenpiff is there currently a way to find out which domains are in use?

elfenpiff commented 2 weeks ago

@elBoberido, nope. I think we will never be able to. The different domains have the goal to completely separate the iceoryx2 instances, if there would be somehow a domain registry, the domains would again be connected. But what can be done is, to provide a specific domain and take a look if there is somthing.

elBoberido commented 2 weeks ago

@elfenpiff I didn't meant to have a domain registry but more something like a pre-defined folder where each domain creates just a file with the domain id. A tool could then list all domains and also check if there are still active services in the domain. Not sure if it is really a good idea since one might not want that someone can figure out that a specific domain is used.