-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v2.11.10
Python version
3.9
Steps to Reproduce
- Create a VM firewall1 with Interface interface1
- Create a VM virtualmachine1 with Interface ens192
- Create 2 IPs: 111.111.111.2/28, 10.0.0.4/24
- Assign IP 111.111.111.2/28 to firewall1 interface1
- Assign IP 10.0.0.4/24 to virtualmachine1 ens192
- Modify IP 111.111.111.2/28 to be the NAT Outside of IP 10.0.0.4/24
- Modify VM virtualmachine1 to use NAT-IP 111.111.111.2/28 as Primary IPv4
- Try to modify IP 111.111.111.2/28
Expected Behavior
IP 111.111.111.2/28 can be modified
Observed Behavior
IP 111.111.111.2/28 can not be modified.
Both UI and API return 400 "IP address is primary for virtual machine xyz but not assigned to it!"
It can only be deleted without error.
The issue is found here in the model of IPAddress, where only direct assignments without respecting NAT assignments are fetched:
netbox/netbox/ipam/models/ip.py
Line 650 in ee8fd70
| # Check for primary IP assignment that doesn't match the assigned device/VM |
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application

