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

Quay can't send out verify mail when create new quay users after enabled SMTP

XMLWordPrintable

      Description:

      This is an issue found when create new quay user after enabled SMTP, after input valid info of new users, click 'create new account', get error 'Could not send email. Please contact an administrator and report this problem. ', checked Quay App Pod logs, get following error "ValueError: unknown reasons", see details in attached quay app pod logs.

      Note: this issue was found when quay was deployed on OCP with FIPS enabled.

      gunicorn-web stdout | 2021-03-29 02:55:18,409 [254] [ERROR] [util.useremails] Error while trying to send email to tom002@redhat.com
      gunicorn-web stdout | Traceback (most recent call last):
      gunicorn-web stdout |   File "/quay-registry/util/useremails.py", line 70, in send_email
      gunicorn-web stdout |     mail.send(msg)
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/flask_mail.py", line 491, in send
      gunicorn-web stdout |     with self.connect() as connection:
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/flask_mail.py", line 144, in __enter__
      gunicorn-web stdout |     self.host = self.configure_host()
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/flask_mail.py", line 165, in configure_host
      gunicorn-web stdout |     host.login(self.mail.username, self.mail.password)
      gunicorn-web stdout |   File "/usr/lib64/python3.8/smtplib.py", line 723, in login
      gunicorn-web stdout |     (code, resp) = self.auth(
      gunicorn-web stdout |   File "/usr/lib64/python3.8/smtplib.py", line 642, in auth
      gunicorn-web stdout |     authobject(challenge).encode('ascii'), eol='')
      gunicorn-web stdout |   File "/usr/lib64/python3.8/smtplib.py", line 654, in auth_cram_md5
      gunicorn-web stdout |     return self.user + " " + hmac.HMAC(
      gunicorn-web stdout |   File "/usr/lib64/python3.8/hmac.py", line 163, in __new__
      gunicorn-web stdout |     result = _hmacopenssl.HMAC.__new__(cls, key, digestmod=name)
      gunicorn-web stdout | ValueError: unknown reasons
      nginx stdout | 10.131.0.76 () - - [29/Mar/2021:02:55:18 +0000] "POST /api/v1/user/ HTTP/2.0" 400 93 "https://quayregistry-quay-quay-enterprise.apps.quay-fips-610.qe.devcluster.openshift.com/repository/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:87.0) Gecko/20100101 Firefox/87.0" (0.728 720 0.728)
      

      Quay Version:

      oc get pod
      NAME                                               READY   STATUS      RESTARTS   AGE
      quay-operator.v3.5.0-7489b8c4f-r4r6j               1/1     Running     0          94m
      quayregistry-clair-app-574699545c-54zvk            1/1     Running     0          12m
      quayregistry-clair-postgres-64b54bbdd6-zkhfz       1/1     Running     0          11m
      quayregistry-quay-app-696f67485b-wjv9t             1/1     Running     3          12m
      quayregistry-quay-config-editor-6559b644c4-k2nmn   1/1     Running     0          12m
      quayregistry-quay-database-6bb7c58f9b-djwcn        1/1     Running     0          11m
      quayregistry-quay-mirror-74ffcb868b-xbrt7          1/1     Running     1          11m
      quayregistry-quay-postgres-init-n4xsg              0/1     Completed   0          12m
      quayregistry-quay-redis-f5ff84947-rg676            1/1     Running     0          12m
      
      oc get pod quayregistry-quay-app-696f67485b-wjv9t -o json | jq '.spec.containers[0].image'
      "registry.redhat.io/quay/quay-rhel8@sha256:0444c7b452a14e0c87ee56f9aa72c54484333c38b0a95de9a4f11f6177273f26"
      

      Steps:

      1. Deploy Quay 3.5.0 Operator to all OCP namespace
      2. Deploy quay with quay 3.5 Operator with using AWS S3 as backend registry storage
      3. Open quay config editor and enabled SMTP with valid configurations
      4. Click validate configurations and trigger quay reconfgure
      5. Open quay console and create new quay account
      6. Input valid info of new quay user and click 'create new account'

      Expected Results:

      New quay account should be created and ask user to check verify mail.

      Actual Results:

      New quay account creation was failed with error 'Could not send email. Please contact an administrator and report this problem. '

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

                Created:
                Updated:
                Resolved: