[action] [PR:839] [BMC] Initialize the admin_status according to Air or Liquid cooled devices#71
Merged
Conversation
…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)
Collaborator
Author
|
Original PR: sonic-net/sonic-platform-daemons#839 |
Collaborator
Author
|
/azp run |
|
No pipelines are associated with this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Initialize the admin_status according to Air or Liquid cooled devices
Fine tune the power_on_boot_delay for liquid cooled devices -- so that the delay is computed against system uptime (
CLOCK_BOOTTIME), so abmcctldrestart mid-boot does not re-arm a fresh timerMotivation 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.
How Has This Been Tested?
Signed-off-by: Sonic Build Admin sonicbld@microsoft.com
Additional Information (Optional)