[Mellanox][Smartswitch]Changes for mounting dbus socket#20816
[Mellanox][Smartswitch]Changes for mounting dbus socket#20816qiluo-msft merged 4 commits intosonic-net:masterfrom
Conversation
|
/azpw run Azure.sonic-buildimage |
|
/AzurePipelines run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw ms_conflict |
|
@prgeor Please review |
|
/azpw ms_conflict |
|
/azpw ms_conflict |
1 similar comment
|
/azpw ms_conflict |
| -v /var/run/hw-management:/var/run/hw-management:rw \ | ||
| -v mlnx_sdk_socket:/var/run/sx_sdk \ | ||
| -v /tmp/nv-syncd-shared/:/tmp \ | ||
| -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \ |
There was a problem hiding this comment.
yes, PMON can control host services. We need this creation/removal of the midplane interfaces
There was a problem hiding this comment.
@gpunathilell looks to be a hacky approach to me accessing host from a docker. Instead,
rshim can monitor the udev event for the pcie link to be up when the DPU is up and create the interface once the pcie link is up
There was a problem hiding this comment.
@prgeor DPU state is controlled by the PMON. PMON knows when to create or remove the midplane interface (rshim). Rshim can't subscribe to the event because the dependencies are opposite. Before removing the PCI interface, we need to stop rshim.
There was a problem hiding this comment.
@prgeor, @qiluo-msft, we will use the rshim service to control the midplane interface only in 202411 release. In 202505 it will be repleased with the physical function interface and the dependency to rshim and host services will be removed.
There was a problem hiding this comment.
@oleksandrivantsiv To reduce the attacking surface, could you limit the changes to only mellanox and only SmartSwitch?
There was a problem hiding this comment.
@qiluo-msft it is limited to PMON container for Mellanox platform. We will add restriction to Smart Switch
There was a problem hiding this comment.
@qiluo-msft please check updated implementation
|
/azpw run |
|
/azpw run Azure.sonic-buildimage |
|
/AzurePipelines run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| # TODO: Mellanox will remove the --tmpfs exception after SDK socket path changed in new SDK version | ||
| {%- if docker_container_name == "pmon" %} | ||
| if [[ $NUM_DPU -gt 0 ]]; then | ||
| SMARTSWITCH_MNT= " -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket" |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run Azure.sonic-buildimage |
|
/AzurePipelines run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
) Why I did it This PR is a temporary change, once the rshim interface will be replaced this PR will not be required anymore To mount the dbus socket in pmon container as systemctl command has to be executed to start/stop service from PMON container during admin state/ reboot command execution dockers/docker-platform-monitor/Dockerfile.j2 - Addition of dbus package for mellanox specific platform in order to use dbus-send command files/build_templates/docker_image_ctl.j2 - Mount socket, since we need to use the systemctl command to start/stop service from pmon container How I did it How to verify it dbus-send commands in Pmon container can be performed in order to start / stop the [email protected] which is relevant for starting or stopping the rshim service
Why I did it
This PR is a temporary change, once the rshim interface will be replaced this PR will not be required anymore
To mount the dbus socket in pmon container as systemctl command has to be executed to start/stop service from PMON container during admin state/ reboot command execution
dockers/docker-platform-monitor/Dockerfile.j2- Addition of dbus package for mellanox specific platform in order to use dbus-send commandfiles/build_templates/docker_image_ctl.j2- Mount socket, since we need to use the systemctl command to start/stop service from pmon containerWork item tracking
How I did it
How to verify it
dbus-sendcommands in Pmon container can be performed in order to start / stop the[email protected]which is relevant for starting or stopping the rshim serviceWhich release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)