Skip to content

sonic-host-services changes for OC platform components SWComp - #413

Open
niranjanivivek wants to merge 1 commit into
sonic-net:masterfrom
niranjanivivek:pr_ocpfm_swcomp
Open

niranjanivivek wants to merge 1 commit into
sonic-net:masterfrom
niranjanivivek:pr_ocpfm_swcomp

Conversation

@niranjanivivek

@niranjanivivek niranjanivivek commented Jul 23, 2026

Copy link
Copy Markdown

The changes are made for OpenConfig platform components - Software Components Model

Code changes in sonic-mgmt-common - PR#230

Below table describes the openconfig paths for software components supported and the corresponding redis DB paths

OpenConfig Path Supported Redis DB Parameters updated in DB
/components/component[name=<bootloader>]/software-module/state STATE_DB SW_COMP_INFO|boot_loader
/components/component[name=<primary-network-stack>]/software-module/state STATE_DB SW_COMP_INFO|network_stack0
/components/component[name=<os>]/state/ STATE_DB SW_COMP_INFO|os0

The table below describes the placeholder in this script for other openconfig paths and the corresponding redis DB paths. The translib support can be added based on requirement.

OpenConfig Path Supported Redis DB Parameters updated in DB
/components/component[name=<chassis>]/chassis/state STATE_DB CHASSIS_INFO|chassis
/system/logging/remote-servers/remote-server[host=<syslog-ip-address>]/state/host STATE_DB SYSLOG_SERVER|<ipaddress>
/system/config/hostname CONFIG_DB DEVICE_METADATA|localhost
/system/state/hostname STATE_DB HOST_STATS|HOSTNAME

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown

Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@niranjanivivek

Copy link
Copy Markdown
Author

@ndas7 @rlucus Please review

@niranjanivivek

Copy link
Copy Markdown
Author

@kishanps Please review the PR.

@niranjanivivek
niranjanivivek marked this pull request as ready for review August 25, 2026 06:51
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@niranjanivivek

Copy link
Copy Markdown
Author

@kishanps Please review the PR.

@niranjanivivek

Copy link
Copy Markdown
Author

@ndas7 @rlucus Please review

@niranjanivivek

Copy link
Copy Markdown
Author

@kishanps Please review and approve

Comment thread scripts/pins_platform_init.py Outdated
Comment thread scripts/pins_platform_init.py Outdated
Comment thread scripts/pins_platform_init.py Outdated
Comment thread scripts/pins_platform_init.py Outdated
Comment thread tests/pins_platform_init_test.py Outdated
Comment thread tests/pins_platform_init_test.py Outdated
Comment thread tests/pins_platform_init_test.py Outdated
Comment thread scripts/pins_platform_init.py Outdated
Comment thread scripts/pins_platform_init.py Outdated
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

…re componenents model

Signed-off-by: Niranjani Vivek <niranjaniv@google.com>
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@niranjanivivek

Copy link
Copy Markdown
Author

@kishanps Please review and confirm the changes

@kishanps

Copy link
Copy Markdown

@niranjanivivek Can you update the description with a table of the openconfig paths for which the support is being added and what are the corresponding redis db paths and a short description of that path. For eg,
/components/network-stack/SW0 - AppStateDb:/network-stack/sw0/ - Indicates the active version of the network stack

Comment thread scripts/switch_platform_init.py
@niranjanivivek

Copy link
Copy Markdown
Author

@niranjanivivek Can you update the description with a table of the openconfig paths for which the support is being added and what are the corresponding redis db paths and a short description of that path. For eg, /components/network-stack/SW0 - AppStateDb:/network-stack/sw0/ - Indicates the active version of the network stack

The description is now added.

@kishanps

Copy link
Copy Markdown

@niranjanivivek Can you check whether these 2 fields are already present in upstream (without your changes) and if your changes would overwrite the current values?

CONFIG DB - DEVICE_METADATA|localhost
STATE DB - HOST_STATS|HOSTNAME

@niranjanivivek

Copy link
Copy Markdown
Author

@niranjanivivek Can you check whether these 2 fields are already present in upstream (without your changes) and if your changes would overwrite the current values?

