Unable to remove a secondary MAC address from an interface #10823

Closed
opened 2025-12-29 21:36:20 +01:00 by adam · 0 comments
Owner

Originally created by @Monsteras1999 on GitHub (Feb 28, 2025).

Originally assigned to: @jnovinger on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.2.4

Python Version

3.11

Steps to Reproduce

All operations were done in the WebUI.

  1. Create a virtual interface X and assign it to a virtual machine (virtualization/interfaces).
  2. Create two MAC addresses A and B (dcim/mac-addresses).
  3. Edit MAC address A and assign it to X.
  4. Edit MAC address B and also assign it to X.
  5. Edit virtual interface X and set A as primary MAC address.
  6. Edit MAC address B and remove the assignment to X.

Expected Behavior

I expected on step 6 that the MAC address object gets unassigned from the interface so it can be assigned to another interface.

Observed Behavior

An Error was shown with the message "Cannot unassign MAC Address while it is designated as the primary MAC for an object".

The MAC address to be unassigned was NOT the primary MAC address.

Originally created by @Monsteras1999 on GitHub (Feb 28, 2025). Originally assigned to: @jnovinger on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.2.4 ### Python Version 3.11 ### Steps to Reproduce All operations were done in the WebUI. 1. Create a virtual interface X and assign it to a virtual machine (virtualization/interfaces). 2. Create two MAC addresses A and B (dcim/mac-addresses). 3. Edit MAC address A and assign it to X. 4. Edit MAC address B and also assign it to X. 5. Edit virtual interface X and set A as primary MAC address. 6. Edit MAC address B and remove the assignment to X. ### Expected Behavior I expected on step 6 that the MAC address object gets unassigned from the interface so it can be assigned to another interface. ### Observed Behavior An Error was shown with the message "Cannot unassign MAC Address while it is designated as the primary MAC for an object". The MAC address to be unassigned was NOT the primary MAC address.
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 21:36:20 +01:00
adam closed this issue 2025-12-29 21:36:20 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10823