Validations

As part of exporting custom extensions process the following validations are performed by the export tool on your customizations to ensure that they conform to the cloud deployment standards.

Note: When running export tool on the devtoolkit_extensions.xml file, if any of these validations fail, the validate target fails and tool throws an exception message detailing the corresponding error and where the validation fails first. The tool creates the customization package only if all the validation errors are fixed.

Validating custom log4j configuration file

A series of validations are performed on the custom log4j config file before the customization package jar is created using the export command to make it suitable for cloud deployment. Following validations are performed on custom log4j configuration file:
  • The tool validates that the custom log4j configuration file is present only in the <runtime_sandbox>/extensions directory. For example, if the yfs.log4j.configuration property is set to /resources/extn/<custom_filename>.xml, it is assumed that the <custom_filename>.xml file is available in the <runtime_sandbox>/extensions/global/resources directory.
    Note: If this file is present in any other directory, an error message is displayed.
  • The following validations are performed on appender (system provided or custom) or category (system provided or custom) definitions present in the custom log4j configuration file:
    • The tool validates that an appender (system provided or custom) or category (system provided or custom) is not defined more than once.
    • The tool validates that any appender (system provided or custom) referred to in any category (system provided or custom) is defined in the custom log4j configuration file.
    • The tool validates that all the system provided appender and category definitions which are present in the system provided log4j configuration file are also present in the custom log4j configuration file.
      Note: The custom log4j configuration file can contain additional appender and category definitions.
    • The tool validates that the following attributes or parameters are not changed in the system provided appender definitions:
      • name
      • class
      • rotateLogs
      • maxLogSize
      • maxNumLogs
      • maxFileSize
      • maxBackupIndex
    • For attribute file in a system provided appender, the tool checks if the file name contains ${IBM_LOG_FILE} and is of the format <prefix>${IBM_LOG_FILE}.log. Only file name that conform to these rules can be changed to this format <prefix>${IBM_LOG_FILE}<custom tags>​.log.

    • The tool validates that no changes have been made to any system provided attributes, priority, level or appender references in the system provided categories.
    • Following validations are performed for custom appender definitions:

      If the custom appender is of type SCIAppender, the tool validates that rotateLogs attribute is to true and maxLogSize and maxNumLogs attributes are defined and that their product is not exceeding 1 million.

      If the custom appender is of type RollingFileAppender, the tool validates that MaxFileSize (default 10MB) and MaxBackupIndex (default 1) attributes if defined do not have their product greater than 100MB.

Validating custom properties

The tool performs a series of validations on custom properties added in the customer_override.properties file to ensure that they conform to the cloud deployment standards. Following validations are performed on custom properties:

The tool validates that custom properties defined in the customer_override.properties file belong to the following services only:
  • yfs
  • xapirest
  • elasticsearch
  • logfilter
  • dbclassCache
  • jdbcService (of the pattern jdbcService.*.prop_* )
Note: For the above listed services, the tool fails the custom properties validation defined for the properties with DATABASE_SUPPORT=Y. The tool also skips the custom properties defined for properties which are in the yfs.yfs.logall* format.