Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-790

Restconf fails to handle non-existent data

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Highest
    • Resolution: Done
    • 2.0.0
    • 2.0.1
    • Restconf

    Description

      This is detected by https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1/bgpcep-csit-1node-userfeatures-all-phosphorus/91/odl_1/odl1_karaf.log.gz where we get:

      2021-07-07T18:27:00,946 | INFO  | qtp2139318170-336 | RestconfImpl                     | 398 - org.opendaylight.netconf.restconf-nb-bierman02 - 2.0.0 | Location for instance identifier /(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2018-03-29)application-rib/application-rib[{(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2018-03-29)id=127.0.0.12}]/tables/tables[{(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2018-03-29)afi=(urn:opendaylight:params:xml:ns:yang:bgp-types?revision=2020-01-20)ipv6-address-family, (urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2018-03-29)safi=(urn:opendaylight:params:xml:ns:yang:bgp-types?revision=2020-01-20)unicast-subsequent-address-family}]/routes/(urn:opendaylight:params:xml:ns:yang:bgp-inet?revision=2018-03-29)ipv6-routes/ipv6-route/ipv6-route[{(urn:opendaylight:params:xml:ns:yang:bgp-inet?revision=2018-03-29)route-key=1:1:1::1/128, (urn:opendaylight:params:xml:ns:yang:bgp-inet?revision=2018-03-29)path-id=1}] was not created
      com.google.common.base.VerifyException: No child matching (urn:opendaylight:params:xml:ns:yang:bgp-inet?revision=2018-03-29)ipv6-routes found
      	at com.google.common.base.Verify.verify(Verify.java:124) ~[bundleFile:?]
      	at com.google.common.base.Verify.verifyNotNull(Verify.java:500) ~[bundleFile:?]
      	at org.opendaylight.yangtools.yang.model.api.DataNodeContainer.getDataChildByName(DataNodeContainer.java:84) ~[bundleFile:?]
      	at org.opendaylight.netconf.sal.restconf.impl.ControllerContext.dataNodeChildByQName(ControllerContext.java:506) ~[bundleFile:?]
      	at org.opendaylight.netconf.sal.restconf.impl.ControllerContext.childByQName(ControllerContext.java:474) ~[bundleFile:?]
      	at org.opendaylight.netconf.sal.restconf.impl.ControllerContext.childByQName(ControllerContext.java:494) ~[bundleFile:?]
      	at org.opendaylight.netconf.sal.restconf.impl.ControllerContext.toFullRestconfIdentifier(ControllerContext.java:309) ~[bundleFile:?]
      	at org.opendaylight.netconf.sal.restconf.impl.RestconfImpl.resolveLocation(RestconfImpl.java:1001) ~[bundleFile:?]
      	at org.opendaylight.netconf.sal.restconf.impl.RestconfImpl.createConfigurationData(RestconfImpl.java:983) ~[bundleFile:?]
      	at org.opendaylight.netconf.sal.restconf.impl.RestconfImpl.createConfigurationData(RestconfImpl.java:909) ~[bundleFile:?]
      	at org.opendaylight.netconf.sal.restconf.impl.StatisticsRestconfServiceWrapper.createConfigurationData(StatisticsRestconfServiceWrapper.java:161) ~[bundleFile:?]
      	at org.opendaylight.netconf.sal.rest.impl.RestconfCompositeWrapper.createConfigurationData(RestconfCompositeWrapper.java:86) ~[bundleFile:?]
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

      This boils down to porting damage with yangtools-7, as the semantics of getDataChildByName() has changed to force existence. I think this was hidden by the sheer deprecation warnings in bierman02.

      Audit all callers of getDataChildByName() and convert them as appropriate.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: