Can't de-assign a primary IP from interface #5253

Closed
opened 2025-12-29 19:25:56 +01:00 by adam · 3 comments
Owner

Originally created by @Carbenium on GitHub (Aug 30, 2021).

NetBox version

v2.11.12 with 88b230f0e4

Python version

3.7

Steps to Reproduce

  1. Start editing an IP which is assigned to an interface and is the primary IP of the device.
  2. Delete content from the Device and Interface fields
  3. Click Update

Expected Behavior

The IP should be de-assigned from the interface

Observed Behavior

The following error is shown:

IP address is primary for device <device name> but not assigned to it!

Originally created by @Carbenium on GitHub (Aug 30, 2021). ### NetBox version v2.11.12 with 88b230f0e446bc21deb27465d6f0167763081564 ### Python version 3.7 ### Steps to Reproduce 1. Start editing an IP which is assigned to an interface and is the primary IP of the device. 2. Delete content from the `Device` and `Interface` fields 3. Click `Update` ### Expected Behavior The IP should be de-assigned from the interface ### Observed Behavior The following error is shown: `IP address is primary for device <device name> but not assigned to it!`
adam closed this issue 2025-12-29 19:25:56 +01:00
Author
Owner

@Carbenium commented on GitHub (Aug 30, 2021):

I'm not 100% sure if this is new behavior or I just didn't encounter this case before. At least I don't know of another way of de-assigning an IP from an interface without deleting the IP.

@Carbenium commented on GitHub (Aug 30, 2021): I'm not 100% sure if this is new behavior or I just didn't encounter this case before. At least I don't know of another way of de-assigning an IP from an interface without deleting the IP.
Author
Owner

@jeremystretch commented on GitHub (Aug 30, 2021):

At least I don't know of another way of de-assigning an IP from an interface without deleting the IP.

You need to edit the device and remove the assigned IP. This behavior has not changed from prior releases.

@jeremystretch commented on GitHub (Aug 30, 2021): > At least I don't know of another way of de-assigning an IP from an interface without deleting the IP. You need to edit the device and remove the assigned IP. This behavior has not changed from prior releases.
Author
Owner

@Carbenium commented on GitHub (Aug 30, 2021):

Ah yes, my bad. Thanks!
I shouldn't do these things when it's late ;)

@Carbenium commented on GitHub (Aug 30, 2021): Ah yes, my bad. Thanks! I shouldn't do these things when it's late ;)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5253