Page MenuHomePhabricator

Netbox: unterminated cables
Closed, ResolvedPublic

Description

Netbox used to not allow unterminated cables, so deleting the interface on one end would delete the cable automatically.

It looks like since the "latest" upgrade, this is not the case anymore, and we're ending up with "dangling cables".

The full list can be seen on https://netbox.wikimedia.org/dcim/cables/?unterminated=True

In theory we could delete them all, but to be double-checked...

We also need to update our automation to properly delete a cable when relevant.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Volans triaged this task as Medium priority.May 5 2025, 2:24 PM

In theory we could delete them all, but to be double-checked...

yeah worth checking if any are present. I guess for the SFP-based switches we could check if there is a module in the port, if not delete?

We also need to update our automation to properly delete a cable when relevant.

Yeah that's what I'm wondering about. How are these ending up that way? Is it just manual edits not done correct? Or possibly aborted provision scripts or something?

If they are only occasional then not a huge deal, I'd be more concerned if there was some gap in the provision/decom workflow which was causing these.

Maybe once cleared up we could add it to the report to alert on them? And follow up if it does happen to work out why? I don't think a validator is best as it probably does make sense sometimes to change one end of a cable (when it moves port), and we need to allow the brief transitionary time when one side has no endpoint.

Mentioned in SAL (#wikimedia-operations) [2025-05-12T10:32:22Z] <XioNoX> delete some exterminated cables from Netbox - T393188

Change #1144499 had a related patch set uploaded (by Ayounsi; author: Ayounsi):

[operations/software/netbox-extras@master] Cables report: alert on unterminated cables

https://gerrit.wikimedia.org/r/1144499

Change #1144499 merged by jenkins-bot:

[operations/software/netbox-extras@master] Cables report: alert on unterminated cables

https://gerrit.wikimedia.org/r/1144499

Change #1144556 had a related patch set uploaded (by Ayounsi; author: Ayounsi):

[operations/software/netbox-extras@master] PuppetImport and offline scripts: delete cable before interface

https://gerrit.wikimedia.org/r/1144556

Change #1144556 merged by jenkins-bot:

[operations/software/netbox-extras@master] PuppetImport and offline scripts: delete cable before interface

https://gerrit.wikimedia.org/r/1144556

Change #1144593 had a related patch set uploaded (by Ayounsi; author: Ayounsi):

[operations/software/netbox-extras@master] Interface: add validator for child + cable

https://gerrit.wikimedia.org/r/1144593

Change #1144593 merged by jenkins-bot:

[operations/software/netbox-extras@master] Interface: add validator for child + non-virtual

https://gerrit.wikimedia.org/r/1144593

Mentioned in SAL (#wikimedia-operations) [2025-05-13T07:55:38Z] <XioNoX> delete all unterminated cables - T393188

ayounsi claimed this task.

All done!