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] Fix issue: should not initialize led color in __init__ funcation as platform API will be called by multiple daemons #64

Closed
wants to merge 1 commit into from

Conversation

Junchao-Mellanox
Copy link
Owner

Why I did it

The existing Fan led and Psu led object initialize itself to green color in init method. However, there are multiple daemons calls sonic platform API and there could be a case that:

  1. A PSU is removed from system
  2. Reboot switch
  3. psud detects that 1 PSU is missing and set PSU led to red
  4. other daemon just start up and call sonic platform API, the API set PSU led to green by call PsuLed.init

This PR is a partial fix for the issue. As we also need guarantee that the led is initialized with a correct value. I checked existing psud and thermalctld code. psud always initialize the PSU led color on boot up, thermalcltd need some changes to initialize led color on the first run

How I did it

Remove the led color initialization code from FanLed.init and PsuLed.init

How to verify it

Manual test

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

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

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

@Junchao-Mellanox Junchao-Mellanox changed the title [Mellanox] Fix issue: should not initialize led color in __init__ file as platform API will be called by multiple daemons [Mellanox] Fix issue: should not initialize led color in __init__ funcation as platform API will be called by multiple daemons Mar 18, 2021
Junchao-Mellanox pushed a commit that referenced this pull request May 11, 2022
[master][sonic-linkmgrd] submodule updates

df51322 Longxiang Lyu   Fri May 6 10:01:46 2022 +0800   Add `ActiveActiveStateMachine` implementation (#64)
e721ceb Jing Zhang      Wed May 4 10:07:14 2022 -0700   Add doc for default route related changes  (#63)
7bb06fb Jing Zhang      Tue May 3 09:48:28 2022 -0700   Add Cli support to enable or disable default route related feature (#68)
e4b02cb Jing Zhang      Mon May 2 13:27:54 2022 -0700   Reset WaitActiveUp count before switching to active (#70)
212d960 Jing Zhang      Wed Apr 27 10:35:05 2022 -0700  lower log level to warning (#69)
48abc9e Jing Zhang      Thu Apr 14 16:50:04 2022 -0700  Add support to enable switchover time measurement (with link prober interval decreased to 10ms) feature  (#61)
c4858a6 Jing Zhang      Thu Apr 14 11:27:55 2022 -0700  Avoid proactively switching to `active` if default route is missing  (#62)

sign-off: Jing Zhang zhangjing@microsoft.com
Junchao-Mellanox pushed a commit that referenced this pull request Nov 22, 2022
Update sonic-mgmt-common submodule pointer to include the following:

68e0341 Remove LOGLEVEL DB since is no longer used (#64)

Signed-off-by: dprital <drorp@nvidia.com>
Junchao-Mellanox pushed a commit that referenced this pull request Dec 9, 2022
Incorporates following commits:

43a9179 Zain Budhwani Mon Dec 5 13:44:16 2022 -0800 Call evtc_stop after error (#64)
5712679 pettershao-ragilenetworks Fri Dec 2 11:04:08 2022 +0800 Fix the cfg variable configuration bug. (#65)
Junchao-Mellanox pushed a commit that referenced this pull request Jan 29, 2023
Update sonic-mgmt-common submodule pointer to include the following:

68e0341 Remove LOGLEVEL DB since is no longer used (#64)

Signed-off-by: dprital <drorp@nvidia.com>
@Junchao-Mellanox Junchao-Mellanox deleted the fix-fan-psu-led branch June 12, 2023 04:38
Junchao-Mellanox pushed a commit that referenced this pull request Jul 14, 2023
…utomatically (sonic-net#15417)

#### Why I did it
src/sonic-host-services
```
* cdc621b - (HEAD -> 202211, origin/202211) [202211][config reload] Config Reload Enhancement (#64) (2 days ago) [Sudharsan Dhamal Gopalarathnam]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Junchao-Mellanox pushed a commit that referenced this pull request Dec 7, 2023
…ically (sonic-net#17418)

#### Why I did it
src/sonic-dbsyncd
```
* 68baf40 - (HEAD -> 202305, origin/202305) [lldp-syncd] Fix unexpected exception in snmp-subagent (#64) (18 hours ago) [Zhaohui Sun]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Junchao-Mellanox pushed a commit that referenced this pull request Sep 25, 2024
…ically (sonic-net#19769)

#### Why I did it
src/sonic-dbsyncd
```
* 5956f0b - (HEAD -> 202311, origin/202311) Handle exception to avoid lldp_syncd crash (#65) (60 minutes ago) [Zhaohui Sun]
* d89a00d - [lldp-syncd] Fix unexpected exception in snmp-subagent (#64) (10 hours ago) [Zhaohui Sun]
```
#### 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