05-09-2022 08:49 AM - edited 05-09-2022 08:50 AM
Hi everyone.
After migrating NSO from version 4.7 to version 5.7, when I recompile some of the custom service packages, the following warning is shown:
yang/rsvp-te-tunnel.yang:224: error: the node is config, but refers to a non-config node 'name' defined at /opt/ncs/current/src/ncs/yang/tailf-ncs-devices.yang:3470 yang/rsvp-te-tunnel.yang:224: error: the node is config, but refers to a non-config node 'name' defined at /opt/ncs/current/src/ncs/yang/tailf-ncs-devices.yang:3470 yang/rsvp-te-tunnel.yang:224: error: the node is config, but refers to a non-config node 'name' defined at /opt/ncs/current/src/ncs/yang/tailf-ncs-devices.yang:3470 yang/rsvp-te-tunnel.yang:224: error: the node is config, but refers to a non-config node 'name' defined at /opt/ncs/current/src/ncs/yang/tailf-ncs-devices.yang:3470 yang/rsvp-te-tunnel.yang:243: error: the node is config, but refers to a non-config node 'name' defined at /opt/ncs/current/src/ncs/yang/tailf-ncs-devices.yang:3470 yang/rsvp-te-tunnel.yang:243: error: the node is config, but refers to a non-config node 'name' defined at /opt/ncs/current/src/ncs/yang/tailf-ncs-devices.yang:3470 yang/rsvp-te-tunnel.yang:243: error: the node is config, but refers to a non-config node 'name' defined at /opt/ncs/current/src/ncs/yang/tailf-ncs-devices.yang:3470 yang/rsvp-te-tunnel.yang:243: error: the node is config, but refers to a non-config node 'name' defined at /opt/ncs/current/src/ncs/yang/tailf-ncs-devices.yang:3470
I noticed that the mentioned YANG file lines that seem to display this warning, reference the device NED:
when "count(/ncs:devices/ncs:device[ncs:name=current()/../headend-router]/ncs:module[ncs:name='tailf-ned-cisco-ios']/ncs:name) != 0 or count(/ncs:devices/ncs:device[ncs:name=current()/../headend-router]/ncs:module[ncs:name='tailf-ned-cisco-ios-xr']/ncs:name) != 0"
Does the service's Yang file's reference need to be updated to something else?
Thank you in advance!
Solved! Go to Solution.
05-10-2022 02:15 PM - edited 05-10-2022 02:23 PM
Hello,
I fixed the error that you get during the compilation phase by adding this flags
--allow-interop-issues
Report YANG_ERR_XPATH_REF_BAD_CONFIG as a warning instead of an error. Be advised that this violates RFC7950 section 6.4.1; a constraint on a config true node contains an XPath expression may not refer to a config false node.
You will need to change your makefile
../load-dir/%.fxs: yang/%.yang $(NCSC) --allow-interop-issues `ls $*-ann.yang > /dev/null 2>&1 && echo "-a $*-ann.yang"` \ $(NCSCPATH) -c -o $@ $<
Here what i got before the modification
nabil@DESKTOP-8ECTID4:~/ncs-run-5.8/packages/test-yang/src$ make clean all
rm -rf ../load-dir java/src//
mkdir -p ../load-dir
mkdir -p java/src//
/home/nabil/ncs-5.8/bin/ncsc `ls test-yang-ann.yang > /dev/null 2>&1 && echo "-a test-yang-ann.yang"` \
-c -o ../load-dir/test-yang.fxs yang/test-yang.yang
yang/test-yang.yang:47: error: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
yang/test-yang.yang:47: error: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
yang/test-yang.yang:47: error: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
yang/test-yang.yang:47: error: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
make: *** [Makefile:25: ../load-dir/test-yang.fxs] Error 1
Here after the modification
nabil@DESKTOP-8ECTID4:~/ncs-run-5.8/packages/test-yang/src$ make clean all
rm -rf ../load-dir java/src//
mkdir -p ../load-dir
mkdir -p java/src//
/home/nabil/ncs-5.8/bin/ncsc --allow-interop-issues `ls test-yang-ann.yang > /dev/null 2>&1 && echo "-a test-yang-ann.yang"` \
-c -o ../load-dir/test-yang.fxs yang/test-yang.yang
yang/test-yang.yang:47: warning: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
yang/test-yang.yang:47: warning: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
yang/test-yang.yang:47: warning: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
yang/test-yang.yang:47: warning: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
05-10-2022 02:15 PM - edited 05-10-2022 02:23 PM
Hello,
I fixed the error that you get during the compilation phase by adding this flags
--allow-interop-issues
Report YANG_ERR_XPATH_REF_BAD_CONFIG as a warning instead of an error. Be advised that this violates RFC7950 section 6.4.1; a constraint on a config true node contains an XPath expression may not refer to a config false node.
You will need to change your makefile
../load-dir/%.fxs: yang/%.yang $(NCSC) --allow-interop-issues `ls $*-ann.yang > /dev/null 2>&1 && echo "-a $*-ann.yang"` \ $(NCSCPATH) -c -o $@ $<
Here what i got before the modification
nabil@DESKTOP-8ECTID4:~/ncs-run-5.8/packages/test-yang/src$ make clean all
rm -rf ../load-dir java/src//
mkdir -p ../load-dir
mkdir -p java/src//
/home/nabil/ncs-5.8/bin/ncsc `ls test-yang-ann.yang > /dev/null 2>&1 && echo "-a test-yang-ann.yang"` \
-c -o ../load-dir/test-yang.fxs yang/test-yang.yang
yang/test-yang.yang:47: error: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
yang/test-yang.yang:47: error: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
yang/test-yang.yang:47: error: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
yang/test-yang.yang:47: error: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
make: *** [Makefile:25: ../load-dir/test-yang.fxs] Error 1
Here after the modification
nabil@DESKTOP-8ECTID4:~/ncs-run-5.8/packages/test-yang/src$ make clean all
rm -rf ../load-dir java/src//
mkdir -p ../load-dir
mkdir -p java/src//
/home/nabil/ncs-5.8/bin/ncsc --allow-interop-issues `ls test-yang-ann.yang > /dev/null 2>&1 && echo "-a test-yang-ann.yang"` \
-c -o ../load-dir/test-yang.fxs yang/test-yang.yang
yang/test-yang.yang:47: warning: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
yang/test-yang.yang:47: warning: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
yang/test-yang.yang:47: warning: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
yang/test-yang.yang:47: warning: the node is config, but refers to a non-config node 'name' defined at /home/nabil/ncs-5.8/src/ncs/yang/tailf-ncs-devices.yang:3513
05-11-2022 06:29 AM
This fixed the issue. Thank you!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide