Bailed out by Comware’s python interpreter
Something funny happened to an IRF stack the other day. The gear was moved to a remote location and, as part of the move, the cables/transceivers were moved around.The IRF (10Gb/s) and uplink (1Gb/s) ports switched places.
The new IRF ports (5 and 6) got added to the configuration just fine, leaving me with:
#
irf-port 1/1
port group interface Ten-GigabitEthernet1/1/1
port group interface Ten-GigabitEthernet1/1/2
port group interface Ten-GigabitEthernet1/1/5
port group interface Ten-GigabitEthernet1/1/6
#
irf-port 2/2
port group interface Ten-GigabitEthernet2/1/1
port group interface Ten-GigabitEthernet2/1/2
port group interface Ten-GigabitEthernet2/1/5
port group interface Ten-GigabitEthernet2/1/6
#
But IRF would't release the old ports making it impossible to repurpose them as uplinks:
[switch]irf-port 1/1
[switch-irf-port1/1]undo port group interface Ten-GigabitEthernet1/1/1
Check failed for reason:
Can't support IRF on a port with 1000M speed!
[switch]
Can't remove a port from the IRF group because it's ineligible to participate in IRF. Okaaaaay...
Without functioning uplinks, it was impossible to transfer the saved configuration away for an off-box edit.
Python to the rescue!
I split the IRF, used python to edit the stored configuration in-place on each IRF member, then rebooted the switches individually. Here's the edit-by-python:
<switch>python
Python 2.7.3 (default, Apr Continue reading
CORD is hosted by the Linux Foundation.