Uploaded image for project: 'Common Controller SDK'
  1. Common Controller SDK
  2. CCSDK-3381

onap-network-name-gen o.h.engine.jdbc.spi.SqlExceptionHelper

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Istanbul Release
    • Honolulu Maintenance Release 1
    • None
    • None

      Problem overview

      Subsequent instantiation fails with the following error:

      STATUS: Error Source: SDNC, Error Message: Failed to create self-serve assignment for vnf with vnf-id=90d6e736-2e8c-4ac3-a3ca-7ad68177719a with error: Encountered error from self-serve-generate-name with error: Error from NameGenerationNode Assign FLOW STATUS: Execution of UnassignVnfBB has completed successfully, next invoking UnassignServiceInstanceBB (Execution Path progress: BBs completed = 1; BBs remaining = 1). TASK INFORMATION: Last task executed: Call SDNC
      

      Details

      This is caused by onap-network-name-gen MS.

      During name generation, this MS has a problem with connecting to DB:

      2021-06-09 12:57:45.348  INFO 13 --- [io-8080-exec-11] o.o.c.a.m.n.c.s.rs.RestServiceImpl: Received request: elements: [{resource-name=vnf_name, resource-value=${vnf_name}, external-key=1117e94e-5bf4-4335-adf1-7266356e2e0b_vnf_name,                                                             policy-instance-name=SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP, naming-type=VNF, AIC_CLOUD_REGION=RegionOne}]
      2021-06-09 12:57:46.051  WARN 13 --- [io-8080-exec-11] o.h.engine.jdbc.spi.SqlExceptionHelper: 
      SQL Error: -1, SQLState: 080002021-06-09 12:57:46.052 ERROR 13 --- [io-8080-exec-11] o.h.engine.jdbc.spi.SqlExceptionHelper: 
      Could not connect to address=(host=mariadb-galera)(port=3306)(type=master) : (conn=54429) could not load system variables2021-06-09 12:57:46.071  WARN 13 --- [io-8080-exec-11] o.o.c.a.m.n.c.s.rs.RestServiceImpl: 
      Could not open JPA EntityManager for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: 
      Unable to acquire JDBC Connection
      

       

      To reproduce this behavior send multiple requests to this MS to trigger name generation:

      kubectl expose pods onap-network-name-gen-6b85d998b-wvxrd --port=8080 --type=LoadBalancer
      
      curl --location --request POST 'http://{{k8s}}:{{exposed_port}}/web/service/v1/genNetworkElementName' \
      --header 'Content-Type: application/json' \
      --data-raw '{
         "elements":[
            {
               "resource-name":"vnf_name",
               "resource-value":"${vnf_name}",
               "external-key":"854e3d01-558d-4c21-829b-c3f11bbf201a",
               "policy-instance-name":"SDNC_Policy.ONAP_NF_NAMING_TIMESTAMP",
               "naming-type":"VNF",
               "AIC_CLOUD_REGION":"RegionOne"
            }
         ]
      }'
      

      where: "external-key": "${vnf-id}".

       

      This can be connected with TableStructure generator which is used by MySQL since there is no native support for sequencesDialect, and this causes deadlock. This issue is described here: https://hibernate.atlassian.net/browse/HHH-11825

      Solution

      1. Add retry mechanism
      2. Adjust spring configuration
      3. Something else?

            krystian krystian
            krystian krystian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: