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 make sure system state are consistent When process restarting #35

Open
thomwin opened this issue Sep 18, 2017 · 1 comment
Open

Comments

@thomwin
Copy link

thomwin commented Sep 18, 2017

How to make sure system state are consistent When process restarting,for example mac address manager process crush and restart,user create a static mac address,and a dynamic mac address aging

@rmadsen
Copy link
Contributor

rmadsen commented Sep 18, 2017

From https://github.com/aristanetworks/EosSdk/wiki/Lifecycle-of-an-SDK-agent

Inside of the on_initialized callback, your agent should check any relevant pre-existing state in Sysdb, handle it appropriately, and then start watching for updates on any state it is interested in

That means, in your agent's on_initialized you should read the MAC addresses you care about from the mgr and handle that initial state. Afterwards your callbacks will fire if that state ever changes.

Does that help?

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