Uploaded image for project: 'Serverless logic'
  1. Serverless logic
  2. SRVLOGIC-244

[sonataflow-examples] serverless-workflow-loanbroker-example service discovery misconfiguration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.33.0
    • 1.32.0
    • None
    • None

      *Summary*
      Service discovery misconfiguration in application.properties of `loanbroker-flow` application makes the application unable to find lonebroker deployments (banks) and starts terminating after some time.

      If you go to UI and ask for loan, an arror appears

      An error was produced during the serverless workflow instance create attempt, please check that que loanbroker-flow application is running: {"failedNodeId":"_jbpm-unique-4","id":"df9f4f9c-34b3-45b3-8dc4-c73895b7a610","message":"java.net.MalformedURLException - no protocol: services.v1.serving.knative.dev/loanbroker-example/loanbroker-credit-bureau"}
      
      

      ERROR in the pod logs:
      See this URL: https://gist.github.com/domhanak/5d52424c58d85a47e3a80fb8cd3da53c

      It seem the error is rooted in service discovery configuration.

      Example defines these:

      quarkus.knative.env.vars.kogito_service_cluster_url=${knative:services.v1.serving.knative.dev/loanbroker-example/loanbroker-flow}
      quarkus.knative.env.vars.credit_bureau_url=${knative:services.v1.serving.knative.dev/loanbroker-example/loanbroker-credit-bureau}
      quarkus.knative.env.vars.aggregator_url=${kubernetes:services.v1/loanbroker-example/loanbroker-aggregator}
      

      Looks like in 1.13, this is updated?
      https://knative.dev/docs/serving/

      After changing this to:

      quarkus.knative.env.vars.kogito_service_cluster_url=${knative:service.serving.knative.dev/loanbroker-example/loanbroker-flow}
      quarkus.knative.env.vars.credit_bureau_url=${knative:service.serving.knative.devv/loanbroker-example/loanbroker-credit-bureau}
      quarkus.knative.env.vars.aggregator_url=${kubernetes:services.v1/loanbroker-example/loanbroker-aggregator}
      

      We get an error and the loanbroker-flow application complains about serviceaccount being forbidden to access the service url

      Acceptance criteria

      Application is able to discover services defined in properties file
      Application does not terminate and works as expected.

              wmedvede@redhat.com Walter Medvedeo
              dhanak@redhat.com Dominik Hanak
              Dominik Hanak Dominik Hanak
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: