[CONTROLLER-541] Malformed update-lsp RPC leads to 500 Internal Server Error. Created: 05/Jun/14  Updated: 14/Nov/17  Due: 01/Aug/14  Resolved: 23/Jul/14

Status: Verified
Project: controller
Component/s: restconf
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Vratko Polak Assignee: Jozef Gloncak
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: 1144

 Description   

This may be bug of BGPCEP plugin, but I guess RPC input data validation is a job for restconf component.

Bug was encountered when using ODL configured to use draft-ietf-pce-stateful-pce-02 extension to PCEP in environment with capable PCCs, I do not know how to replicate bug without them.

As a preparation, add-lsp has to be called, here is example curl number 1:
curl -X POST -H "Content-Type:application/yang.data+json" -d '{"input":{"node":"pcc://39.39.39.39","name":"my_name","network-topology-ref":"/network-topology:network-topology/network-topology:topology[network-topology:topology-id=\"pcep-topology\"]","arguments":{"endpoints-obj":{"ipv4":

{"source-ipv4-address":"39.39.39.39","destination-ipv4-address":"43.43.43.43"}

}}}}' 127.0.0.1:8080/restconf/operations/network-topology-pcep:add-lsp

Critical step happens when calling update-lsp without "operational" filed, which is required because of bgpcep/pcep/ietf-stateful02/src/main/yang/odl-pcep-ietf-stateful02.yang lines 246-250. Example (verbose) curl number 2:
curl -v -X POST -H "Content-Type:application/yang.data+json" -d '{"input":{"node":"pcc://39.39.39.39","name":"my_name","network-topology-ref":"/network-topology:network-topology/network-topology:topology[network-topology:topology-id=\"pcep-topology\"]","arguments":{"ero":[{"subobject":{"loose":false,"ip-prefix":

{"ip-prefix":"195.20.160.40/32"}

}},{"subobject":{"loose":false,"ip-prefix":

{"ip-prefix":"201.20.160.43/32"}

}},{"subobject":{"loose":false,"ip-prefix":

{"ip-prefix":"43.43.43.43/32"}

}}]}}}' 127.0.0.1:8080/restconf/operations/network-topology-pcep:update-lsp

This call produces no lines in opendaylight.log (default logback.xml except org.opendaylight.bgpcep set to TRACE), but curl prints message with long stack trace (included at the end of this description).

For comparison, here is correct form of intended update-lsp, as example curl number 3:
curl -X POST -H "Content-Type:application/yang.data+json" -d '{"input":{"node":"pcc://39.39.39.39","name":"my_name","network-topology-ref":"/network-topology:network-topology/network-topology:topology[network-topology:topology-id=\"pcep-topology\"]","arguments":{"operational":true,"ero":[{"subobject":{"loose":false,"ip-prefix":

{"ip-prefix":"195.20.160.40/32"}

}},{"subobject":{"loose":false,"ip-prefix":

{"ip-prefix":"201.20.160.43/32"}

}},{"subobject":{"loose":false,"ip-prefix":

{"ip-prefix":"43.43.43.43/32"}

}}]}}}' 127.0.0.1:8080/restconf/operations/network-topology-pcep:update-lsp

And to get back to initial state (before curl number 1) it seem to be sufficient to just call remove-lsp, using example curl number 0:
curl -X POST -H "Content-Type:application/yang.data+json" -d '{"input":{"node":"pcc://39.39.39.39","name":"my_name","network-topology-ref":"/network-topology:network-topology/network-topology:topology[network-topology:topology-id=\"pcep-topology\"]"}}' 127.0.0.1:8080/restconf/operations/network-topology-pcep:remove-lsp

What is wrong? Error code 500 and exception. For differently malformed RPCs I have seen error code 400 with helpful message, so I expected the same here.

