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

[System ready] Report ready status to Sysmonitor daemon #481

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fastiuk
Copy link

@fastiuk fastiuk commented Apr 28, 2024

depends-on: sonic-net/sonic-buildimage#18817

Description

This change implements pmon's ability to report it's readines to sysmonitor

Motivation and Context

The motivation is to report the readiness of all SFPs to sysmonitor and not just the startup of pmon

How Has This Been Tested?

  • Run NOS on the box
  • Make sure pmon reports good readiness state and you can see it in sysmonitor

Additional Information (Optional)

@prgeor
Copy link
Collaborator

prgeor commented Apr 30, 2024

@fastiuk please update the details in the PR:-

Description
Motivation and Context
How Has This Been Tested?
Additional Information (Optional)`
``

# If we were here and now retry_eeprom_set is empty, then we can state
# that all SFPs accessible
if not self.retry_eeprom_set:
notify_system_ready()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you correlate ready of syseeprom with pmon ready? There are many other initializations done in pmon like sfp, thermal etc. Shouldn't you set pmon status ready only after all these tasks are done?

@dgsudharsan I am not sure honestly. We had an internal requirement to declare ready status once all SFPs are accessible, so I did it exactly like that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keboliu @Junchao-Mellanox Can you please comment on this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree with @dgsudharsan , this is not the place to notify system ready. It is complicated to understand when SFP has been initialized. So I would prefer doing it simple.

My proposal:

  1. set system not ready at line
    self.log_error("Exiting main loop as child thread raised exception!")
    and line
    sys.exit(SFP_SYSTEM_ERROR)
  2. set system ready before line
    self.stop_event.wait()

sonic-xcvrd/xcvrd/xcvrd.py Outdated Show resolved Hide resolved
Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
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

Successfully merging this pull request may close these issues.

None yet

4 participants