Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[warm-reboot]: added automated recover for ISSU file (#1466)
#### What I did Modified pre-check for file `/host/warmboot/issu_bank.txt` in `warm-reboot` script. Added automated recovery of `/host/warmboot/issu_bank.txt` #### How I did it Modified the `warm-reboot` script. #### How to verify it Need to somehow corrupt the `/host/warmboot/issu_bank.txt` (list below) and then run the `warm-reboot` command. For testing I have modified the `warm-reboot` script - added corruption command before `check_issu_bank_file` function call. 1. Remove `issu_bank.txt` 2. Clear `issu_bank.txt` 3. Change characters count in `issu_bank.txt` 4. Write invalid content into `issu_bank.txt` #### Previous command output (if the output of a command-line utility has changed) ``` root@arc-switch1041:~# warm-reboot (/host/warmboot/issu_bank.txt) does NOT exist or empty ... To recover (/host/warmboot/issu_bank.txt) file, do the following: $ docker exec -it syncd sx_api_dbg_generate_dump.py $ docker exec -it syncd cat /tmp/sdkdump | grep 'ISSU Bank' Command above will print the VALUE of ISSU BANK - 0 or 1, use this VALUE in the next command $ printf VALUE > /host/warmboot/issu_bank.txt ``` #### New command output (if the output of a command-line utility has changed) ``` root@arc-switch1041:~# warm-reboot (/host/warmboot/issu_bank.txt) does NOT exist or empty ... Recovering the (/host/warmboot/issu_bank.txt) file ```
- Loading branch information