[NETCONF-110] unable to configure ODL BGP via RESTCONF PUT to config:modules in latest 0.4.0 releases Created: 10/Dec/15 Updated: 15/Mar/19 Resolved: 15/Dec/15 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Giles Heron | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Attachments: |
|
| External issue ID: | 4755 |
| Description |
|
recent 0.4.0 releases (at least since the beginning of December, and possibly older - the last one I have that worked is mid-Oct) fail when trying to configure e.g. the BGP RIB using a PUT to /restconf/config/network-topology:network-topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:rib-impl/example-bgp-rib. the error I get ends with: ------ : Edit candidate failed: [RpcError [message=Unexpected error, severity=ERROR, errorType=APPLICATION, tag=operation-failed, applicationTag=null, info=<error>java.lang.IllegalStateException: Unable to resolve value AttributeConfigElement [defaultValue=null, value=[MappedDependency {namespace='urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl', serviceName='bgp-table-type', refName='ipv4-unicast'}, MappedDependency {namespace='urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl', serviceName='bgp-table-type', refName='ipv6-unicast'}, MappedDependency {namespace='urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl', serviceName='bgp-table-type', refName='linkstate'}, MappedDependency {namespace='urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl', serviceName='bgp-table-type', refName='flowspec'}]] to attribute local-table</error>, cause=null]], errorType=application, errorTag=operation_failed, errorSeverity=warning, errorInfo={}}\n\tat org.opendaylight.netconf.sal.connect.netconf.sal.tx.AbstractWriteTx.invokeBlocking(AbstractWriteTx.java:69)\n\tat org.opendaylight.netconf.sal.connect.netconf.sal.tx.WriteCandidateTx.editConfig(WriteCandidateTx.java:188)\n\tat org.opendaylight.netconf.sal.connect.netconf.sal.tx.AbstractWriteTx.put(AbstractWriteTx.java:112)\n\t... 59 more\n" Logs attached. |
| Comments |
| Comment by Giles Heron [ 10/Dec/15 ] |
|
Attachment karaf.zip has been added with description: zipped logs |
| Comment by Vratko Polak [ 14/Dec/15 ] |
|
I have tried to reproduce, but it seems to work for me. Is is just because your URL is missing /topology/ just before /topology-netconf/ (probably not, error is different). Here is an example curl command (really long because all the data needed). curl -H "Content-type:application/xml" -H "Accept:application/xml" -X PUT -d '<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config"><type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-impl</type><name>example-bgp-rib</name><session-reconnect-strategy xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">x:reconnect-strategy-factory</type><name>example-reconnect-strategy-factory</name></session-reconnect-strategy><rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">example-bgp-rib</rib-id><extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type><name>global-rib-extensions</name></extensions><codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type><name>runtime-mapping-singleton</name></codec-tree-factory><openconfig-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp-openconfig-spi">x:bgp-openconfig-provider</type><name>openconfig-bgp</name></openconfig-provider><tcp-reconnect-strategy xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">x:reconnect-strategy-factory</type><name>example-reconnect-strategy-factory</name></tcp-reconnect-strategy><local-as xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">64496</local-as><data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-async-data-broker</type><name>pingpong-binding-data-broker</name></data-provider><bgp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type>bgp-dispatcher</type><name>global-bgp-dispatcher</name></bgp-dispatcher><dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type><name>inmemory-data-broker</name></dom-data-provider><local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type>bgp-table-type</type><name>ipv4-unicast</name></local-table><local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type>bgp-table-type</type><name>ipv6-unicast</name></local-table><local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type>bgp-table-type</type><name>linkstate</name></local-table><local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type>bgp-table-type</type><name>ipv4-flowspec</name></local-table><local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type>bgp-table-type</type><name>ipv6-flowspec</name></local-table><local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"><type>bgp-table-type</type><name>labeled-unicast</name></local-table><bgp-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">192.0.2.3</bgp-rib-id></module>' 127.0.0.1:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:rib-impl/example-bgp-rib GET curl to confirm the change (in bgp-rib-id) was applied: |
| Comment by Giles Heron [ 14/Dec/15 ] |
|
Of course that was a typo in the URL I gave. The correct URL is: /restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:rib-impl/example-bgp-rib the data I PUT is: { "module" : [ , , , , , , , { "type": "odl-bgp-rib-impl-cfg:bgp-table-type", "name": "flowspec" } ], , , , this all works fine with lithium/stable, and with "older" releases of master (from October). is this related to the fact that /restconf/config/network-topology:network-topology no longer works? |
| Comment by Giles Heron [ 14/Dec/15 ] |
|
Of course that was a typo in the URL I gave. The correct URL is: /restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:rib-impl/example-bgp-rib the data I PUT is: { "module" : [ , , , , , , , { "type": "odl-bgp-rib-impl-cfg:bgp-table-type", "name": "flowspec" } ], , , , this all works fine with lithium/stable, and with "older" releases of master (from October). is this related to the fact that /restconf/config/network-topology:network-topology no longer works? |
| Comment by Vratko Polak [ 15/Dec/15 ] |
|
> serviceName='bgp-table-type', refName='flowspec' This seem to be the issue, in Beryllium the service got renamed (to distinguish from ipv6-based one): That was the user error part. Comparing with result of Json GET I see more changes, so you may want to do more changes than just rename to 'ipv4-flowspec' when on Beryllium. |
| Comment by Giles Heron [ 15/Dec/15 ] |
|
ah yes - should have tried a GET on the existing config and used that as a template for my PUT |