Finally, here is the response of curl number 2:

  • About to connect() to 127.0.0.1 port 8080 (#0)
  • Trying 127.0.0.1...
  • connected
  • Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
    > POST /restconf/operations/network-topology-pcep:update-lsp HTTP/1.1
    > User-Agent: curl/7.27.0
    > Host: 127.0.0.1:8080
    > Accept: /
    > Content-Type:application/yang.data+json
    > Content-Length: 434
    >
  • upload completely sent off: 434 out of 434 bytes
    < HTTP/1.1 500 Internal Server Error
    < Server: Apache-Coyote/1.1
    < Content-Type: /
    < Transfer-Encoding: chunked
    < Date: Thu, 05 Jun 2014 15:52:10 GMT
    < Connection: close
    <
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
    <error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-message>The operation encountered an unexpected error while executing.</error-message>
    <error-info>org.opendaylight.controller.sal.restconf.impl.RestconfDocumentedException: errors: [error-type: application, error-tag: operation-failed, error-message: The operation encountered an unexpected error while executing.error-info: java.lang.NullPointerException
    at org.opendaylight.bgpcep.pcep.topology.provider.Stateful02TopologySessionListener.updateLsp(Stateful02TopologySessionListener.java:224)
    at org.opendaylight.bgpcep.pcep.topology.provider.ServerSessionManager.updateLsp(ServerSessionManager.java:150)
    at org.opendaylight.bgpcep.pcep.topology.provider.TopologyRPCs.updateLsp(TopologyRPCs.java:62)
    at org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.NetworkTopologyPcepService$$Broker$Router.updateLsp(NetworkTopologyPcepService$$Broker$Router.java)
    at org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.NetworkTopologyPcepService$$Broker$DirectProxy.updateLsp(NetworkTopologyPcepService$$Broker$DirectProxy.java)
    at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.opendaylight.controller.sal.binding.impl.connect.dom.RpcInvocationStrategy.uncheckedInvoke(RpcInvocationStrategy.java:131)
    at org.opendaylight.controller.sal.binding.impl.connect.dom.RpcInvocationStrategy.invokeOn(RpcInvocationStrategy.java:157)
    at org.opendaylight.controller.sal.binding.impl.connect.dom.BindingIndependentConnector$DomToBindingRpcForwarder.invokeRpc(BindingIndependentConnector.java:711)
    at org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareRpcBroker$RoutedRpcSelector.invokeRpc(SchemaAwareRpcBroker.java:346)
    at org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareRpcBroker.invokeRpc(SchemaAwareRpcBroker.java:168)
    at org.opendaylight.controller.sal.dom.broker.BrokerImpl.invokeRpcAsync(BrokerImpl.java:75)
    at org.opendaylight.controller.sal.dom.broker.ConsumerContextImpl.rpc(ConsumerContextImpl.java:48)
    at org.opendaylight.controller.sal.restconf.impl.BrokerFacade.invokeRpc(BrokerFacade.java:100)
    at org.opendaylight.controller.sal.restconf.rpc.impl.BrokerRpcExecutor.invokeRpcUnchecked(BrokerRpcExecutor.java:28)
    at org.opendaylight.controller.sal.restconf.rpc.impl.AbstractRpcExecutor.invokeRpc(AbstractRpcExecutor.java:37)
    at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.callRpc(RestconfImpl.java:533)
    at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.invokeRpc(RestconfImpl.java:399)
    at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:440)
    at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:179)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:309)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    , ]]
    at org.opendaylight.controller.sal.restconf.rpc.impl.AbstractRpcExecutor.getRpcResult(AbstractRpcExecutor.java:82)
    at org.opendaylight.controller.sal.restconf.rpc.impl.AbstractRpcExecutor.invokeRpc(AbstractRpcExecutor.java:37)
    at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.callRpc(RestconfImpl.java:533)
    at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.invokeRpc(RestconfImpl.java:399)
    at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:440)
    at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:179)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:309)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NullPointerException
    at org.opendaylight.bgpcep.pcep.topology.provider.Stateful02TopologySessionListener.updateLsp(Stateful02TopologySessionListener.java:224)
    at org.opendaylight.bgpcep.pcep.topology.provider.ServerSessionManager.updateLsp(ServerSessionManager.java:150)
    at org.opendaylight.bgpcep.pcep.topology.provider.TopologyRPCs.updateLsp(TopologyRPCs.java:62)
    at org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.NetworkTopologyPcepService$$Broker$Router.updateLsp(NetworkTopologyPcepService$$Broker$Router.java)
    at org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.NetworkTopologyPcepService$$Broker$DirectProxy.updateLsp(NetworkTopologyPcepService$$Broker$DirectProxy.java)
    at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.opendaylight.controller.sal.binding.impl.connect.dom.RpcInvocationStrategy.uncheckedInvoke(RpcInvocationStrategy.java:131)
    at org.opendaylight.controller.sal.binding.impl.connect.dom.RpcInvocationStrategy.invokeOn(RpcInvocationStrategy.java:157)
    at org.opendaylight.controller.sal.binding.impl.connect.dom.BindingIndependentConnector$DomToBindingRpcForwarder.invokeRpc(BindingIndependentConnector.java:711)
    at org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareRpcBroker$RoutedRpcSelector.invokeRpc(SchemaAwareRpcBroker.java:346)
    at org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareRpcBroker.invokeRpc(SchemaAwareRpcBroker.java:168)
    at org.opendaylight.controller.sal.dom.broker.BrokerImpl.invokeRpcAsync(BrokerImpl.java:75)
    at org.opendaylight.controller.sal.dom.broker.ConsumerContextImpl.rpc(ConsumerContextImpl.java:48)
    at org.opendaylight.controller.sal.restconf.impl.BrokerFacade.invokeRpc(BrokerFacade.java:100)
    at org.opendaylight.controller.sal.restconf.rpc.impl.BrokerRpcExecutor.invokeRpcUnchecked(BrokerRpcExecutor.java:28)
    ... 43 more
    </error-info>
    </error>
    </errors>
  • Closing connection #0


 Comments   
Comment by Tony Tkacik [ 06/Jun/14 ]

Moved to bgpcep as exception happened in Stateful02TopologySessionListener.updateLsp()

Comment by Dana Kutenicsova [ 10/Jun/14 ]

https://git.opendaylight.org/gerrit/#/c/7778/

Comment by Vratko Polak [ 11/Jun/14 ]

This is fragment of verbose response to critical curl as it looks like after merge of https://git.opendaylight.org/gerrit/#/c/7778

  • About to connect() to 127.0.0.1 port 8080 (#0)
  • Trying 127.0.0.1...
  • connected
  • Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
    > POST /restconf/operations/network-topology-pcep:update-lsp HTTP/1.1
    > User-Agent: curl/7.27.0
    > Host: 127.0.0.1:8080
    > Accept: /
    > Content-Type:application/yang.data+json
    > Content-Length: 434
    >
  • upload completely sent off: 434 out of 434 bytes
    < HTTP/1.1 500 Internal Server Error
    < Server: Apache-Coyote/1.1
    < Content-Type: /
    < Transfer-Encoding: chunked
    < Date: Wed, 11 Jun 2014 13:40:52 GMT
    < Connection: close
    <
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
    <error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-message>The operation encountered an unexpected error while executing.</error-message>
    <error-info>org.opendaylight.controller.sal.restconf.impl.RestconfDocumentedException: errors: [error-type: application, error-tag: operation-failed, error-message: The operation encountered an unexpected error while executing.error-info: java.lang.IllegalStateException: Input is missing operational tag.
    at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
    at org.opendaylight.bgpcep.pcep.topology.provider.Stateful02TopologySessionListener.updateLsp(Stateful02TopologySessionListener.java:233)
    at org.opendaylight.bgpcep.pcep.topology.provider.ServerSessionManager.updateLsp(ServerSessionManager.java:149)
    at org.opendaylight.bgpcep.pcep.topology.provider.TopologyRPCs.updateLsp(TopologyRPCs.java:62)

From the looks of it, BGPCEP plugin now uses Preconditions.checkArgument to throw java.lang.IllegalStateException, which according to https://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/base/Preconditions.html
is used to signal that the calling method has made an error.

I guess RESTCONF should expect this kind of exceptions and turn them to "error code 400 with message".
Or BGPCEP developers should be instructed to use another way to signal this kind of errors to RESTCONF.

In any way, I consider this bug to be "not fixed enough" with controller/restconf to be the next assignee.

Comment by Jozef Gloncak [ 23/Jun/14 ]

There is several solutions:

  • in Stateful02TopologySessionListener.updateLsp change row 233 from value
    Preconditions.checkState(args != null, "Input is missing operational tag.");
    to value
    Preconditions.checkArgument(args != null, "Input is missing operational tag.");
    then IllegalArgumentException will be transformed in AbstractRpcExecutor.getRpcResult to exception with error tag invalid-value which is mapped to 400.
  • transform all IllegalStateException to exception with tag invalid-value
  • add to Preconditions.* which were added in previous patch some prefix (to text attribute) which specify how it should be transformed. (e.g. "Input is missing operational tag." -> "invalid-value|Input is missing operational tag.".
Comment by Dana Kutenicsova [ 24/Jun/14 ]

Apply first proposed solution.

Comment by Milos Fabian [ 24/Jun/14 ]

https://git.opendaylight.org/gerrit/#/c/8294/

Comment by Vratko Polak [ 22/Jul/14 ]

> https://git.opendaylight.org/gerrit/#/c/8294/

It seems the bug was fixed on BGPCEP level, but not on RESTCONF level. Returned status code is still 500 (instead of expected 400), and the reason is hidden in DEBUG level:

2014-07-22 07:38:50.886 PDT [http-bio-8080-exec-8] DEBUG o.o.c.s.r.i.RestconfDocumentedExceptionMapper - In toResponse: errors: [error-type: application, error-tag: operation-failed, error-message: The operation encountered an unexpected error while executing.error-info: org.opendaylight.controller.sal.restconf.impl.RestconfDocumentedException: errors: [error-type: protocol, error-tag: invalid-value, error-message: Input is missing operational tag.]]
at org.opendaylight.controller.sal.restconf.rpc.impl.AbstractRpcExecutor.get
RpcResult(AbstractRpcExecutor.java:65)
at org.opendaylight.controller.sal.restconf.rpc.impl.AbstractRpcExecutor.inv
okeRpc(AbstractRpcExecutor.java:35)
at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.callRpc(Restco
nfImpl.java:549)
at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.invokeRpc(Rest
confImpl.java:405)

Seems like RestconfDocumentedException was not recognized by RESTCONF.

Comment by Jozef Gloncak [ 23/Jul/14 ]

(In reply to Vratko Polák from comment #7)
> > https://git.opendaylight.org/gerrit/#/c/8294/
>
> It seems the bug was fixed on BGPCEP level, but not on RESTCONF level.
> Returned status code is still 500 (instead of expected 400), and the reason
> is hidden in DEBUG level:
>
> 2014-07-22 07:38:50.886 PDT [http-bio-8080-exec-8] DEBUG
> o.o.c.s.r.i.RestconfDocumentedExceptionMapper - In toResponse: errors:
> [error-type: application, error-tag: operation-failed, error-message: The
> operation encountered an unexpected error while executing.error-info:
> org.opendaylight.controller.sal.restconf.impl.RestconfDocumentedException:
> errors: [error-type: protocol, error-tag: invalid-value, error-message:
> Input is missing operational tag.]]
> at
> org.opendaylight.controller.sal.restconf.rpc.impl.AbstractRpcExecutor.get
> RpcResult(AbstractRpcExecutor.java:65)
> at
> org.opendaylight.controller.sal.restconf.rpc.impl.AbstractRpcExecutor.inv
> okeRpc(AbstractRpcExecutor.java:35)
> at
> org.opendaylight.controller.sal.restconf.impl.RestconfImpl.callRpc(Restco
> nfImpl.java:549)
> at
> org.opendaylight.controller.sal.restconf.impl.RestconfImpl.invokeRpc(Rest
> confImpl.java:405)
>
>
> Seems like RestconfDocumentedException was not recognized by RESTCONF.

RestconfDocumentedException with error tag INVALID_VALUE (400) was caught in AbstractRpcExecutor class and was wrapped to RestconfDocumentedException with error tag OPERATION_FAILED (500).
Please retest with new sal-rest-connector bundle.
patch
https://git.opendaylight.org/gerrit/#/c/9257/
proposed

Comment by Vratko Polak [ 23/Jul/14 ]

Verified fixed in https://jenkins.opendaylight.org/integration/view/Integration%20jobs/job/integration-master-project-centralized-integration/1675/

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