frr icon indicating copy to clipboard operation
frr copied to clipboard

pim6 is incorrectly warning about yang_dnode_get issues when issuing `ipv6 pim rp ...` commands

Open donaldsharp opened this issue 2 years ago • 9 comments

pim6 is complaining about yang_dnode_get whenever a single rp get's multiple ranges of multicast addresses to handle:

2023/07/19 16:27:12.805646 PIM6: [JBNZN-EVZ5D] VRF Created: default(0)
2023/07/19 16:27:12.805657 PIM6: [QF5NQ-EJ8X3] pim_vrf_enable: for default 0
2023/07/19 16:27:12.806818 PIM6: [WGYFP-JK6RV] zclient_lookup_sched_now: zclient lookup immediate connection scheduled
2023/07/19 16:27:12.806821 PIM6: [PK8MV-NK1RX] zclient_lookup_new: zclient lookup socket initialized
2023/07/19 16:27:12.806947 PIM6: [T83RR-8SM5G] pim6d 9.1-dev starting: vty@2622
2023/07/19 16:27:36.950885 PIM6: [YXPK3-1W6CV][EC 100663326] yang_dnode_get: found 2 elements (expected 0 or 1) [xpath /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-pim:pimd'][name='pim'][vrf='default']/frr-pim:pim/address-family[address-family='frr-routing:ipv6']/frr-pim-rp:rp/static-rp/rp-list[rp-address='2001:db8:f::4:17']/group-list]
^Zfish: Job 3, 'sudo /usr/lib/frr/pim6d --log s…' has stopped
sharpd@eva ~/p/r/s/test_modify_mld_max_query_response_timer_p0> bg
Send job 3 “sudo /usr/lib/frr/pim6d --log stdout --log-level debug” to background
sharpd@eva ~/p/r/s/test_modify_mld_max_query_response_timer_p0> sudo /usr/lib/frr/pimd --log stdout --log-level debug --daemon
2023/07/19 16:29:27.236401 PIM: [JBNZN-EVZ5D] VRF Created: default(0)
2023/07/19 16:29:27.236414 PIM: [QF5NQ-EJ8X3] pim_vrf_enable: for default 0
2023/07/19 16:29:27.238995 PIM: [WGYFP-JK6RV] zclient_lookup_sched_now: zclient lookup immediate connection scheduled
2023/07/19 16:29:27.238999 PIM: [PK8MV-NK1RX] zclient_lookup_new: zclient lookup socket initialized
2023/07/19 16:29:27.239552 PIM: [T83RR-8SM5G] pimd 9.1-dev starting: vty@2611
sharpd@eva ~/p/r/s/test_modify_mld_max_query_response_timer_p0> bg
bg: There are no suitable jobs
sharpd@eva ~/p/r/s/test_modify_mld_max_query_response_timer_p0 [1]> 2023/07/19 16:32:51.853457 PIM6: [YXPK3-1W6CV][EC 100663326] yang_dnode_get: found 3 elements (expected 0 or 1) [xpath /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-pim:pimd'][name='pim'][vrf='default']/frr-pim:pim/address-family[address-family='frr-routing:ipv6']/frr-pim-rp:rp/static-rp/rp-list[rp-address='2001:db8:f::4:17']/group-list]


v4 does not

eva(config)# do show run
Building configuration...

Current configuration:
!
frr version 9.1-dev
frr defaults traditional
hostname eva
log timestamp precision 6
no ip forwarding
no ipv6 forwarding
ip pim rp 1.2.3.4 229.1.1.1/32
ip pim rp 1.2.3.4 229.1.1.2/32
ipv6 pim rp 2001:db8:f::4:17 ffbb::4/128
ipv6 pim rp 2001:db8:f::4:17 ffbb::5/128
ipv6 pim rp 2001:db8:f::4:17 ffbb::6/128
service integrated-vtysh-config
!
end

donaldsharp avatar Jul 19 '23 20:07 donaldsharp

PIMv4 prints the same logs when same RP get's multiple ranges of multicast addresses

2023/07/25 23:45:17 PIM: [YXPK3-1W6CV][EC 100663326] yang_dnode_get: found 2 elements (expected 0 or 1) [xpath /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-pim:pimd'][name='pim'][vrf='default']/frr-pim:pim/address-family[address-family='frr-routing:ipv4']/frr-pim-rp:rp/static-rp/rp-list[rp-address='1.0.4.17']/group-list]
2023/07/25 23:45:17 PIM: [YXPK3-1W6CV][EC 100663326] yang_dnode_get: found 3 elements (expected 0 or 1) [xpath /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-pim:pimd'][name='pim'][vrf='default']/frr-pim:pim/address-family[address-family='frr-routing:ipv4']/frr-pim-rp:rp/static-rp/rp-list[rp-address='1.0.4.17']/group-list]
2023/07/25 23:45:17 PIM: [YXPK3-1W6CV][EC 100663326] yang_dnode_get: found 4 elements (expected 0 or 1) [xpath /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-pim:pimd'][name='pim'][vrf='default']/frr-pim:pim/address-family[address-family='frr-routing:ipv4']/frr-pim-rp:rp/static-rp/rp-list[rp-address='1.0.4.17']/group-list]
2023/07/25 23:45:17 PIM: [YXPK3-1W6CV][EC 100663326] yang_dnode_get: found 5 elements (expected 0 or 1) [xpath /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-pim:pimd'][name='pim'][vrf='default']/frr-pim:pim/address-family[address-family='frr-routing:ipv4']/frr-pim-rp:rp/static-rp/rp-list[rp-address='1.0.4.17']/group-list]

Current configuration:

frr version 9.1-dev-MyOwnFRRVersion
frr defaults traditional
hostname r4
log commands
log file /tmp/topotests/multicast_pim_uplink_topo2.test_multicast_pim_uplink_topo2/r4/pimd.log
ip pim rp 1.0.4.17 225.1.1.1/32
ip pim rp 1.0.4.17 225.1.1.2/32
ip pim rp 1.0.4.17 225.1.1.3/32
ip pim rp 1.0.4.17 225.1.1.4/32
ip pim rp 1.0.4.17 225.1.1.5/32

SaiGomathiN avatar Jul 26 '23 07:07 SaiGomathiN

@donaldsharp @choppsv1 : As per the previous update, it seems that the behaviour is same for pimv4 and pimv6. As @choppsv1 was saying that day the return type of the yang api was modified, so could this mean that this error is invalid? This is not an issue.

mobash-rasool avatar Jul 27 '23 06:07 mobash-rasool

The issue is that this function returns a single dnode yet the path being passed to it returns multiple dnodes.

choppsv1 avatar Jul 27 '23 07:07 choppsv1

@AbhishekNR : Please check the keys defined, since the issue is present in both pim and pimv6, I doubt there is some issue in the yang definition wrt the keys.

mobash-rasool avatar Aug 07 '23 06:08 mobash-rasool

@donaldsharp Hi Donald, I tried to reproduce this issue on latest master code. But I was not able to reproduce it, added logs in positive flow and verified it was working as expected. Can you help in reproducing this issue. Thank you.

AbhishekNR avatar Nov 16 '23 10:11 AbhishekNR

This issue is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this issue closed.

github-actions[bot] avatar May 15 '24 01:05 github-actions[bot]

This issue will be automatically closed in the specified period unless there is further activity.

frrbot[bot] avatar May 15 '24 01:05 frrbot[bot]

The point here is that the code is using an API that will only return a singleton result, but the code is querying list data. IOW, it's more important to look at the code and what it's querying and expecting than to try and reproduce a warning message.

choppsv1 avatar May 15 '24 01:05 choppsv1

This issue will no longer be automatically closed.

frrbot[bot] avatar May 15 '24 01:05 frrbot[bot]