Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60623

Failed to count the # of live instances on Kubernetes after upgrade to 1.22.3 for slaves with multiple labes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • kubernetes-plugin
    • None
    • Jenkins ver. 2.204.1
      kubernetes-plugin 1.22.3
      OpenShift Master:
          v3.11.104
      Kubernetes Master:
          v1.11.0+d4cacc0

      After upgrade to 1.22.3 from 1.21.3 no new slave pods were created and following exception was visible in the log:

      2020-01-01 09:23:16.158+0000 [id=48] WARNING o.c.j.p.k.KubernetesCloud#provision: Failed to count the # of live instances on Kubernetes
      io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://b22.jonqe.lab.eng.bos.redhat.com:8443/api/v1/namespaces/jenkins-slaves/pods?labelSelector=jenkins%3Dslave%2Cjenkins%2Flabel%3Dkiali-build%20golang%20nodejs%20yarn. Message: found 'golang', expected: ',' or 'end of string'. Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=found 'golang', expected: ',' or 'end of string', metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).

      Looks like the new plugin version is using spaces between labels in the API call but OpenShift API expects commas.

      Full exception is attached.

            Unassigned Unassigned
            fbrychta Filip Brychta
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: