Skip to content

[action] [PR:839] [BMC] Initialize the admin_status according to Air or Liquid cooled devices#71

Merged
mssonicbld merged 1 commit into
Azure:202608from
mssonicbld:cherry/msft-202608/839
Jul 1, 2026
Merged

[action] [PR:839] [BMC] Initialize the admin_status according to Air or Liquid cooled devices#71
mssonicbld merged 1 commit into
Azure:202608from
mssonicbld:cherry/msft-202608/839

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator

Description

Initialize the admin_status according to Air or Liquid cooled devices

  • Additional change in this PR
    Fine tune the power_on_boot_delay for liquid cooled devices -- so that the delay is computed against system uptime (CLOCK_BOOTTIME), so a bmcctld restart mid-boot does not re-arm a fresh timer

Motivation and Context

Update the CHASSIS_MODULE table in CONFIG_DB and STATE_DB on bmcctld startup based on whether it is air cooled or liquid cooled devices

In case of Air cooled devices we startup the Switch-Host immediately, no delay
In case of Liquid cooled devices, we check if there is a power_on_delay configured before powering on the switch-host

Ideally in production systems we will get the chassis_db config viz. admin_status/powr_on_delay/shutdown_timeout from NDM. The default setting is useful in manufacturing test scenarios to bring up the switch-host soon on powering on.

Air cooled

$ sonic-db-cli CONFIG_DB hgetall "CHASSIS_MODULE|SWITCH-HOST"
{
    'admin_status': 'up',
    'power_on_delay': '0',
    'graceful_shutdown_timeout': '0'
}

$ sonic-db-cli STATE_DB hgetall "CHASSIS_MODULE_TABLE|SWITCH-HOST"
{
    'name': 'SWITCH-HOST',
    'desc': 'Switch Host Module',
    'serial': '<platform-reported>',
    'admin_status': 'up',
    'oper_status': 'ONLINE'
}

Liquid cooled

$ sonic-db-cli CONFIG_DB hgetall "CHASSIS_MODULE|SWITCH-HOST"
{
    'admin_status': 'down',
    'power_on_delay': '300',
    'graceful_shutdown_timeout': '0'
}

$ sonic-db-cli STATE_DB hgetall "CHASSIS_MODULE_TABLE|SWITCH-HOST"
{
    'name': 'SWITCH-HOST',
    'desc': 'Switch Host Module',
    'serial': '<platform-reported>',
    'admin_status': 'down',
    'oper_status': 'OFFLINE'
}

How Has This Been Tested?

Signed-off-by: Sonic Build Admin sonicbld@microsoft.com

Additional Information (Optional)

…evices

#### Description
Initialize the admin_status according to Air or Liquid cooled devices

* Additional change in this PR
Fine tune the power_on_boot_delay for liquid cooled devices -- so that the delay is computed against system uptime (`CLOCK_BOOTTIME`), so a `bmcctld` restart mid-boot does not re-arm a fresh timer

#### Motivation and Context
Update the CHASSIS_MODULE table in CONFIG_DB and STATE_DB on bmcctld startup based on whether it is air cooled or liquid cooled devices

In case of Air cooled devices we startup the Switch-Host immediately, no delay
In case of Liquid cooled devices, we check if there is a power_on_delay configured before powering on the switch-host

Ideally in production systems we will get the chassis_db config viz. admin_status/powr_on_delay/shutdown_timeout from NDM. The default setting is useful in manufacturing test scenarios to bring up the switch-host soon on powering on.

```
Air cooled

$ sonic-db-cli CONFIG_DB hgetall "CHASSIS_MODULE|SWITCH-HOST"
{
    'admin_status': 'up',
    'power_on_delay': '0',
    'graceful_shutdown_timeout': '0'
}

$ sonic-db-cli STATE_DB hgetall "CHASSIS_MODULE_TABLE|SWITCH-HOST"
{
    'name': 'SWITCH-HOST',
    'desc': 'Switch Host Module',
    'serial': '<platform-reported>',
    'admin_status': 'up',
    'oper_status': 'ONLINE'
}

Liquid cooled

$ sonic-db-cli CONFIG_DB hgetall "CHASSIS_MODULE|SWITCH-HOST"
{
    'admin_status': 'down',
    'power_on_delay': '300',
    'graceful_shutdown_timeout': '0'
}

$ sonic-db-cli STATE_DB hgetall "CHASSIS_MODULE_TABLE|SWITCH-HOST"
{
    'name': 'SWITCH-HOST',
    'desc': 'Switch Host Module',
    'serial': '<platform-reported>',
    'admin_status': 'down',
    'oper_status': 'OFFLINE'
}
```

#### How Has This Been Tested?
<!--
     Please describe in detail how you tested your changes.
     Include details of your testing environment, and the tests you ran to
     see how your change affects other areas of the code, etc.
-->

Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>

#### Additional Information (Optional)
@mssonicbld

Copy link
Copy Markdown
Collaborator Author

Original PR: sonic-net/sonic-platform-daemons#839

@mssonicbld

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@mssonicbld mssonicbld merged commit 7fa24b5 into Azure:202608 Jul 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant