[syseeprom] Add a new daemon to populate syseeprom info to state DB#25
[syseeprom] Add a new daemon to populate syseeprom info to state DB#25jleveque merged 16 commits intosonic-net:masterfrom keboliu:post-syseeprom-support
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. |
lguohan
left a comment
There was a problem hiding this comment.
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. |
|
@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.
@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.
jleveque
left a comment
There was a problem hiding this comment.
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]