Page MenuHomeVyOS Platform

Cannot set an agent-address in sFlow if VRF is used
Closed, ResolvedPublicBUG

Description

Can not set an agent-address in sFlow if VRF is used
Example:

set interfaces ethernet eth2 address '192.168.0.1/24'
set interfaces ethernet eth2 vrf 'OVERLAY'
set system sflow interface 'vti1'
set system sflow interface 'vti2'
set system sflow server 192.168.0.10
set system sflow agent-address 192.168.0.1
set system sflow vrf 'OVERLAY'
set vrf bind-to-all
set vrf name OVERLAY table '300'
vyos@vyos# commit

Configured "sflow agent-address 192.168.0.1" does not exist in the
system!

[[system sflow]] failed
Commit failed
[edit]
vyos@vyos#

It seems that the issue is https://github.com/vyos/vyos-1x/blob/current/src/conf_mode/system_sflow.py#L57
Need to add parameters to function is_addr_assigned when VRF is used.

Details

Version
1.5-rolling-202502030007, 1.4.1
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

hsflowd expects the agent-address to be chosen from addresses it can see in it's own namespace.

However please note that it is possible to configure hsflowd to send to multiple collectors in multiple VRFs or namespaces. When VyOS writes /etc/hsflowd.conf it _could_ write collector settings like this:

collector { ip=192.168.0.10 dev=OVERLAY }

and/or like this:

collector { ip=192.168.0.10 namespace=mgmt_ns }

So if the intention is just to be able to send to any collector then the solution might be to leave out the "set system sflow vrf ..." command, and instead enhance the "set system sflow server ..." command so it can specify a VRF or namespace as an optional parameter?

dmbaturin renamed this task from Can not set an agent-address in sFlow if VRF is used to Cannot set an agent-address in sFlow if VRF is used.Wed, Mar 12, 4:49 PM
dmbaturin closed this task as Resolved.
dmbaturin moved this task from Backlog to Finished on the VyOS 1.4 Sagitta (1.4.2) board.
dmbaturin moved this task from Open to Finished on the VyOS 1.5 Circinus board.
dmbaturin moved this task from Need Triage to Completed on the VyOS Rolling board.