question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

facts RE uptime with virtual chassis where RE fpc number > 1

See original GitHub issue

The facts output includes RE0 and RE1 which are really intended for cases when the device has dual routing engines in a single chassis. This does not play well with a virtual chassis stack when the routing engines are in fpc positions greater than either 0 or 1.

This came about because I wanted to obtain the uptime for a routing engine in the stack. The uptime is included the RE dicts when they are available in RE0 and RE1. re_info['default'] contains all the same information except for uptime. I would like to have uptime added to the RE dicts in re_info to solve this issue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
stacywsmithcommented, Jun 29, 2017

uptime was intentionally excluded from the new re_info fact because it’s not really a “fact”. I consider “facts” to be read-only information which maintains the same value for the life of the PyEZ connection to the device. However, the value of uptime obviously changes over time. Even worse, the uptime value would always be the time at which the re_info, RE0, or RE1 fact was retrieved, rather than the current uptime.

Of course, this is true in the older RE0 and RE1 facts as well, but the decision was made to maintain the current behavior of those facts for backward compatibility.

It’s also worth noting that on-demand fact gathering makes things slightly less predictable. Previously, all facts were gathered when open() was invoked, or when facts_refresh() was invoked. Now, each fact is generally gathered the first time it’s value is accessed. However, multiple facts might be derived from the same RPC, or one fact might be dependent upon another fact. In those cases, the fact is gathered the first time a dependent fact, or a fact derived from the same RPC, is gathered.

I would certainly be supportive of adding an uptime() Device method which always executes a fresh RPC to return the current uptime for all Routing Engines.

Would an uptime() method meet your requirement?

0reactions
stacywsmithcommented, Jul 6, 2017

@lampwins Our team has already been discussing the need for a predictable patch release schedule. To date, PyEZ has not had a predictable schedule for patch releases. We have agreed internally that we will begin publishing patch releases on (at least) a monthly basis and publish new patch releases on or before the last day of the month. So, this minor enhancement will be part of 2.1.5 and will be published on or before 31 July 2017.

Read more comments on GitHub >

github_iconTop Results From Across the Web

show system uptime - Juniper Networks
Display the current time and information about how long the router or switch, router or switch software, and routing protocols have been running....
Read more >
4. EX Virtual Chassis - JUNOS Enterprise Switching [Book]
EX4200 switches support clustering of up to ten 4200 chassis into a single Virtual Chassis (VC), which provides significant High Availability (HA) benefits ......
Read more >
upgrade - Keeran's Blog
This is an manual process by running the command, from the current Master RE, request chassis routing-engine master switch. This WILL cause a...
Read more >
EX3300 Switch Hardware Guide - Geizhals Static Content
In this case, the FPC number refers to the. memberIDassignedto the switch. n is a value in the range of 0-9. On EX3300...
Read more >
Junos OS Chassis-Level User Guide - manuals.plus
1 CHAPTER Overview Chassis-Level Features Overview | 2 2 ... Matrix Plus router at the hierarchy level [edit chassis lcc number fpc number]....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found