Uploaded image for project: 'Application Controller'
  1. Application Controller
  2. APPC-878

APPC OOM - Aggregated query without GROUP BY error when performing LCM actions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • Beijing Release
    • Beijing Release
    • APPC

      Description:

      APPC encountered an error while performing LCM action (Stop, Start, Rebuild etc...).  The error is related to the sql_mode "only_full_group_by" variable setting.  In versions of APPC utilizing MariaDB versions with MySQL version 5.7.5 or below the error is not seen.  However, OOM is delivered with versions higher than 5.7.5 in BeijingThe default sql_node setting delivered with MySQL beginning in 5.7.5 has "only_full_group_by"  enabled.  The APPC VNF capabilities check queries the sdnctl DB ASDC_REFERENCE table with an aggregated query " select max(internal_version) as maxInternalVersion, artifact_name as artifactName from ASDC_ARTIFACTS where artifact_name in (select artifact_name from ASDC_REFERENCE where vnf_type= '' and file_category = 'capability' )" which now throws an error haulting the flow for the LCM action.

      Error Encountered:

      <log4j:message><![CDATA[<sdnctldb01> Failed to execute: select max(internal_version) as maxInternalVersion, artifact_name as artifactName from ASDC_ARTIFACTS where artifact_name in (select artifact_name from ASDC_REFERENCE where vnf_type= '' and file_category = 'capability' )  with no arguments. ]]></log4j:message>
      <log4j:throwable><![CDATA[java.sql.SQLSyntaxErrorException: (conn=815) In aggregated query without GROUP BY, expression #2 of SELECT list contains nonaggregated column 'sdnctl.ASDC_ARTIFACTS.ARTIFACT_NAME'; this is incompatible with sql_mode=only_full_group_by
              at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:158)
              at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:118)
              at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:235)
              at org.mariadb.jdbc.MariaDbPreparedStatementClient.executeInternal(MariaDbPreparedStatementClient.java:224)
              at org.mariadb.jdbc.MariaDbPreparedStatementClient.execute(MariaDbPreparedStatementClient.java:159)
              at org.mariadb.jdbc.MariaDbPreparedStatementClient.executeQuery(MariaDbPreparedStatementClient.java:173)
              at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_162]
              at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_162]

      Impact:

      LCM Actions fail due to the above error. 

      Workaround:

      The workaround for the issue was to set the sql_mode variable temporarily to what it was prior to using a 5.7.5 or higher DB. sql_mode = NO_ENGINE_SUBSTITUTION.  The, rebuild the APP Controller nodes.  Additionally, the my.cnf file was updated with:

      root@onap-appc-db-0:/etc/mysql/conf.d# cat *
      # Apply this config only on the master.
      [mysqld]
      sql_mode = "NO_ENGINE_SUBSTITUTION"
      log-bin
      [localpathprefix]
      master
      [mysqld]
      server-id=100

      After the changes were made to the my.cnf file the APPC DB pod was rebuilt.

       

            sseabolt sseabolt
            sseabolt sseabolt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: