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

Quay APPD POD was in ERROR status after config Mysql with SSL only support

XMLWordPrintable

      Description:

      This is an issue found when configure quay to use AWS RDS Mysql DB(only support SSL), after login quay configure editor and provide validate Mysql configuration, including SSL Cert, validation was passed, but after click trigger quay redeployment,  Quay new App POD was failed to start, and get following error message.

      Reconfigure Quay after validate Mysql database passed:

      Running init script '/quay-registry/conf/init/nginx_conf_create.sh'
      Running init script '/quay-registry/conf/init/runmigration.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)
      /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)
      Traceback (most recent call last):
        File "/usr/local/bin/alembic", line 8, in <module>
          sys.exit(main())
        File "/usr/local/lib/python3.8/site-packages/alembic/config.py", line 575, in main
          CommandLine(prog=prog).main(argv=argv)
        File "/usr/local/lib/python3.8/site-packages/alembic/config.py", line 569, in main
          self.run_cmd(cfg, options)
        File "/usr/local/lib/python3.8/site-packages/alembic/config.py", line 546, in run_cmd
          fn(
        File "/usr/local/lib/python3.8/site-packages/alembic/command.py", line 298, in upgrade
          script.run_env()
        File "/usr/local/lib/python3.8/site-packages/alembic/script/base.py", line 489, in run_env
          util.load_python_file(self.dir, "env.py")
        File "/usr/local/lib/python3.8/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
          module = load_module_py(module_id, path)
        File "/usr/local/lib/python3.8/site-packages/alembic/util/compat.py", line 173, in load_module_py
          spec.loader.exec_module(module)
        File "<frozen importlib._bootstrap_external>", line 783, in exec_module
        File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
        File "data/migrations/env.py", line 138, in <module>
          run_migrations_online()
        File "data/migrations/env.py", line 105, in run_migrations_online
          connection = engine.connect()
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 2209, in connect
          return self._connection_cls(self, **kwargs)
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 103, in __init__
          else engine.raw_connection()
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 2306, in raw_connection
          return self._wrap_pool_connect(
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/engine/base.py", line 2276, in _wrap_pool_connect
          return fn()
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/pool/base.py", line 303, in unique_connection
          return _ConnectionFairy._checkout(self)
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/pool/base.py", line 773, in _checkout
          fairy = _ConnectionRecord.checkout(pool)
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/pool/base.py", line 492, in checkout
          rec = pool._do_get()
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/pool/impl.py", line 139, in _do_get
          self._dec_overflow()
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
          compat.reraise(exc_type, exc_value, exc_tb)
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/util/compat.py", line 153, in reraise
          raise value
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/pool/impl.py", line 136, in _do_get
          return self._create_connection()
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/pool/base.py", line 308, in _create_connection
          return _ConnectionRecord(self)
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/pool/base.py", line 437, in __init__
          self.__connect(first_connect_check=True)
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/pool/base.py", line 652, in __connect
          connection = pool._invoke_creator(self)
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
          return dialect.connect(*cargs, **cparams)
        File "/usr/local/lib64/python3.8/site-packages/sqlalchemy/engine/default.py", line 489, in connect
          return self.dbapi.connect(*cargs, **cparams)
        File "/usr/local/lib/python3.8/site-packages/pymysql/__init__.py", line 94, in Connect
          return Connection(*args, **kwargs)
        File "/usr/local/lib/python3.8/site-packages/pymysql/connections.py", line 253, in __init__
          self.ctx = self._create_ssl_ctx(ssl)
        File "/usr/local/lib/python3.8/site-packages/pymysql/connections.py", line 333, in _create_ssl_ctx
          ctx = ssl.create_default_context(cafile=ca, capath=capath)
        File "/usr/lib64/python3.8/ssl.py", line 745, in create_default_context
          context.load_verify_locations(cafile, capath, cadata)
      FileNotFoundError: [Errno 2] No such file or directory
      

      Index Image:

      Index image v4.7: registry-proxy.engineering.redhat.com/rh-osbs/iib:44939
      

      Quay Image:

      oc get pod                                   
      NAME                                               READY   STATUS             RESTARTS   AGE
      quay-operator.v3.4.1-7544f7664-855r5               1/1     Running            0          67m
      quayregistry-clair-app-5cd485c4d4-bcdcz            1/1     Running            0          3m50s
      quayregistry-clair-postgres-5d467b778b-prhqd       1/1     Running            0          3m18s
      quayregistry-quay-app-55cc7b4758-kgtxf             1/1     Running            2          51m
      quayregistry-quay-app-d6495796c-96fqk              0/1     Error              5          3m50s
      quayregistry-quay-config-editor-7cd6ccb766-ksc9s   1/1     Running            0          3m50s
      quayregistry-quay-database-6f49cf9fc5-49kwx        1/1     Running            0          51m
      quayregistry-quay-mirror-974b88dbf-zwh8k           0/1     CrashLoopBackOff   4          3m12s
      quayregistry-quay-postgres-init-7kl9j              0/1     Completed          0          51m
      quayregistry-quay-postgres-init-9bnz4              0/1     Completed          0          57m
      quayregistry-quay-redis-797c5ff666-nk7tj           1/1     Running            0          3m50s
      
      oc get pod quayregistry-quay-app-d6495796c-96fqk -o json | jq '.spec.containers[0].image' 
      "registry.redhat.io/quay/quay-rhel8@sha256:bd13bb376f6547fbcb8fa64172dcc4d70d1a5e4cdeb85561784b2824f765abc6"
      

      Steps:

      1. Deploy Quay 3.4.1 with V3.4.1 TNG Operator on AWS using AWS S3 object Storage
      2. Login Quay config editor and choose to edit quay database
      3. Select Mysql and input valid configuration, upload correct SSL Cert of Mysql Server
      4. Click Validations configurations
      5. After validation passed, click reconfigure quay to trigger quay redeployment

      Expected Results:

      Quay new APP POD is in ready status.

      Actual Results:

      Quay new APP POD is in ERROR status.

       

              jonathankingfc Jonathan King
              lzha1981 luffy zhang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: