netenglabs / suzieq

Using network observability to operate and design healthier networks
https://www.stardustsystems.net/
Apache License 2.0
780 stars 104 forks source link

Fix bootuptimestamp type #888

Closed ddutt closed 1 year ago

ddutt commented 1 year ago

Description

EOS devices provide a float as the bootup timestamp which conflicts with the assumption throughout the code that this value is an int. As a consequence, everytime we do --run-once=update, all information is updated whether they changed or not, because of how the code attempts to detect if the device has rebooted since last poll. When we're running in continuous poll mode, this problem doesn't happen, because we're relying on data computed as opposed to read from parquet in snapshot mode.

This patch fixes this issue by ensuring that the bootup timestamp is always int.

Type of change

Bug fix

New Behavior

When poller is run on EOS devices with run-once=update mode, no updates are written if nothing has changed between the last poller run and now. There's no change in continuous polling mode.

Contrast to Current Behavior

In run-once=update mode, for EOS devices, data is always written on each poller run.

Proposed Release Note Entry

EOS in snapshot mode correctly writes only data that has changed since the last time the poller ran in snapshot mode.