-
Notifications
You must be signed in to change notification settings - Fork 1.1k
How to Use SAI Player
Sonic is equipped with saiplayer tool. When orchestration agent starts, it starts recording each SAI operation to a recording file in format sairedis.YYYY-MM-DD.HH:MM:SS.MS.rec. This file contains each SAI ASIC operation (one per line) as well as SAI notifications and sairedis control messages (like init view and apply view).
This tool can be used to "replay" recording on ASCI without orchestration agent. There is no need for waiting for "event" to happen, each operation is already recorded and it will be replayed with maximum possible speed. This can be very helpful when reproducing bugs. One team can find a bug, and then send recording to vendor for investigation.
This tool assumes that object IDs between ASIC reinitialize are stable and don't change. Also it must also be used on the same ASIC with the same SAI version. Cross ASIC replaying is not supported.
Here is possible scenario:
- bug is spotted, ASIC is not configured as expected
- Remove comment lines from the recording file such as the ones which begin with
|#|
- copy recording file
sairedis.2017-04-27.02:47:15.674566.rec
fromswss
docker tosyncd
dockerdocker cp swss:/sairedis.2017-04-27.02:47:15.674566.rec . docker cp ./sairedis.2017-04-27.02:47:15.674566.rec syncd:/
- stop all sonic processes and clean the redis DB for fresh start
docker exec -it swss killall orchagent redis-cli flushall docker exec -it syncd killall syncd docker exec -id syncd service syncd start
- replay recording in
syncd
dockerdocker exec -it syncd saiplayer sairedis.2017-04-27.02:47:15.674566.rec
- confirm that ASIC is in bad state as found in the first place
- describe what the problem is and send recoding file to vendor for investigation
-
For Users
-
For Developers
-
Subgroups/Working Groups
-
Presentations
-
Join Us