CONFIG DB - DEVICE_METADATA|localhost STATE DB - HOST_STATS|HOSTNAME

Hi Kishan, I checked the existing behavior and confirmed that the below parameters are not already present/upstreamed.
It is also verified that the new script supports only the below specified parameters for software Components only as per the scope of work.

OpenConfig Path Supported Redis DB Parameters updated in DB
/components/component[name=]/chassis/state STATE_DB CHASSIS_INFO|chassis
/components/component[name=]/software-module/state STATE_DB SW_COMP_INFO|boot_loader
/components/component[name=]/software-module/state STATE_DB SW_COMP_INFO|network_stack0
/components/component[name=]/state/ STATE_DB SW_COMP_INFO|os0

The script holds only place holders for the below.

system/logging/remote-servers/remote-server[host=]/state/host STATE_DB SYSLOG_SERVER|
/system/config/hostname CONFIG_DB DEVICE_METADATA|localhost
/system/state/hostname STATE_DB HOST_STATS|HOSTNAME

Kindly suggest whether these can be retained in script and removed from description.
Else can be removed from both the script and description.

@kishanps

Copy link
Copy Markdown

@niranjanivivek Can you check whether these 2 fields are already present in upstream (without your changes) and if your changes would overwrite the current values?
CONFIG DB - DEVICE_METADATA|localhost STATE DB - HOST_STATS|HOSTNAME

Hi Kishan, I checked the existing behavior and confirmed that the below parameters are not already present/upstreamed. It is also verified that the new script supports only the below specified parameters for software Components only as per the scope of work.

OpenConfig Path Supported Redis DB Parameters updated in DB
/components/component[name=]/chassis/state STATE_DB CHASSIS_INFO|chassis
/components/component[name=]/software-module/state STATE_DB SW_COMP_INFO|boot_loader
/components/component[name=]/software-module/state STATE_DB SW_COMP_INFO|network_stack0
/components/component[name=]/state/ STATE_DB SW_COMP_INFO|os0

The script holds only place holders for the below.

system/logging/remote-servers/remote-server[host=]/state/host STATE_DB SYSLOG_SERVER|
/system/config/hostname CONFIG_DB DEVICE_METADATA|localhost
/system/state/hostname STATE_DB HOST_STATS|HOSTNAME

Kindly suggest whether these can be retained in script and removed from description. Else can be removed from both the script and description.

Placeholder should be fine but please update the description accordingly.

I am approving the changes but also check if CHASSIS_INFO|chassis is an existing field and if the new changes will overwrite.

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

1 similar comment
@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@niranjanivivek

niranjanivivek commented Sep 18, 2026

Copy link
Copy Markdown
Author

@niranjanivivek Can you check whether these 2 fields are already present in upstream (without your changes) and if your changes would overwrite the current values?
CONFIG DB - DEVICE_METADATA|localhost STATE DB - HOST_STATS|HOSTNAME

Hi Kishan, I checked the existing behavior and confirmed that the below parameters are not already present/upstreamed. It is also verified that the new script supports only the below specified parameters for software Components only as per the scope of work.

OpenConfig Path Supported Redis DB Parameters updated in DB
/components/component[name=]/chassis/state STATE_DB CHASSIS_INFO|chassis
/components/component[name=]/software-module/state STATE_DB SW_COMP_INFO|boot_loader
/components/component[name=]/software-module/state STATE_DB SW_COMP_INFO|network_stack0
/components/component[name=]/state/ STATE_DB SW_COMP_INFO|os0

The script holds only place holders for the below.

system/logging/remote-servers/remote-server[host=]/state/host STATE_DB SYSLOG_SERVER|
/system/config/hostname CONFIG_DB DEVICE_METADATA|localhost
/system/state/hostname STATE_DB HOST_STATS|HOSTNAME

Kindly suggest whether these can be retained in script and removed from description. Else can be removed from both the script and description.

Placeholder should be fine but please update the description accordingly.

I am approving the changes but also check if CHASSIS_INFO|chassis is an existing field and if the new changes will overwrite.

Hi Kishan, Thanks for approving. The new changes are not overwriting anything which is already present.
The description field is updated accordingly after verification.

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

1 similar comment
@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

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.

4 participants