Python script for no shut interfaces with timer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2015 11:48 PM - edited 03-01-2019 07:53 AM
Hi,
we have full mesh network with fabric path between N7700 (spine) and Nexus 5600 (leaf). There are Nexus 2200 FEX-es dual-homed to Nexus 5600.
We have problem with traffic loss after Nexus 5600 reloads. Fabric path is up, FEX-es are still down and spine switch forwards traffic (because FP is up) to restarted leaf switch and it drops traffic (it should send it to vPC peer over peer-link). Traffic starts after FEX come online on restarted Nexus 5600.
We opened TAC case and TAC said that this is BUG and for resolving it they need to develop new feature (there is no any date for this).
Workaround are EEM and python scripts.
EEM script should shutdown fabric path uplink ports after switch boots up (match PFMA-5-MOD_STATUS: Module 1 current-status is MOD_STATUS_ONLINE) and start python script.
Python script should wait some time (timer should be addopted to number of FEX-es, more FEX-es means higher timer value) and after timer expires (all FEX-es come online) it should enable fabric path uplink ports.
Can somebody help me to write this script?
BR, Mate
- Labels:
-
Other Data Center Topics

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2015 05:13 AM
You can find some Cisco N5K Python scripts here. Potentially you could modify one of them to suit your purpose.
https://github.com/datacenter?page=2
Don't forget to rate all posts that are helpful.
