Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-1117

Error while deleting config:service instance from list (via netconf over restconf)

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • Helium
    • None
    • config
    • None
    • Operating System: All
      Platform: All

    • 2610
    • 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?

      Attachments

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

        Activity

          People

            tcere Tomas Cere
            vrpolak Vratko Polak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: