-
Bug
-
Resolution: Won't Do
-
Major
-
quay-v3.4.0
Description:
This is an issue found when deploy Quay on GCP and use GCP SQL Postgresql DB as Quay DB, at the step of "setup DB", it was failed with message "could not setup databasbe, pls report this to support", based on the logs from Quay-config app POD, looks like create database schema was timeout and then Cloud DB close the connection, checked GCP Postgresql DB, only 56 tables are created, ideally the number is 96
As a Quay customer, there's no way to adjust the timeout value from GCP Cloud DB side, so suggest Quay improve the step of "create database schema", like divide current one request to GCP Cloud DB into more requests, this will help Quay customer deploy Quay on GCP and use GCP Cloud DB.
Note: this issue can't be reproduced on AWS and use AWS RDS Postgresql
Image: quay.io/projectquay/quay:0c65f88a
Steps:
- Deploy OCP 4.5 on GCP
- Deploy Quay Operator V3.3.1 on OCP
- Create GCP Storage Bucket
- Create GCP Postgresql DB
- Create OCP secret which container Quay DB "username", "password" and "database name"
- Create Quay CR file and apply
- Check Quay CR resource status
apiVersion: redhatcop.redhat.io/v1alpha1 kind: QuayEcosystem metadata: name: demo-quayecosystem spec: quay: imagePullSecretName: redhat-pull-secret image: quay.io/projectquay/quay:0c65f88a registryBackends: - name: default googleCloud: accessKey: *********************** secretKey: *********************** bucketName: quay0903 storagePath: /quaygcp/quayregistry keepConfigDeployment: true enableRepoMirroring: true database: credentialsSecretName: quaydb server: 104.196.37.52 envVars: - name: DEBUGLOG value: "true" clair: enabled: true image: quay.io/quay/clair-jwt:v3.3.1-2 imagePullSecretName: redhat-pull-secret updateInterval: "60m"
Expected Results:
Quay-config app can create database schema successfully.
Actual Results:
Quay-config app create database schema was failed.
Quay Config App logs:
2020-09-03 02:48:41,822 [37] [CRITICAL] [gunicorn.error] WORKER TIMEOUT (pid:53) gunicorn-config stdout | 2020-09-03 02:48:41,822 [37] [CRITICAL] [gunicorn.error] WORKER TIMEOUT (pid:53) 2020/09/03 02:48:41 [error] 40#0: *1311 upstream prematurely closed connection while reading response header from upstream, client: 10.131.0.6, server: _, request: "GET /api/v1/superuser/setupdb HTTP/2.0", upstream: "http://unix:/tmp/gunicorn_web.sock:/api/v1/superuser/setupdb", host: "demo-quayecosystem-quay-config-quay-enterprise.apps.quay-339.qe.gcp.devcluster.openshift.com", referrer: "https://demo-quayecosystem-quay-config-quay-enterprise.apps.quay-339.qe.gcp.devcluster.openshift.com/"