DC-Ops hit an issue when running sre.network.configure-switch-interfaces today for mc2055 connected to lsw1-a3-codfw.
The fault related to parsing the output from the show interfaces <interface> | display json for the switch interface (see P93718):
File "/srv/deployment/spicerack/cookbooks/sre/network/__init__.py", line 216, in parse_results
result = RemoteHosts.results_to_list(results_raw)[0][1]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of rangeProblem
The issue seems to have occured after lsw1-a3-codfw was upgraded to JunOS 23.4 yesterday. Digging a little deeper what it seems to be doing is adding an interface if an SFP+ is connected, even without any config:
cmooney@lsw1-a3-codfw> show configuration interfaces | display set | match "0/0/41"
{master:0}
cmooney@lsw1-a3-codfw> show interfaces terse | match 0/0/41
xe-0/0/41 up up
xe-0/0/41.16386 up upWhereas when I got dc-ops to add an SFP in port 41 of lsw1-a4-codfw, still on JunOS 22.2, we see this:
cmooney@lsw1-a4-codfw> show interfaces terse | match "0/0/41"
{master:0}
cmooney@lsw1-a4-codfw>The end result is the newer software returns JSON like this to the cookbook, whereas the older one returns something like this.
I'll take a closer look and see how we can adjust the cookbook to deal with this scenario.