[CONTROLLER-1117] Error while deleting config:service instance from list (via netconf over restconf) Created: 20/Jan/15  Updated: 04/Jun/15  Resolved: 04/Jun/15

Status: Resolved
Project: controller
Component/s: config
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Vratko Polak Assignee: Tomas Cere
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 2610
Priority: Normal

 Description   

[I guess this bug is in netconf-connector, but such component is missing from Bugzilla's drop-down list.]

Minor severity, as instead of deleting a service directly, one can delete the backing module instead.

On Helium build, after
feature:install odl-bgpcep-all odl-restconf-noauth odl-netconf-connector-all
there is "example-ipv6-topology" service doing basically nothing:

curl -H "Accept:application/json" 127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:services/service/odl-topology-api-cfg:topology-reference/instance/example-ipv6-topology
returns:
{"instance":[

{"name":"example-ipv6-topology","provider":"/modules/module[type='bgp-reachability-ipv6'][name='example-ipv6-topology']"}

]}

(There is also example-ipv4-topology item we want to keep.)

Here is an attempt to delete example-ipv6-topology:
curl -v -X DELETE 127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:services/service/odl-topology-api-cfg:topology-reference/instance/example-ipv6-topology
returns:

  • About to connect() to 10.25.2.9 port 8181 (#0)
  • Trying 10.25.2.9...
  • connected
  • Connected to 10.25.2.9 (10.25.2.9) port 8181 (#0)
    > DELETE /restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:services/service/odl-topology-api-cfg:topology-reference/instance/example-ipv6-topology HTTP/1.1
    > User-Agent: curl/7.27.0
    > Host: 10.25.2.9:8181
    > Accept: /
    >
    < HTTP/1.1 500 Server Error
    < Content-Type: application/json
    < Transfer-Encoding: chunked
    < Server: Jetty(8.1.14.v20131031)
    <
    {
    "errors": {
    "error": [
    {
    "error-type": "application",
    "error-tag": "operation-failed",
    "error-message": "Error while deleting data",
    "error-info": "java.lang.RuntimeException: RemoteDevice {controller-config}: Error while deleting /(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)services/service/service[{(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)type=(urn:opendaylight:params:xml:ns:yang:controller:topology?revision=2013-11-15)topology-reference}]/instance/instance[{(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)name=example-ipv6-topology}]\n\tat org.opendaylight.controller.sal.connect.netconf.sal.tx.NetconfDeviceWriteOnlyTx.delete(NetconfDeviceWriteOnlyTx.java:161)\n\tat
    (and many lines more)


    Here is an interesting part of karaf.log file:
    2015-01-20 16:45:58,729 | WARN | oupCloseable-4-4 | NetconfDeviceCommunicator
    | 242 - org.opendaylight.controller.sal-netconf-connector - 1.1.2.SNAPSHOT | RemoteDevice{controller-config}

    : Error reply from remote device, request: <rpc message-id="m-100" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <edit-config>
    <target>
    <candidate/>
    </target>
    <default-operation>none</default-operation>
    <config>
    <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
    <service>
    <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:topology">x:topology-r
    eference</type>
    <instance xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="delete">
    <name>example-ipv6-topology</name>
    </instance>
    </service>
    </services>
    </config>
    </edit-config>
    </rpc>
    , response: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-100">
    <rpc-error>
    <error-type>application</error-type>
    <error-tag>invalid-value</error-tag>
    <error-severity>error</error-severity>
    <error-message>One element provider expected in XmlElement

    {name='instance', namespace='urn:opendaylight:params:xml:ns:yang:controller:config'}

    </error-message>
    </rpc-error>
    </rpc-reply>

NetconfDocumentedException{message=One element provider expected in XmlElement

{name='instance', namespace='urn:opendaylight:params:xml:ns:yang:controller:config'}

, errorType=application, errorTag=invalid_value, errorSeverity=error, errorInfo=null}
at org.opendaylight.controller.netconf.api.NetconfDocumentedException.fromXMLDocument(NetconfDocumentedException.java:245)

It looks like RPC has delete operation on 'instance' list, instead of just 'example-ipv6-topology' item.
Am I doing something wrong or is this really a bug?



 Comments   
Comment by Tony Tkacik [ 21/Jan/15 ]

This seems to be bug / missing feature / documentation in Netconf / Config subsystem,
remove RPC seems to be OK according to YANG model (even namespace
of instance element is correct urn:opendaylight:params:xml:ns:yang:controller:config

But not sure if removing service instances is supported by config subsystem.

Comment by Maros Marsalek [ 21/Jan/15 ]

Looks like an issue (bug, outdated parsing) in edit-config operation when deleting services. Needs to be fixed

Comment by Tomas Cere [ 28/May/15 ]

master:
https://git.opendaylight.org/gerrit/#/c/21322/
stable/lithium:
https://git.opendaylight.org/gerrit/#/c/21296/

Generated at Wed Feb 07 19:54:44 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.