Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-2108

Quay validation tool gives false errors in output when the same option is declared multiple times

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • None
    • quay
    • False
    • False
    • Quay Enterprise
    • Undefined

      If Quay's config.yaml file contains the same config option twice (copy/paste error for example), the validation tool will detect which option was defined multiple times but it will also give the user errors in other keys which are red herrings making it difficult to debug:

      # docker logs -f quay
         __   __
        /  \ /  \     ______   _    _     __   __   __
       / /\ / /\ \   /  __  \ | |  | |   /  \  \ \ / /
      / /  / /  \ \  | |  | | | |  | |  / /\ \  \   /
      \ \  \ \  / /  | |__| | | |__| | / ____ \  | |
       \ \/ \ \/ /   \_  ___/  \____/ /_/    \_\ |_|
        \__/ \__/      \ \__
                        \___\ by Red Hat
       Build, Store, and Distribute your Containers
      Running all default registry services
      Running init script '/quay-registry/conf/init/certs_create.sh'
      Generating a RSA private key
      ......................................................................................................................................................................................................................++++
      ......................................++++
      writing new private key to 'mitm-key.pem'
      -----
      Running init script '/quay-registry/conf/init/certs_install.sh'
      Installing extra certificates found in /quay-registry/conf/stack/extra_ca_certs directory
      Running init script '/quay-registry/conf/init/copy_config_files.sh'
      Running init script '/quay-registry/conf/init/d_validate_config_bundle.sh'
      Validating Configuration
      yaml: unmarshal errors:
        line 99: mapping key "SECURITY_SCANNER_INDEXING_INTERVAL" already defined at line 82
      +------------------------+------------------------------------------------------------------------+--------+
      |      Field Group       |                                 Error                                  | Status |
      +------------------------+------------------------------------------------------------------------+--------+
      | AccessSettings         | -                                                                      |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | ActionLogArchiving     | -                                                                      |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | AppTokenAuthentication | -                                                                      |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | BitbucketBuildTrigger  | -                                                                      |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | BuildManager           | -                                                                      |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | Database               | DB_URI is required.                                                    |    |
      +------------------------+------------------------------------------------------------------------+--------+
      | DistributedStorage     | DISTRIBUTED_STORAGE_CONFIG must contain at least one storage location. |    |
      +------------------------+------------------------------------------------------------------------+--------+
      | ElasticSearch          | -                                                                      |    |
      +------------------------+------------------------------------------------------------------------+--------+
      | Email                  | -                                                                      |    |
      +------------------------+------------------------------------------------------------------------+--------+
      | GitHubBuildTrigger     | -                                                                      |    |
      +------------------------+------------------------------------------------------------------------+--------+
      | GitHubLogin            | -                                                                      |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | GitLabBuildTrigger     | -                                                                      |   |
      +------------------------+------------------------------------------------------------------------+--------+
      | GoogleLogin            | -                                                                      |    |
      +------------------------+------------------------------------------------------------------------+--------+
      | HostSettings           | SERVER_HOSTNAME is required                                            |    |
      +                        +------------------------------------------------------------------------+--------+
      |                        | SERVER_HOSTNAME must be of type Hostname                               |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | JWTAuthentication      | -                                                                      |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | LDAP                   | -                                                                      |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | OIDC                   | -                                                                      |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | QuayDocumentation      | -                                                                      |    |
      +------------------------+------------------------------------------------------------------------+--------+
      | Redis                  | BUILDLOGS_REDIS is required                                            |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | RepoMirror             | -                                                                      |    |
      +------------------------+------------------------------------------------------------------------+--------+
      | SecurityScanner        | -                                                                      |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | SigningEngine          | -                                                                      |     |
      +------------------------+------------------------------------------------------------------------+--------+
      | TeamSyncing            | -                                                                      |    |
      +------------------------+------------------------------------------------------------------------+--------+
      | TimeMachine            | -                                                                      |    |
      +------------------------+------------------------------------------------------------------------+--------+
      | UserVisibleSettings    | -                                                                      |     |
      +------------------------+------------------------------------------------------------------------+--------+
      

      The graph should either not be printed at all when the error is encountered or it should point exactly to the config option that is the cause of the problem.

      Attached: config.yaml file with the SECURITY_SCANNER_INDEXING_INTERVAL defined twice.

              Unassigned Unassigned
              rhn-support-ibazulic Ivan Bazulic
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: