Skip to content

Conversation

@GigleGig
Copy link

@GigleGig GigleGig commented Nov 24, 2025

Test inclusion requirements

  • Ran pytest tests/unit/poller/worker/services -k device (2 tests) after installing nubia in the suzieq venv to cover the Junos device cleaner behavior touched by this fix.
  • No new platform/service was added, so no additional sample inputs were required.

Related Issue

Fixes #903

Description

Restore Junos EX bootup timestamp extraction by switching junos-ex to the MX normalization, guard _clean_junos_data against missing bootupTimestamp, and treat EX platforms like MX/QFX10K/EVO in the node bootstrapper so single-engine JSON outputs parse correctly.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

New Behavior

Poller successfully parses bootupTimestamp for EX 14.x devices, and the Junos cleaner no longer raises when the field is absent—EX nodes report boot time in both node metadata and the device service.

...

Contrast to Current Behavior

Previously, the EX normalization used the multi-routing-engine JSON path, so bootupTimestamp never appeared and _clean_junos_data crashed with KeyError; the node bootstrapper also logged warnings about failing to parse boot time.

...

Discussion: Benefits and Drawbacks

Benefits: prevents sq-poller crashes on Junos EX, improves resilience across Junos variants, and keeps behavior backward-compatible for other families. No drawbacks observed.

...

Changes to the Documentation

None.

...

Proposed Release Note Entry

Fix Junos EX bootup timestamp parsing so sq-poller no longer fails when show system uptime | display json lacks bootupTimestamp.

...

Comments

Unit testing was limited to the targeted subset noted above; broader suites were not run.

Double Check

  • I have read the comments and followed the CONTRIBUTING.md.
  • I have explained my PR according to the information in the comments or in a linked issue.
  • My PR source branch is created from the develop branch.
  • My PR targets the develop branch.
  • All my commits have --signoff applied

Signed-off-by: SuzieQ Bot <bot@suzieq>
Signed-off-by: GigleGig <[email protected]>
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.

[Bug]: _clean_junos_data KeyError: 'bootupTimestamp'

1 participant