Moving Primary IP to another device failed with error #6476

Closed
opened 2025-12-29 19:41:07 +01:00 by adam · 1 comment
Owner

Originally created by @Zeawiel on GitHub (May 12, 2022).

NetBox version

v3.2.2

Python version

3.10

Steps to Reproduce

  1. Create 2 devices
  2. Create an interface on each
  3. Add an IP to the interface of device 1 and mark it primary for the device
  4. Go on IP object, change the assigned device and interface to the second one

Expected Behavior

The IP should move to the second device

Observed Behavior

There is an error "IP address is primary for device XXX but not assigned to it!".
One way to get it work is to uncheck the primary check box, save, and then change the device.

It was tested on my prod netbox (v3.1.5) and reproduced in the official demo instance (v3.2.2).

Originally created by @Zeawiel on GitHub (May 12, 2022). ### NetBox version v3.2.2 ### Python version 3.10 ### Steps to Reproduce 1. Create 2 devices 2. Create an interface on each 3. Add an IP to the interface of device 1 and mark it primary for the device 4. Go on IP object, change the assigned device and interface to the second one ### Expected Behavior The IP should move to the second device ### Observed Behavior There is an error "IP address is primary for device XXX but not assigned to it!". One way to get it work is to uncheck the primary check box, save, and then change the device. It was tested on my prod netbox (v3.1.5) and reproduced in the official demo instance (v3.2.2).
adam closed this issue 2025-12-29 19:41:07 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 12, 2022):

This is expected behavior and necessary to guard against inadvertent changes. You need to unassign the IP address as the primary for the first device before it can be moved, hence the error message.

@jeremystretch commented on GitHub (May 12, 2022): This is expected behavior and necessary to guard against inadvertent changes. You need to unassign the IP address as the primary for the first device before it can be moved, hence the error message.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6476