-
Notifications
You must be signed in to change notification settings - Fork 163
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
[syseeprom] Add a new daemon to populate syseeprom info to state DB #25
Conversation
merge from Azure master
is this eeprom information in state db? the state db is clearly after sonic config load or swss restart. we need to deal with such situation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to deal with state clear due to config reload or swss restart.
@lguohan added '-w' and '-c' options to the scripts to handle write DB and clear DB functions respectively. |
This reverts commit 674b981.
it does not address my comments : "need to deal with state clear due to config reload or swss restart." |
@lguohan can we consider having an EEPROM daemon? |
@lguohan could you please approve this or raise your comments? We should get it merged as part of Pmon enhancement work. |
@lguohan, as I mentioned in the description there will be a followd PR against sonic-buildimage which will include the code to call this utility to post info to DB during pmon start and clear DB when pmon stopped. I was planning to create it after this one merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As comments
@lguohan I have addressed new comments with Qi and Joe, would you please approve if it's OK to you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keboliu: The event listener does not take care of the situation Guohan was concerned about. I think you misunderstood his comment. We are not concerned with clearing the syseeprom data from the DB when PMON exits; syseeprom data is static and should not change. However, the concern Guohan raised was that the STATE_DB could get cleared by other services (config reload, swss restart, etc.). We need a way to recognize the STATE_DB was cleared and repopulate the syseeprom info into the DB.
The SwSS restart scenario shouldn't be a problem because we have configured the PMon service as a dependent of SwSS via systemd. Thus, if SwSS gets restarted, so too should PMon get restarted. However, we still need a way to get notified that the STATE_DB was cleared so we can repopulate the info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple more small requests.
@lguohan: Please review the latest changes. |
@keboliu: A couple comments:
|
updated in another PR.
the current decode-syseeprom logic is implemented as you mentioned, when it failed to get data from DB, it will fall back on access the hardware. So we are ok here. |
syseeprom: Add a new daemon to populate the syseeprom info to state DB
There will be a followed PR to add make files and modify start.sh after this one merged.
Signed-off-by: Kebo Liu [email protected]