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

Quay App POD was failed to start after restore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • quay-v3.5.7
    • documentation, quay
    • False
    • False

      Description:

      This is an issue found when following the docs to backup and restore Quay, after restore the Quay Database, Quay APP POD was failed to start.

      Source Quay: 3.5.7

      Target Quay: 3.5.7

      Docs: https://stevsmit.github.io/quay-docs/#back-up-and-restore-red-hat-quay

      By manually check the table with the credentials used by Quay ,get the same error.

      quay357-quay-database=> select * from imagestoragelocation;
      ERROR:  permission denied for relation imagestoragelocation 
      oc get pod
      NAME                                          READY   STATUS      RESTARTS   AGE
      quay-operator.v3.5.7-6599757f-snh8b           1/1     Running     0          52m
      quay357-clair-app-78cb844c66-qqbgt            1/1     Running     1          39m
      quay357-clair-postgres-77cdc994f7-5ls2d       1/1     Running     0          38m
      quay357-quay-app-5c57f46679-h2gsq             0/1     Error       1          29s
      quay357-quay-app-upgrade-87jdr                0/1     Completed   0          39m
      quay357-quay-config-editor-5b4cdf57c6-vnqnk   1/1     Running     0          39m
      quay357-quay-database-855666fc87-r6hjr        1/1     Running     0          39m
      quay357-quay-postgres-init-4p9wd              0/1     Completed   0          39m
      quay357-quay-redis-65cc948d7d-tcdjn           1/1     Running     0          39m 
      oc logs quay357-quay-app-5c57f46679-h2gsq
         __   __
        /  \ /  \     ______   _    _     __   __   __
       / /\ / /\ \   /  __  \ | |  | |   /  \  \ \ / /
      / /  / /  \ \  | |  | | | |  | |  / /\ \  \   /
      \ \  \ \  / /  | |__| | | |__| | / ____ \  | |
       \ \/ \ \/ /   \_  ___/  \____/ /_/    \_\ |_|
        \__/ \__/      \ \__
                        \___\ by Red Hat
       Build, Store, and Distribute your Containers
      Running all default registry services without migration
      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
      Installing extra cert /quay-registry/conf/stack/extra_ca_cert_service-ca.crt
      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
      plpgsql
      pg_trgm
      +------------------------+-------+--------+
      |      Field Group       | Error | Status |
      +------------------------+-------+--------+
      | AccessSettings         | -     | 🟢     |
      +------------------------+-------+--------+
      | ActionLogArchiving     | -     | 🟢     |
      +------------------------+-------+--------+
      | AppTokenAuthentication | -     | 🟢     |
      +------------------------+-------+--------+
      | BitbucketBuildTrigger  | -     | 🟢     |
      +------------------------+-------+--------+
      | BuildManager           | -     | 🟢     |
      +------------------------+-------+--------+
      | Database               | -     | 🟢     |
      +------------------------+-------+--------+
      | DistributedStorage     | -     | 🟢     |
      +------------------------+-------+--------+
      | ElasticSearch          | -     | 🟢     |
      +------------------------+-------+--------+
      | Email                  | -     | 🟢     |
      +------------------------+-------+--------+
      | GitHubBuildTrigger     | -     | 🟢     |
      +------------------------+-------+--------+
      | GitHubLogin            | -     | 🟢     |
      +------------------------+-------+--------+
      | GitLabBuildTrigger     | -     | 🟢     |
      +------------------------+-------+--------+
      | GoogleLogin            | -     | 🟢     |
      +------------------------+-------+--------+
      | HostSettings           | -     | 🟢     |
      +------------------------+-------+--------+
      | JWTAuthentication      | -     | 🟢     |
      +------------------------+-------+--------+
      | LDAP                   | -     | 🟢     |
      +------------------------+-------+--------+
      | OIDC                   | -     | 🟢     |
      +------------------------+-------+--------+
      | QuayDocumentation      | -     | 🟢     |
      +------------------------+-------+--------+
      | Redis                  | -     | 🟢     |
      +------------------------+-------+--------+
      | RepoMirror             | -     | 🟢     |
      +------------------------+-------+--------+
      | SecurityScanner        | -     | 🟢     |
      +------------------------+-------+--------+
      | SigningEngine          | -     | 🟢     |
      +------------------------+-------+--------+
      | TeamSyncing            | -     | 🟢     |
      +------------------------+-------+--------+
      | TimeMachine            | -     | 🟢     |
      +------------------------+-------+--------+
      | UserVisibleSettings    | -     | 🟢     |
      +------------------------+-------+--------+
      Running init script '/quay-registry/conf/init/nginx_conf_create.sh'
      Running init script '/quay-registry/conf/init/supervisord_conf_create.sh'
      Running init script '/quay-registry/conf/init/zz_boot.sh'
      /quay-registry/data/secscan_model/__init__.py:28: DeprecationWarning: Call to deprecated class V2SecurityScanner. (Will be replaced by a V4 API security scanner soon)
        self._legacy_model = V2SecurityScanner(app, instance_keys, storage)
      Failed to validate security scanner V2 configuration
      /quay-registry/data/secscan_model/__init__.py:30: DeprecationWarning: Call to deprecated class NoopV2SecurityScanner. (Will be replaced by a V4 API security scanner soon)
        self._legacy_model = NoopV2SecurityScanner()
      Traceback (most recent call last):
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3057, in execute_sql
          cursor.execute(sql, params or ())
      psycopg2.errors.InsufficientPrivilege: permission denied for relation imagestoragelocation
      During handling of the above exception, another exception occurred:Traceback (most recent call last):
        File "./boot.py", line 144, in <module>
          main()
        File "./boot.py", line 135, in main
          sync_database_with_config(app.config)
        File "/quay-registry/util/config/database.py", line 13, in sync_database_with_config
          model.image.ensure_image_locations(*location_names)
        File "/quay-registry/data/model/image.py", line 485, in ensure_image_locations
          for location in locations:
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 6731, in __iter__
          self.execute()
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 1845, in inner
          return method(self, database, *args, **kwargs)
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 1916, in execute
          return self._execute(database)
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 2087, in _execute
          cursor = database.execute(self)
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3070, in execute
          return self.execute_sql(sql, params, commit=commit)
        File "/quay-registry/data/database.py", line 224, in execute_sql
          cursor = super(RetryOperationalError, self).execute_sql(sql, params, commit)
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3064, in execute_sql
          self.commit()
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 2831, in __exit__
          reraise(new_type, new_type(exc_value, *exc_args), traceback)
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 183, in reraise
          raise value.with_traceback(tb)
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3057, in execute_sql
          cursor.execute(sql, params or ())
      peewee.ProgrammingError: permission denied for relation imagestoragelocation 

            rhn-support-stevsmit Steven Smith
            lzha1981 luffy zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: