[CONTROLLER-543] Malformed update-lsp RPC gets stuck with no response. Created: 05/Jun/14  Updated: 14/Nov/17  Due: 26/Jun/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: Linux
Platform: PC


External issue ID: 1146

 Description   

This bug is triggered similarly to CONTROLLER-541.

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 "ero" field. Example (verbose) curl number 4:
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":

{"operational":true}

}}' 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), curl does not print any response related text and just keeps waiting indefinitely.

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? Lack of response. For differently malformed RPCs I have seen error code 400 with helpful message, so I expected the same here.



 Comments   
Comment by Vratko Polak [ 19/Jun/14 ]

My guess on what is happening: ODL sends PCUpd message without ERO, router reports tunnel is Down (as it just had lost its path) but ODL waits for it to go Up, which of course never happens. I have not found whether PCUpd with LSP object but without ERO object is valid at all, so I am not even sure error code 400 is the proper reaction.

Comment by Dana Kutenicsova [ 24/Jun/14 ]

Implement a check in Stateful02SessionListenet (pcep-topology-provider), that checks presence of ERO in update-lsp (can be empty). Just for 02, as 07 is being reworked completely.

Comment by Milos Fabian [ 24/Jun/14 ]

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

Comment by Vratko Polak [ 22/Jul/14 ]

The same as in CONTROLLER-541. BGPCEP creates meaningfull exception, but RESTCONF fails to translate in to http status 400, and even hides the exception in DEBUG log level:

2014-07-22 07:54:40.607 PDT [http-bio-8080-exec-2] 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 ERO object.]]

Comment by Jozef Gloncak [ 23/Jul/14 ]

(In reply to Vratko Polák from comment #4)
> The same as in CONTROLLER-541. BGPCEP creates meaningfull exception, but RESTCONF
> fails to translate in to http status 400, and even hides the exception in
> DEBUG log level:
>
> 2014-07-22 07:54:40.607 PDT [http-bio-8080-exec-2] 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 ERO object.]]

probably will be solved with
https://git.opendaylight.org/gerrit/#/c/9257/ from CONTROLLER-541

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.