FHRP Group Assignment not possible via WebUI #10358

Closed
opened 2025-12-29 21:30:27 +01:00 by adam · 2 comments
Owner

Originally created by @iopsthecloud on GitHub (Oct 12, 2024).

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v3.7.0

Python Version

3.11

Steps to Reproduce

  1. Create an FHRP Group (eg. VRRP2, id 12)
  2. Assign a VIP address to the FHGroup 10.1.1.1/24
  3. Goto Virtual Machine Interface and assign an IP address 10.2.1.1/24
  4. Assign fhgroup to the interface
  5. Group is not shown in the list

Expected Behavior

Show the FHGroup to assign to this interface

Observed Behavior

List is empty

Investigation

When we click on the "group*" list in the fhgroupassignment form, netbox do an api call to https://netbox/api/ipam/fhrp-groups/?brief=true&related_ip=18

However the IP address config on the interface of the vm (10.2.1.1/24 [the related_ip]) is not in the same prefixe that the ip address of the fhgroup. It's probably why the "group" list is empty.

However if I directy use the REST API I can do the association per example:

curl -X POST "https://netbox/api/ipam/fhrp-group-assignments/" -H "Authorization: Token ${TOKEN}" -H "Content-Type: application/json" -d '{
"interface_type": "virtualization.vminterface",
"interface_id": 3104,
"group": 208,
"priority": 90
}'

Where inteface_id is the interface of the VM and the group ID the FHGroup that is not in the popup list.

Originally created by @iopsthecloud on GitHub (Oct 12, 2024). ### Deployment Type Self-hosted ### Triage priority N/A ### NetBox Version v3.7.0 ### Python Version 3.11 ### Steps to Reproduce 1. Create an FHRP Group (eg. VRRP2, id 12) 2. Assign a VIP address to the FHGroup 10.1.1.1/24 3. Goto Virtual Machine Interface and assign an IP address 10.2.1.1/24 4. Assign fhgroup to the interface 4. Group is not shown in the list ### Expected Behavior Show the FHGroup to assign to this interface ### Observed Behavior List is empty ### Investigation When we click on the "group*" list in the fhgroupassignment form, netbox do an api call to https://netbox/api/ipam/fhrp-groups/?brief=true&related_ip=18 However the IP address config on the interface of the vm (10.2.1.1/24 [the related_ip]) is not in the same prefixe that the ip address of the fhgroup. It's probably why the "group" list is empty. However if I directy use the REST API I can do the association per example: curl -X POST "https://netbox/api/ipam/fhrp-group-assignments/" -H "Authorization: Token ${TOKEN}" -H "Content-Type: application/json" -d '{ "interface_type": "virtualization.vminterface", "interface_id": 3104, "group": 208, "priority": 90 }' Where inteface_id is the interface of the VM and the group ID the FHGroup that is not in the popup list.
adam added the type: bugstatus: revisions neededseverity: low labels 2025-12-29 21:30:27 +01:00
adam closed this issue 2025-12-29 21:30:27 +01:00
Author
Owner

@bctiemann commented on GitHub (Oct 15, 2024):

Why should the UI offer FHRPGroups with incompatible IPs? There's code in FHRPGroupFilterSet specifically to prohibit this. It seems like if there's a bug it's that the API allows direct assignment without this validation.

@bctiemann commented on GitHub (Oct 15, 2024): Why should the UI offer FHRPGroups with incompatible IPs? There's code in `FHRPGroupFilterSet` specifically to prohibit this. It seems like if there's a bug it's that the API allows direct assignment without this validation.
Author
Owner

@iopsthecloud commented on GitHub (Oct 17, 2024):

Hi @bctiemann

You're right, I approached the problem from the wrong side. I'm closing this issue because after using the right interfaces with the right IP addresses/prefixes configured it works as attended.

Just a comment in a case we have:

I have 2 nodes:

  • A
    • eth0: 1.1.1.1/24 ==> public network
    • eth1: 172.16.0.1/30 ==> VRRP network
  • B
    • eth0 : 1.1.1.2/24 ==> public network
    • eth1: 172.16.0.2/30 ==> VRRP network

I've got a keepalived process which sets the VIP on eth0, eth1 is only used for VRRP. There is no VIP on the VRRP prefix (which is /30 by design).

Now, if I want to create a FHRP group that represents my configuration, I'll need to set an IP address of 172.16.0.0/30 in the FHRP group to be able to connect node A and B via eth1 to the FHRP group.

@iopsthecloud commented on GitHub (Oct 17, 2024): Hi @bctiemann You're right, I approached the problem from the wrong side. I'm closing this issue because after using the right interfaces with the right IP addresses/prefixes configured it works as attended. Just a comment in a case we have: I have 2 nodes: * A * eth0: 1.1.1.1/24 ==> public network * eth1: 172.16.0.1/30 ==> VRRP network * B * eth0 : 1.1.1.2/24 ==> public network * eth1: 172.16.0.2/30 ==> VRRP network I've got a keepalived process which sets the VIP on eth0, eth1 is only used for VRRP. There is no VIP on the VRRP prefix (which is /30 by design). Now, if I want to create a FHRP group that represents my configuration, I'll need to set an IP address of 172.16.0.0/30 in the FHRP group to be able to connect node A and B via eth1 to the FHRP group.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10358