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

TypeError: quote_from_bytes() expected bytes

    XMLWordPrintable

Details

    • Bug
    • Status: New
    • Undefined
    • Resolution: Unresolved
    • quay-v3.6.2
    • None
    • quay-builder
    • False
    • None
    • False
    • 0

    Description

      Description:

      When trying to start a build job, it cannot be started and the error "TypeError: quote_from_bytes() expected bytes" is found in the log. This issue is not existed with Quay 3.5.6. Initially it was suspected to be PROJQUAY-2545, but it could not be solved so far.

      quay                 | builder stdout | 2022-04-25 11:49:57,138 [79] [DEBUG] [urllib3.connectionpool] Starting new HTTPS connection (1): build01.domain.tld:6443
      quay                 | builder stdout | 2022-04-25 11:49:57,202 [79] [DEBUG] [urllib3.connectionpool] https://build01.domain.tld:6443 "GET /apis/batch/v1/namespaces/builder/jobs?labelSelector=build%2Ctime%2Cmanager%2Cquay-sha HTTP/1.1" 200 91
      quay                 | builder stdout | 2022-04-25 11:49:57,202 [79] [DEBUG] [buildman.manager.executor] Kubernetes response: 200: {"kind":"JobList","apiVersion":"batch/v1","metadata":{"resourceVersion":"976"},"items":[]}
      quay                 | builder stdout | 2022-04-25 11:49:57,225 [79] [DEBUG] [data.database] Disconnecting from database.
      quay                 | builder stdout | 2022-04-25 11:49:57,225 [79] [DEBUG] [buildman.manager.ephemeral] Starting builder for job quay/production/building/343a7305-3b72-4164-8ffd-ef34cab6391b with selected executor: k3s
      quay                 | builder stdout | 2022-04-25 11:49:57,226 [79] [ERROR] [buildman.manager.ephemeral] Exception when starting builder for job: quay/production/building/343a7305-3b72-4164-8ffd-ef34cab6391b - Falling back to next configured executor
      quay                 | builder stdout | Traceback (most recent call last):
      quay                 | builder stdout |   File "/quay-registry/buildman/manager/ephemeral.py", line 650, in schedule
      quay                 | builder stdout |     execution_id = executor.start_builder(registration_token, build_job.build_uuid)
      quay                 | builder stdout |   File "/quay-registry/buildman/manager/executor.py", line 56, in wrapper
      quay                 | builder stdout |     rv = func(*args, **kwargs)
      quay                 | builder stdout |   File "/quay-registry/buildman/manager/executor.py", line 638, in start_builder
      quay                 | builder stdout |     user_data = self.generate_cloud_config(token, build_uuid, self.manager_hostname)
      quay                 | builder stdout |   File "/quay-registry/buildman/manager/executor.py", line 216, in generate_cloud_config
      quay                 | builder stdout |     noproxy=self.executor_config.get("NO_PROXY", None),
      quay                 | builder stdout |   File "/app/lib/python3.6/site-packages/jinja2/environment.py", line 1090, in render
      quay                 | builder stdout |     self.environment.handle_exception()
      quay                 | builder stdout |   File "/app/lib/python3.6/site-packages/jinja2/environment.py", line 832, in handle_exception
      quay                 | builder stdout |     reraise(*rewrite_traceback_stack(source=source))
      quay                 | builder stdout |   File "/app/lib/python3.6/site-packages/jinja2/_compat.py", line 28, in reraise
      quay                 | builder stdout |     raise value.with_traceback(tb)
      quay                 | builder stdout |   File "/quay-registry/buildman/templates/cloudconfig.json", line 82, in top-level template code
      quay                 | builder stdout |     "source": {{ ca_cert | dataurl | jsonify }}
      quay                 | builder stdout |   File "/quay-registry/buildman/container_cloud_config.py", line 115, in data_url
      quay                 | builder stdout |     data = "," + urlquote(content)
      quay                 | builder stdout |   File "/usr/lib64/python3.6/urllib/parse.py", line 897, in quote
      quay                 | builder stdout |     return quote_from_bytes(string, safe)
      quay                 | builder stdout |   File "/usr/lib64/python3.6/urllib/parse.py", line 922, in quote_from_bytes
      quay                 | builder stdout |     raise TypeError("quote_from_bytes() expected bytes")
      quay                 | builder stdout | TypeError: quote_from_bytes() expected bytes
      quay                 | builder stdout | 2022-04-25 11:49:57,227 [79] [ERROR] [buildman.manager.ephemeral] Could not start ephemeral worker for build 343a7305-3b72-4164-8ffd-ef34cab6391b

      Steps:

      1. Deploy Quay (eg. with Docker) behind an Proxy (Traefik), expose gRPC port directly from container
      2. Login Quay config editor to enable builder
      3. Following Quay docs to create new config.yaml and other required config on K3s Baremetal Cluster to run build job quay/README.md at master - quay/quay (github.com)
      4. Login Quay to create Github trigger
      5. Trigger new image build job

      Expected Results:

      Image build job completed successfully.

      Actual Results:

      Image build job was failed at start builder job.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gebitsolutions Lenny Linux
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: