Closed johanstokking closed 2 years ago
@johanstokking I tried creating an end device in the Console, deleting it, then re-adding it with the identical info, and I encountered no issues. Does this mean this issue isn't relevant anymore?
I tried creating an end device in the Console, deleting it, then re-adding it with the identical info, and I encountered no issues.
That's because the console takes care of also deleting the device in the NS and AS at the same time as the IS iirc. This is still possible to do via the CLI or our API so I don't think this is already covered.
@nejraselimovic the end device delete and add with same identifiers works already indeed.
This issue is about deleting an application in the IS, and not having that deletion propagated to AS, NS and JS. These components then still hold unique identifiers (like DevEUI), that cannot be managed anymore because the application and its security context is gone from IS.
I'm reassigning this to @pgalic96 because he has been working on purging entities, which is a related topic.
Summary:
When an application is deleted from IS, the NS and AS registries should delete the application and associated devices.
Steps to Reproduce:
What do you see now?
Application gets deleted but devices stay there.
What do you want to see instead?
Devices be gone.
How do you propose to implement this?
An asynchronous garbage collection process in the NS and AS that deletes stale applications and its devices. This does not require an event stream, or even worse a connection, from IS to NS/AS, but rather have them be a client and check periodically if the applications are still there. This means that, as long as the garbage process has not run, unique device identifiers (i.e. JoinEUI, DevEUI) remain in the database, making it impossible to register a new device with the same identifiers.
Original issue: https://github.com/TheThingsIndustries/lorawan-stack/issues/740 by @johanstokking