-
Bug
-
Resolution: Done
-
Highest
-
Dublin Release
-
None
Exactly that.
the line
responseObserver.onNext(response(executionServiceInput).toProto())
calls response on the input. the response method does not add a payload to the output, only if a failure occurs:
private fun response(executionServiceInput: ExecutionServiceInput, errorMessage: String = "", failure: Boolean = false): ExecutionServiceOutput { val executionServiceOutput = ExecutionServiceOutput() executionServiceOutput.commonHeader = executionServiceInput.commonHeader * executionServiceOutput.*actionIdentifiers = executionServiceInput.actionIdentifiers * ** *val status = Status() if (failure)
{ executionServiceOutput.*payload* = JsonNodeFactory._instance_.objectNode() *<<< payload is set only here* setErrorStatus(errorMessage, status) }else
{ status.*eventType* = EventType.*EVENT_COMPONENT_PROCESSING*.*name* ** status.*code* = 200 status.*message* = BluePrintConstants.*STATUS_PROCESSING* ** }executionServiceOutput.status = status return executionServiceOutput}
because of that, the response never get a payload in a successful run.
I was about to write a message about this asking what i could use as the response payload - saved me a lot of typing
Will test your fix, Alexis.
Yuriy, I am using latest master.
On 22/05/2019 16:33, de Talhouet, Alexis wrote:
Ok, I know what is going on.
When doing sync processing, we return the output generated by the processing.
But when we do async, we return on output that we craft. That output was missing the payload property.
Please try this fix: https://gerrit.onap.org/r/c/ccsdk/cds/+/88274
Thanks,
Alexis
On May 22, 2019, at 11:24 AM, MALAKOV, YURIY <ym9479@att.com> wrote:
+ Alexis
Thank You Rodrigo for the update
<image001.png>
Yuriy Malakov
SDN-CP Lead Engineer
732-420-3030, [Q-Chat|qto://talk/ym9479]
From: Rodrigo Ottero <rodrigo.ottero@est.tech>
Sent: Wednesday, May 22, 2019 11:23 AM
To: MALAKOV, YURIY <ym9479@att.com>
Cc: Henry Xie <henry.xie@est.tech>
Subject: CDS side of SO-1587
Hi Yuriy,
I built a local env to test and debug SO gRPC requests to CDS and it seems we have a problem with ASYNC requests.
I am still investigating, but I reproduced the same error message Henry got (error due to payload not being late initialized):
CDS-side log:
16:15:02.678 [DefaultDispatcher-worker-10] INFO RestconfConfigDeploy - Ended execution of process method
16:15:02.678 [DefaultDispatcher-worker-10] INFO o.o.c.c.b.s.execution.AbstractComponentFunction - Preparing Response...
16:15:02.678 [DefaultDispatcher-worker-10] INFO c.o.c.c.c.core.service.BluePrintRuntimeService - resolveNodeTemplateInterfaceOperationOutputs for node template (config-deploy),interface name (ComponentRestconfExecutor), operationName(process)
16:15:02.678 [DefaultDispatcher-worker-10] INFO c.o.c.c.c.core.service.BluePrintRuntimeService - resolveWorkflowOutputs for workflow(config-deploy)
Exception in thread "DefaultDispatcher-worker-10" java.lang.IllegalStateException: call is closed
at com.google.common.base.Preconditions.checkState(Preconditions.java:507)
at io.grpc.internal.ServerCallImpl.sendHeaders(ServerCallImpl.java:89)
at io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onNext(ServerCalls.java:341)
at org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.ExecutionServiceHandler$process$2.invokeSuspend(ExecutionServiceHandler.kt:82)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)
SO-side log:
16:15:01.726 [pool-3-thread-1] || INFO
org.onap.so.client.cds.CDSProcessingHandler - Processing blueprint(1.0.0:configuration_over_restconf) for action(1.0.0)
16:15:01.810 [grpc-default-executor-0] || ERROR
org.onap.so.client.cds.AbstractCDSProcessingBBUtils - Failed processing blueprint Status
io.grpc.StatusRuntimeException: INTERNAL: lateinit property payload has not been initialized
at io.grpc.Status.asRuntimeException(Status.java:530)
Debugging, I saw that the payload was received by CDS as expected:
<image002.png>
But somehow CDS lost that content during the preparation of response:
<image003.png>
Changing the request mode to SYNC seems to eliminate the error:
16:20:42.564 [grpc-default-executor-7] INFO o.o.c.c.b.s.execution.AbstractComponentFunction - Preparing Response...
16:20:42.564 [grpc-default-executor-7] INFO c.o.c.c.c.core.service.BluePrintRuntimeService - resolveNodeTemplateInterfaceOperationOutputs for node template (config-deploy),interface name (ComponentRestconfExecutor), operationName(process)
16:20:42.564 [grpc-default-executor-7] INFO c.o.c.c.c.core.service.BluePrintRuntimeService - resolveWorkflowOutputs for workflow(config-deploy)
16:20:42.565 [grpc-default-executor-7] INFO o.o.c.c.b.s.api.BluePrintProcessingGRPCHandler - Completed
I am now changing back the request mode to ASYNC and investigate what is happening.
//Rodrigo
External Email: __ Please use caution when opening links and attachments / _ _Courriel externe: __ Soyez prudent avec les liens et documents joints __
- mentioned in
-
Page Loading...