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

[Mellanox] update asic and module temperature in a thread #197

Closed
wants to merge 5 commits into from

Conversation

Junchao-Mellanox
Copy link
Owner

Why I did it

Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@Junchao-Mellanox Junchao-Mellanox changed the base branch from master to 201803 October 16, 2023 07:40
@Junchao-Mellanox Junchao-Mellanox changed the base branch from 201803 to master October 16, 2023 07:41
platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py Outdated Show resolved Hide resolved

def wait_all_sfp_ready(self):
logger.log_notice('Waiting for all SFP modules ready...')
max_wait_time = 60
Copy link
Owner Author

Choose a reason for hiding this comment

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

test if 60 second is enough?

def wait_all_sfp_ready(self):
logger.log_notice('Waiting for all SFP modules ready...')
max_wait_time = 60
ready_set = set()
Copy link
Owner Author

Choose a reason for hiding this comment

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

confirm with hw-mgmt if it is per cable control

self.set_thermal_data(0, 'crit', self.get_asic_temp_critical_threashold())
except Exception as e:
logger.log_error('Failed to update ASIC thermal data - {e}')
self.set_thermal_data(0, 'input', 'invalid')
Copy link
Owner Author

Choose a reason for hiding this comment

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

TBD: confirm with hw-mgmt

self._sfp_status[sfp.sdk_index] = presence
except Exception as e:
logger.log_error('Failed to update module {sfp.sdk_index} thermal data - {e}')
self.set_thermal_data(sfp.sdk_index + 1, 'input', 'invalid')
Copy link
Owner Author

Choose a reason for hiding this comment

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

TBD: confirm with hw-mgmt

temperature = super().get_temperature()
return temperature if temperature is not None else 0.0

def get_temperature_warning_threashold(self):
Copy link
Owner Author

Choose a reason for hiding this comment

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

TODO: retry reading threshold

@Junchao-Mellanox
Copy link
Owner Author

ci 3110 passed

Junchao-Mellanox pushed a commit that referenced this pull request Mar 18, 2024
…lly (sonic-net#18076)

#### Why I did it
src/sonic-gnmi
```
* d56712a - (HEAD -> master, origin/master, origin/HEAD) Update GNMI path schema (#197) (4 days ago) [ganglv]
* 758ec18 - Call flag.Parse() to parse global flags like -logtostderr (#198) (5 days ago) [Zain Budhwani]
* 736e3b4 - Add signal handler to stop gnmi server for when sigterm or sigquit is called (#189) (3 weeks ago) [Zain Budhwani]
* 5b59c57 - Fix sonic string in osversion/build (#190) (4 weeks ago) [Zain Budhwani]
* d8d15c7 - Enable unit tests and code coverage for telemetry.go (#186) (5 weeks ago) [Zain Budhwani]
```
#### How I did it
#### How to verify it
#### Description for the changelog
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.

2 participants