Skip to content

Conversation

@yuazhe
Copy link
Contributor

@yuazhe yuazhe commented Sep 26, 2025

Description

Motivation and Context

Following this HLD for liquid cooling sonic-net/SONiC#2032, I created this pr to check liquid cooling device status periodically

This pr is part of the HLD and it has dependency on sonic-net/sonic-platform-common#603

How Has This Been Tested?

Additional Information (Optional)

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

keboliu
keboliu previously approved these changes Oct 14, 2025
@keboliu
Copy link
Collaborator

keboliu commented Oct 22, 2025

@judyjoseph would you please help review this PR?

@yuazhe
Copy link
Contributor Author

yuazhe commented Nov 4, 2025

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 690 in repo sonic-net/sonic-platform-daemons

@yuazhe
Copy link
Contributor Author

yuazhe commented Nov 4, 2025

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

@judyjoseph please review comment feedback.
@yuazhe please follow up on checker failures so i can go a head and merge when pre conditions are met.


self.log_debug("End liquid cooling updating")

if self.task_stopping_event.is_set():
Copy link
Contributor

Choose a reason for hiding this comment

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

can we check if there is task_stopping_event.is_set() before calling update ?

Copy link
Contributor Author

@yuazhe yuazhe Nov 10, 2025

Choose a reason for hiding this comment

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

I don't understand, I check this flag in line 497, only it is not set, will the update be executed.

def _refresh_leak_status(self):
for index, sensor in enumerate(self.liquid_cooling.leakage_sensors, start = 1):
sensor_name = try_get(sensor.get_name, 'leakage{}'.format(index))
sensor_leak_status = sensor.is_leak()
Copy link
Contributor

Choose a reason for hiding this comment

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

How is the failure condition handled ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the is_leak will simply return the sensor object status, which is a string as an attribute of the sensor object, this operation can not failed, no exception can happen


assert liquid_cooling_updater._refresh_leak_status.call_count == 1


Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a few more tests to cover the failure and exception cases

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yuazhe
Copy link
Contributor Author

yuazhe commented Nov 13, 2025

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

6 participants