[ssw][ha] add doc for dpu restart#2175
Conversation
|
/azp run |
|
No pipelines are associated with this pull request. |
|
/azp run |
|
No pipelines are associated with this pull request. |
|
/azp run |
|
No pipelines are associated with this pull request. |
|
/azp run |
|
No pipelines are associated with this pull request. |
Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
* tsc/frr/sonic_frr_update_process.md Signed-off-by: Eddie Ruan <eddie.ruan@alibaba-inc.com> * Update CVE link Signed-off-by: Eddie Ruan <eddie.ruan@alibaba-inc.com> --------- Signed-off-by: Eddie Ruan <eddie.ruan@alibaba-inc.com> Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
|
/azp run |
|
No pipelines are associated with this pull request. |
Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
|
/azp run |
|
No pipelines are associated with this pull request. |
|
/azp run |
|
No pipelines are associated with this pull request. |
Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
|
/azp run |
|
No pipelines are associated with this pull request. |
|
/azp run |
|
No pipelines are associated with this pull request. |
| ## Solutions | ||
| The following are the proposed actions during DPU reboot. | ||
|
|
||
| 1. Cleanup `DPU_*_DB` instances when DPU boots up. |
There was a problem hiding this comment.
Cleanup happens when swss is restarted. It covers both DPU reboot and critical processes restart
|
|
||
| 1. Cleanup `DPU_*_DB` instances when DPU boots up. | ||
| 1. SDN controller needs to monitor NPU `STATE_DB` entries below: | ||
| 1. `CHASSIS_MODULE_TABLE|DPU<dpu_index>: {'admin_status': 'up|down', 'oper_status': 'up|down'}` |
There was a problem hiding this comment.
This is still required to confirm DPU is ready to be configured.
| This field indicates if dpu is ready to be provisioned. Hamgrd will set the value to `false` when `dpu_control_plane_state` or `dpu_midplane_link_state` goes down, and set the value back to `true` when the states are up. | ||
|
|
||
| 1. SDN controller will then | ||
| 1. Delete stale HA_SET_CONFIG and HA_SCOPE_CONFIG |
There was a problem hiding this comment.
Please add the timing, when reset_status changes to true
There was a problem hiding this comment.
Included already in last bullet point.
|
|
||
| 1. SDN controller will then | ||
| 1. Delete stale HA_SET_CONFIG and HA_SCOPE_CONFIG | ||
| 1. Re-program DASH objects, HA_SET_CONFIG and HA_SCOPE_CONFIG |
There was a problem hiding this comment.
add condition when dpu_ready changes to true
There was a problem hiding this comment.
Included already in last bullet point.
| 1. Delete stale HA_SET_CONFIG and HA_SCOPE_CONFIG | ||
| 1. Re-program DASH objects, HA_SET_CONFIG and HA_SCOPE_CONFIG | ||
| 1. Once services are provisioned, HA is programmed, SDN controller will set `reset_status` to `false` | ||
| 1. Hamgrd needs to change the passive BFD session creation logic, today the sessions are created statically. We need this change to avoid hamgrd restart. Hamgrd needs to create BFD session if `dpu_control_plane_state` changes from down to up. |
There was a problem hiding this comment.
or dpu_midplane_state from down to up
There was a problem hiding this comment.
checked Dylan's implementation, both state should be up?
Updated the working a bit to avoid confusion.
| hamgrd->>DPU_APPL_DB: 13. Create BFD passive sessions. | ||
| hamgrd->>NPU STATE_DB: 14. DPU_RESET_INFO|DPU0: {"dpu_ready": "true"} | ||
|
|
||
| NPU STATE_DB->>SDN Controller: 15. DPU_RESET_INFO|DPU0: {"dpu_ready": "true"} && CHASSIS_MODULE_TABLE|DPU0 {'admin_status':'up'} &&CHASSIS_MODULE_TABLE|DPU0 {'oper_status':'up'} |
There was a problem hiding this comment.
Did you see SDN controller should not access CHASSIS_MODULE_TABLE?
There was a problem hiding this comment.
SDN controller will not use CHASSIS_STATE_DB. CHASSIS_MODULE_TABLE is in NPU's STATE_DB.
|
|
||
|
|
||
| SDN Controller->>hamgrd: 16. Create DASH objects, HA_SCOPE_CONFIG and HA_SET_CONFIG | ||
| SDN Controller->>NPU STATE_DB: 17. DPU_RESET_INFO|DPU0: {"reset_status": "false"} |
There was a problem hiding this comment.
If DPU crashed before reaching step 17, hamgrd will sets reset_status to true, which is already true but timestamp will be new. Controller needs to restart the reset process (delete ha scope/ha set). I still think we should converge on dpu_ready so controller only needs to watch this field. If it is false, start the reset process by removing ha config. When it is true, adding ha config etc.
There was a problem hiding this comment.
Yes, step 17 is actually to write the DB entry. Updated for clarity.
There was a problem hiding this comment.
I think we need to specifically call out to controller that it is possible dpu crashes again before controller sets reset_status to false. So it needs to keep track of status last update time to detect this situation. Otherwise, DPU will be stuck in the bad state.
Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
|
/azp run |
|
No pipelines are associated with this pull request. |
|
/azp run |
|
No pipelines are associated with this pull request. |
| 1. SDN controller needs to monitor NPU `STATE_DB` entries below: | ||
| 1. `CHASSIS_MODULE_TABLE|DPU<dpu_index>: {'admin_status': 'up|down', 'oper_status': 'up|down'}` | ||
| This table entry will be updated by [SmartSwitch pmon](https://github.com/sonic-net/SONiC/blob/master/doc/smart-switch/pmon/smartswitch-pmon.md). | ||
| 1. `DASH_DPU_RESET_INFO_TABLE|DPU<dpu_index>: {'reset_status': 'true|false', 'last_reset_status_update': timestamp}` |
There was a problem hiding this comment.
Are you going to change the key to vDPU id?
Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
|
/azp run |
|
No pipelines are associated with this pull request. |
Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
|
/azp run |
|
No pipelines are associated with this pull request. |
|
Please add PRs to description following template |
Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
|
/azp run |
|
No pipelines are associated with this pull request. |
…wn (#137) <!-- Please make sure you have read and understood the contribution guildlines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md 1. Make sure your commit includes a signature generted with `git commit -s` 2. Make sure your commit title follows the correct format: [component]: description 3. Make sure your commit message contains enough details about the change and related tests 4. Make sure your pull request adds related reviewers, asignees, labels Please also provide the following information in this pull request: --> **What I did** When dpu midplane or control plane go down, write DASH_DPU_RESET_INFO_TABLE **Why I did it** This is to handle DPU reboot or DPU critical process restart. We use the table to notify SDN controller to take action. For details, see sonic-net/SONiC#2175 **How I verified it** verified in hardware. when dpu is rebooted, or some critical process restarted, below entry was created or updated root@MtFuji-dut02:/home/cisco# sonic-db-cli STATE_DB hgetall DASH_DPU_RESET_INFO\|DPU0 {'timestamp': '1769715782213', 'dpu_id': 'dpu1_0', 'vdpu_id': 'vdpu1_0', 'reset_status': 'true'} **Details if related** --------- Signed-off-by: Yue Gao <yuega2@cisco.com>
When DPU restarts (either as a planned or an unexpected event), DPU_[APPL|STATE] _DB that are hosted on NPU will not be restarted along with as DPU. This causes some states to be out of sync and leads to unexpected behaviors in HA scenarios.
Adding doc for solution proposal. Pending review.
sign-off: Jing Zhang zhangjing@microsoft.com