Bug 1947754 - Maybe missing or invalid Task and failed quota
Summary: Maybe missing or invalid Task and failed quota
Keywords:
Status: NEW
Alias: None
Product: Red Hat OpenShift Pipelines
Classification: Red Hat
Component: pipelines
Version: 1.2
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Vincent Demeester
QA Contact: Ruchir Garg
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-09 07:23 UTC by peter ducai
Modified: 2023-07-21 23:14 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description peter ducai 2021-04-09 07:23:47 UTC
Description of problem:

Tekton fails with

    failed to create task run pod "socketclient-pipeline-pipelinerun-socketclient-dqlcx": pods "socketclient-pipeline-pipelinerun-socketclient-dqlcx-pod-wml7l" is forbidden: failed quota: resource-quota-oxt: must specify limits.cpu,limits.memory,requests.cpu,requests.memory. Maybe missing or invalid Task oxiteno-dev/socketclient

but Task is present, looks valid and quota is set

$ oc get quota
NAME                 AGE    REQUEST                                                           LIMIT
resource-quota-oxt   232d   pods: 2/50, requests.cpu: 170m/800m, requests.memory: 356Mi/2Gi   limits.cpu: 780m/3, limits.memory: 3584Mi/6Gi
dev root(ocp:oxiteno-dev) $ oc describe quota resource-quota-oxt
Name:       resource-quota-oxt
Namespace:  oxiteno-dev
Scopes:     NotTerminating
 * Matches all pods that do not have an active deadline. These pods usually include long running pods whose container command is not expected to terminate.
Resource         Used    Hard
--------         ----    ----
limits.cpu       780m    3
limits.memory    3584Mi  6Gi
pods             2       50
requests.cpu     170m    800m
requests.memory  356Mi   2Gi
dev root(ocp:oxiteno-dev) $


dev root(ocp:oxiteno-dev) $ oc get task
NAME           AGE
socketclient   10d


#Task
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: socketclient
spec:
  workspaces:
  - name: source
  # params:
  #   - name: manifest_dir
  #     description: The directory in source that contains yaml manifests
  #     type: string
  #     default: "k8s"
  steps:
    - name: apply
      image: quay.io/openshift/origin-cli:latest
      workingDir: /workspace/source
      command: ["/bin/bash", "-c"]
      args:
        - |-
          echo test git ultra
          curl https://git.ultra.com.br -I
          echo -----------------------------------

          echo test github
          curl https://github.com/tektoncd -I
          echo -----------------------------------

pipeline root(ocp:oxiteno-dev) $ oc get taskrun socketclient-pipeline-run-gcth6-socketclient-x8r7l -o yaml
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"tekton.dev/v1beta1","kind":"Task","metadata":{"annotations":{},"name":"socketclient","namespace":"oxiteno-dev"},"spec":{"steps":[{"args":["echo test git ultra\ncurl https://git.ultra.com.br -I\necho -----------------------------------\n\necho test github\ncurl https://github.com/tektoncd -I\necho -----------------------------------"],"command":["/bin/bash","-c"],"image":"quay.io/openshift/origin-cli:latest","name":"apply","workingDir":"/workspace/source"}],"workspaces":[{"name":"source"}]}}
    pipeline.tekton.dev/release: devel
  creationTimestamp: "2021-04-06T12:47:48Z"
  generation: 1
  labels:
    app.kubernetes.io/managed-by: tekton-pipelines
    tekton.dev/pipeline: socketclient-pipeline
    tekton.dev/pipelineRun: socketclient-pipeline-run-gcth6
    tekton.dev/pipelineTask: socketclient
    tekton.dev/task: socketclient
  managedFields:
  - apiVersion: tekton.dev/v1beta1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:kubectl.kubernetes.io/last-applied-configuration: {}
          f:pipeline.tekton.dev/release: {}
        f:labels:
          .: {}
          f:tekton.dev/pipeline: {}
          f:tekton.dev/pipelineRun: {}
          f:tekton.dev/pipelineTask: {}
          f:tekton.dev/task: {}
        f:ownerReferences:
          .: {}
          k:{"uid":"382d22e9-55e0-4374-8e2b-db21685935ac"}:
            .: {}
            f:apiVersion: {}
            f:blockOwnerDeletion: {}
            f:controller: {}
            f:kind: {}
            f:name: {}
            f:uid: {}
      f:spec:
        .: {}
        f:resources: {}
        f:serviceAccountName: {}
        f:taskRef:
          .: {}
          f:kind: {}
          f:name: {}
        f:timeout: {}
        f:workspaces: {}
      f:status:
        .: {}
        f:conditions: {}
        f:podName: {}
        f:startTime: {}
        f:taskSpec:
          .: {}
          f:steps: {}
          f:workspaces: {}
    manager: openshift-pipelines-controller
    operation: Update
    time: "2021-04-06T12:47:49Z"
  name: socketclient-pipeline-run-gcth6-socketclient-x8r7l
  namespace: oxiteno-dev
  ownerReferences:
  - apiVersion: tekton.dev/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: PipelineRun
    name: socketclient-pipeline-run-gcth6
    uid: 382d22e9-55e0-4374-8e2b-db21685935ac
  resourceVersion: "211775272"
  selfLink: /apis/tekton.dev/v1beta1/namespaces/oxiteno-dev/taskruns/socketclient-pipeline-run-gcth6-socketclient-x8r7l
  uid: 1ec448d4-626d-4e1f-968a-8ac75d21a8db
spec:
  resources: {}
  serviceAccountName: pipeline
  taskRef:
    kind: Task
    name: socketclient
  timeout: 1h0m0s
  workspaces:
  - name: source
    persistentVolumeClaim:
      claimName: source-pvc
status:
  conditions:
  - lastTransitionTime: "2021-04-06T12:47:49Z"
    message: 'failed to create task run pod "socketclient-pipeline-run-gcth6-socketclient-x8r7l":
      pods "socketclient-pipeline-run-gcth6-socketclient-x8r7l-pod-hs865" is forbidden:
      failed quota: resource-quota-oxt: must specify limits.cpu,limits.memory,requests.cpu,requests.memory.
      Maybe missing or invalid Task oxiteno-dev/socketclient'
    reason: CouldntGetTask
    status: "False"
    type: Succeeded
  podName: ""
  startTime: "2021-04-06T12:47:49Z"
  taskSpec:
    steps:
    - args:
      - |-
        echo test git ultra
        curl https://git.ultra.com.br -I
        echo -----------------------------------

        echo test github
        curl https://github.com/tektoncd -I
        echo -----------------------------------
      command:
      - /bin/bash
      - -c
      image: quay.io/openshift/origin-cli:latest
      name: apply
      resources: {}
      workingDir: /workspace/source
    workspaces:
    - name: source
pipeline root(ocp:oxiteno-dev) $



Version-Release number of selected component (if applicable):

redhat-openshift-pipelines-operator.v1.2.3   Red Hat OpenShift Pipelines Operator   1.2.3     redhat-openshift-pipelines-operator.v1.2.2   Succeeded

version   4.6.13    True        False         63d     Cluster version is 4.6.13


Additional info:


Note You need to log in before you can comment on or make changes to this bug.