Skip to content

Commit

Permalink
If we can't get the warmboot-finalizer state, don't exit (sonic-net#1…
Browse files Browse the repository at this point in the history
…5985)

In some cases, connecting to the device may fail for whatever reason. If
this happens, the current code returns an empty string as the
warmboot-finalizer state. There's a for-loop that exits when the
warmboot-finalizer state is no longer active. An empty string being
returned here breaks that.

To avoid that, don't exit this loop if we get an empty string.

Signed-off-by: Saikrishna Arcot <[email protected]>
  • Loading branch information
saiarcot895 authored Dec 13, 2024
1 parent 609621b commit dd14c06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ansible/roles/test/files/ptftests/py3/advanced-reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ def check_warmboot_finalizer(self, finalizer_timeout):
self.finalizer_state = self.get_warmboot_finalizer_state()
self.log('warmboot finalizer service state {}'.format(self.finalizer_state))
count = 0
while self.finalizer_state == 'activating':
while self.finalizer_state == 'activating' or self.finalizer_state == '':
self.finalizer_state = self.get_warmboot_finalizer_state()
self.log('warmboot finalizer service state {}'.format(self.finalizer_state))
time.sleep(10)
Expand Down

0 comments on commit dd14c06

Please sign in to comment.