-
Notifications
You must be signed in to change notification settings - Fork 711
[warm-reboot]: added automated recover for ISSU file #1466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[warm-reboot]: added automated recover for ISSU file #1466
Conversation
Signed-off-by: Vadym Hlushko <[email protected]>
@qiluo-msft, @yxieca, @stepanblyschak could you please review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unblock, minor issue
Signed-off-by: Vadym Hlushko <[email protected]>
5f2aeb3
to
f3ac16b
Compare
@qiluo-msft - Who can merge it ? we need it also for 202012. Thanks. |
#### 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 ```
@vaibhavhd for viz |
#### 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 ```
Signed-off-by: Vadym Hlushko [email protected]
What I did
Modified pre-check for file
/host/warmboot/issu_bank.txt
inwarm-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 thewarm-reboot
command.For testing I have modified the
warm-reboot
script - added corruption command beforecheck_issu_bank_file
function call.issu_bank.txt
issu_bank.txt
issu_bank.txt
issu_bank.txt
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)