Commit 61c6475
[test_ro_disk] Recover DUT to RW state by power-cycle when reboot doesn't work (sonic-net#13974)
What is the motivation for this PR?
On some platforms, DUT cannot be recovered from RO-disk state by reboot. (e.g., On Nokia-7215, we saw the reboot is blocked by systemd-journald.service) To avoid DUT stuck at RO disk state, this PR introduce power-cycle as the final approach to recover DUT.
How did you do it?
If reboot failed to recover DUT from RO disk state, try power-cycle to recover the DUT.
How did you verify/test it?
Verified on Nokia-7215 M0 testbed. Get test passed with below logs:
tacacs/test_ro_disk.py::test_ro_disk[dut-7215-4]
-------------------------------------------------------------------------------- live log call --------------------------------------------------------------------------------
10:02:17 test_ro_disk.do_reboot L0089 ERROR | DUT did not go down, exception: run module command failed, Ansible Results =>
{"failed": true, "msg": "Timeout (62s) waiting for privilege escalation prompt: "} attempt:0/3
10:04:02 test_ro_disk.do_reboot L0089 ERROR | DUT did not go down, exception: run module command failed, Ansible Results =>
{"failed": true, "msg": "Timeout (62s) waiting for privilege escalation prompt: "} attempt:1/3
10:05:24 test_ro_disk.do_reboot L0089 ERROR | DUT did not go down, exception: run module command failed, Ansible Results =>
{"failed": true, "msg": "Timeout (62s) waiting for privilege escalation prompt: "} attempt:2/3
10:05:44 test_ro_disk.do_reboot L0095 ERROR | Failed to reboot DUT after 3 retries
10:05:44 test_ro_disk.test_ro_disk L0262 WARNING| Failed to reboot dut-7215-4, try PDU reboot to restore disk RW state
PASSED1 parent 0ed92c1 commit 61c6475
2 files changed
Lines changed: 52 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
763 | 786 | | |
764 | 787 | | |
765 | 788 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
| |||
83 | 91 | | |
84 | 92 | | |
85 | 93 | | |
86 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
87 | 102 | | |
88 | 103 | | |
89 | | - | |
90 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
91 | 107 | | |
92 | 108 | | |
93 | 109 | | |
94 | 110 | | |
95 | 111 | | |
96 | 112 | | |
97 | 113 | | |
98 | | - | |
99 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
100 | 118 | | |
101 | 119 | | |
102 | 120 | | |
| |||
142 | 160 | | |
143 | 161 | | |
144 | 162 | | |
145 | | - | |
| 163 | + | |
146 | 164 | | |
147 | 165 | | |
148 | 166 | | |
| |||
162 | 180 | | |
163 | 181 | | |
164 | 182 | | |
165 | | - | |
| 183 | + | |
166 | 184 | | |
167 | 185 | | |
168 | 186 | | |
| |||
240 | 258 | | |
241 | 259 | | |
242 | 260 | | |
243 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
244 | 265 | | |
245 | 266 | | |
246 | 267 | | |
| |||
0 commit comments