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

Inconsistent COMMIT operation handling when no transactions are present

    XMLWordPrintable

Details

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

    • 4455

    Description

      When the COMMIT RPC operation is requested and the "candidate" configuration does not differ from the "running" configuration, the following error is usually reported:

      <rpc-reply message-id="MMMM" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <rpc-error>
      <error-type>application</error-type>
      <error-tag>operation-failed</error-tag>
      <error-severity>error</error-severity>
      <error-message>No candidateTransaction found for session YYYY</error-message>
      </rpc-error>
      </rpc-reply>

      However when an operation was attempted and the operation fails (such as attempting to delete a nonexistent node), the commit will succeed but it shall fail. This fake success will repeat even when the commit operation is attempted again immediately.

      To hit the bug, run freshly extracted ODL, open a NETCONF connection, send the "hello" message (I don't know how to do that from a bash shell script, I always get "java.lang.IllegalArgumentException: Additional header in wrong format [admin;0:0:0:0:0:0:0:1:56415;ssh;client;], expected [(<username>[^;]);(?<address>[0-9\.])[:/](?<port>[0-9]);(?<transport>[a-z])[^\]]+]" after sending my "hello" message, the only way that works for me is using this suite in Gerrit: https://git.opendaylight.org/gerrit/27672, it reports one test failure with reference to this bug) and then send the following (the important thing is that it shall have no <modules> element in its running configuration when you try to do this, use "<get-config><source><running/></source></get-config>" RPC request to verify that) (also beware, the requests here are NOT tested, the correct ones are in the Gerrit change just mentioned):

      <rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <edit-config xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0">
      <target><candidate/></target>
      <test-option>set</test-option>
      <default-operation>none</default-operation>
      <config xmlns:c="urn:opendaylight:params:xml:ns:yang:controller:config">
      <c:modules a:operation="delete"/>
      </config>
      </edit-config>
      </rpc>
      ]]>]]>
      <rpc message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <commit/>
      </rpc>
      ]]>]]>
      <rpc message-id="3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <commit/>
      </rpc>

      You will obtain:

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <rpc-reply message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <rpc-error>
      <error-type>protocol</error-type>
      <error-tag>data-missing</error-tag>
      <error-severity>error</error-severity>
      <error-message>Data us missing, cannot execute DELETE operation</error-message>
      </rpc-error>
      </rpc-reply>
      ]]>]]>
      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <rpc-reply message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <ok/>
      </rpc-reply>
      ]]>]]>
      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <rpc-reply message-id="3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <ok/>
      </rpc-reply>

      Note that the second and third messages are wrong, they should be:

      <rpc-reply message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <rpc-error>
      <error-type>application</error-type>
      <error-tag>operation-failed</error-tag>
      <error-severity>error</error-severity>
      <error-message>No candidateTransaction found for session 1</error-message>
      </rpc-error>
      </rpc-reply>
      ]]>]]>
      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <rpc-reply message-id="3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <rpc-error>
      <error-type>application</error-type>
      <error-tag>operation-failed</error-tag>
      <error-severity>error</error-severity>
      <error-message>No candidateTransaction found for session 1</error-message>
      </rpc-error>
      </rpc-reply>

      Attachments

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

        Activity

          People

            jmorvay@cisco.com Jakub Morvay
            jbehran@cisco.com Jozef Behran
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: