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

Unable to override gunicorn worker count in k8s

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • quay-v3.4.0
    • None
    • quay
    • None

      Current Result:

      When using environment variables to override gunicorn worker counts, an error occurs due to attempting to compare a string and integer.

      gunicorn-web stderr | Failed to read config file: /quay-registry/conf/gunicorn_web.py
      gunicorn-web stderr | Traceback (most recent call last):
      gunicorn-web stderr |   File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 111, in get_config_from_filename
      gunicorn-web stderr |     spec.loader.exec_module(mod)
      gunicorn-web stderr |   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
      gunicorn-web stderr |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      gunicorn-web stderr |   File "/quay-registry/conf/gunicorn_web.py", line 21, in <module>
      gunicorn-web stderr |     workers = get_worker_count("web", 2, minimum=2, maximum=32)
      gunicorn-web stderr |   File "/quay-registry/util/workers.py", line 32, in get_worker_count
      gunicorn-web stderr |     return max(override_value, minimum)
      gunicorn-web stderr | TypeError: '>' not supported between instances of 'int' and 'str'

       

      Expected Result:

      Deploy Quay to kubernetes using the following environment variables:

                - name: WORKER_COUNT_REGISTRY
                  value: '8'
                - name: WORKER_COUNT_WEB
                  value: '4'
                - name: WORKER_COUNT_SECSCAN
                  value: '2'

      Quay should start successfully, the requested  number of processes should be running, and the above error should not occur.

              kmullins@redhat.com Kurtis Mullins (Inactive)
              kmullins@redhat.com Kurtis Mullins (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: