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

Quay can't start if DB_URI password contains special characters

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Done
    • quay-v3.6.4, quay-v3.6.5
    • None
    • config-tool, quay
    • 0

    Description

      When the DB_URI password contains special characters, Quay 3.6.2 cannot start:

      DB_URI: postgresql://testuser2:test#123%456@172.24.10.50/quay2
      

      During validation:

      | Database               | Could not connect to database. Error: parse "postgresql://testuser2:test": invalid port ":test" after host |     |
      

      If validation is ignored via the IGNORE_VALIDATION=true parameter, the following is reported by sqlalchemy:

      Traceback (most recent call last):
        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/lib64/python3.8/site-packages/psycopg2/__init__.py", line 126, in connect
          conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
      psycopg2.OperationalError: FATAL:  password authentication failed for user "testuser2"
      FATAL:  password authentication failed for user "testuser2"
      

      Putting the password in various quotation marks doesn't work, the only thing that works is changing the password for the user. Marking this as critical, the issue should be resolved as soon as possible.

      Attachments

        Issue Links

          Activity

            People

              syahmed@redhat.com Syed Ahmed
              rhn-support-ibazulic Ivan Bazulic
              luffy zhang luffy zhang
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: