Skip to content

Fixed Arista EOS reboots not being detected when waiting for the device to reload#407

Open
Defiantearth wants to merge 4 commits into
developfrom
NAPPS-1413
Open

Fixed Arista EOS reboots not being detected when waiting for the device to reload#407
Defiantearth wants to merge 4 commits into
developfrom
NAPPS-1413

Conversation

@Defiantearth

@Defiantearth Defiantearth commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

NAPPS-1413

What's Changed

  • Fixed Arista EOS reboots not being detected when waiting for the device to reload.

Bug in OS upgrades found where when upgrading a device pyntc would return in _wait_for_device_reboot() before the device actually rebooted.

Screenshot Before(From OS Upgrades without file transfer to speed up the process of testing):

Note: You can see Checking for reachability. This is OS Upgrades taking over waiting for the device to come back up since pyntc returned before the device came back up.

localhost_8080_extras_job-results_6d38ccfc-a372-47f8-bada-a7ae2ea2e9bf__page=2

Aft

localhost_8080_extras_job-results_8ae663bb-d9df-4b88-a7df-7b54660a2784_ (1) er

return f"{days:02d}:{hours:02d}:{mins:02d}:{seconds:02d}"

def _wait_for_device_reboot(self, timeout=3600):
def _wait_for_device_reboot(self, original_boot_time, timeout=DEFAULT_REBOOT_TIMEOUT):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using boot time instead of uptime here for the case where a devices has a uptime of 30 sec upgrades then takes a few min such that the uptime is greater then 30 sec when the api is ready which will result in a timeout.

log.info("Host %s: OS image %s boot options set. Reboot the device to apply", self.host, image_name)
return True
self.reboot()
self._wait_for_device_reboot(timeout=timeout)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was already in reboot() So as long as we pass in the timeout and wait_for_reload=True we can remove the call here.

@jtdub jtdub left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants