Removing a primary IP not possible from the IP-edit form #7237

Closed
opened 2025-12-29 20:20:45 +01:00 by adam · 1 comment
Owner

Originally created by @PieterL75 on GitHub (Nov 16, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.3.7

Python version

3.9

Steps to Reproduce

  1. Create a device
  2. create an IP and assign it to the device as primary IP
  3. edit the IP address,
  4. uncheck the "Make this the primary IP for the device/VM" box
  5. clear the interface and device dropdown
  6. save the IP

Expected Behavior

The IP is removed from the devices as primary IP and removed from the interface.

Observed Behavior

An error is shown
`IP address is primary for virtualmachine/device somedevice but not assigned to it!'

Unchecking the "Make this the primary IP for the device/VM" should automatically remove the IP as primary from the device.
Otherwise, this takes a lot of more steps (get back to the device, edit the device, remove the primary ip assignment, save the device, edit the ip, remove the interface/device, save the ip)

Originally created by @PieterL75 on GitHub (Nov 16, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.3.7 ### Python version 3.9 ### Steps to Reproduce 1. Create a device 2. create an IP and assign it to the device as primary IP 3. edit the IP address, 4. uncheck the "Make this the primary IP for the device/VM" box 5. clear the interface and device dropdown 6. save the IP ### Expected Behavior The IP is removed from the devices as primary IP and removed from the interface. ### Observed Behavior An error is shown `IP address is primary for virtualmachine/device somedevice but not assigned to it!' Unchecking the "Make this the primary IP for the device/VM" should automatically remove the IP as primary from the device. Otherwise, this takes a lot of more steps (get back to the device, edit the device, remove the primary ip assignment, save the device, edit the ip, remove the interface/device, save the ip)
adam added the type: bugstatus: accepted labels 2025-12-29 20:20:45 +01:00
adam closed this issue 2025-12-29 20:20:45 +01:00
Author
Owner

@bitcollector1 commented on GitHub (Dec 1, 2022):

Happy to see this get fixed, it's always been annoying....I just was not sure if it was a bug or a feature :)

@bitcollector1 commented on GitHub (Dec 1, 2022): Happy to see this get fixed, it's always been annoying....I just was not sure if it was a bug or a feature :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7237