Coder Social home page Coder Social logo

Comments (9)

gbengataylor avatar gbengataylor commented on July 20, 2024 2

The error I received was

Failed to create build pod "petclinic-deploy-pipeline-run-l2qgm-build-8tpt5": pods "petclinic-deploy-pipeline-run-l2qgm-build-8tpt5-pod-f3696e" is forbidden: maximum cpu usage per Pod is 2, but limit is 3500m.

I updated the LimitRange resource to update the max cpu on the Container for the pipleline to not fail immegiately

kind: LimitRange
apiVersion: v1
metadata:
  name: pipelines-tutorial-core-resource-limits
  namespace: pipelines-tutorial
  selfLink: >-
    /api/v1/namespaces/pipelines-tutorial/limitranges/pipelines-tutorial-core-resource-limits
  uid: 27429129-de34-11e9-98ce-12633bbe5f7a
  resourceVersion: '120638'
  creationTimestamp: '2019-09-23T18:58:38Z'
spec:
  limits:
    - type: Container
      max:
        cpu: '3'
        memory: 6Gi
      min:
        memory: '0'
      default:
        cpu: 500m
        memory: 1536Mi
      defaultRequest:
        cpu: 50m
        memory: 256Mi
    - type: Pod
      max:
        memory: 12Gi
      min:
        memory: '0'

from pipelines-tutorial.

danielhelfand avatar danielhelfand commented on July 20, 2024

This could be specific to RHDPS, but it looks like you need to edit the limit range for the pipelines-tutorial project to set the limit ranges to a min memory of 0 instead of a min of 6Mi. Why there is a request of 0 as stated above is odd though.

The current workaround, as said in the paragraph above, is to go under the Administration tab, select the Limit Ranges option, select the pipelines-tutorial project, and edit the limit range, as shown below, to set the min values for max/min for memory to 0:

kind: LimitRange
apiVersion: v1
metadata:
  name: pipelines-tutorial-core-resource-limits
  namespace: pipelines-tutorial
  selfLink: >-
    /api/v1/namespaces/pipelines-tutorial/limitranges/pipelines-tutorial-core-resource-limits
  uid: 492a15c6-9d90-11e9-ae59-0a8e513d9bd0
  resourceVersion: '1063283'
  creationTimestamp: '2019-07-03T12:44:23Z'
spec:
  limits:
    - type: Container
      max:
        memory: 6Gi
      min:
        memory: '0'
      default:
        cpu: 500m
        memory: 1536Mi
      defaultRequest:
        cpu: 50m
        memory: 256Mi
    - type: Pod
      max:
        memory: 12Gi
      min:
        memory: '0'

This allowed the pipeline to run and execute successfully on a 4.1 RHPDS cluster.

from pipelines-tutorial.

siamaksade avatar siamaksade commented on July 20, 2024

It's probably simpler to just delete the limitrange?
oc delete limitrange --all -n pipelines-tutorial

It would be great if you send the above comments as a PR with the instructions for RHPDS.

from pipelines-tutorial.

danielhelfand avatar danielhelfand commented on July 20, 2024

Deleting the LimitRange leads to the following error message:

task build failed: resource name may not be empty

I verified that the resources as part of the tutorial had been created and that tasks were created as well. Steps to reproduce are below. I ran these after doing oc creates to set up everything except the pipelinerun.

$ oc delete limitrange --all -n pipelines-tutorial
limitrange "pipelines-tutorial-core-resource-limits" deleted

$ oc create -f petclinic-deploy-pipelinerun.yaml 
pipelinerun.tekton.dev/petclinic-deploy-pipelinerun-h7jrn created

$ tkn pr ls
NAME                                 STARTED         DURATION   STATUS   
petclinic-deploy-pipelinerun-h7jrn   4 seconds ago   1 second   Failed   

$ tkn pr logs petclinic-deploy-pipelinerun-h7jrn
task build failed: resource name may not be empty

$tkn taskrun petclinic-deploy-pipelinerun-h7jrn-build-z626b 
NAME                                              STARTED          DURATION     STATUS                   
petclinic-deploy-pipelinerun-h7jrn-build-z626b    10 seconds ago   ---          Failed(CouldntGetTask)   

$tkn taskrun logs petclinic-deploy-pipelinerun-h7jrn-build-z626b
Error: task s2i-java-8 failed: resource name may not be empty 

However, lowering the LimitRange minimums to 0 allowed for a successful run.

from pipelines-tutorial.

glamperi avatar glamperi commented on July 20, 2024

Daniel's fix for RHPDS 4.1 is also needed for the RHPDS 4.2. Thanks Daniel for the workaround!

from pipelines-tutorial.

openshift-bot avatar openshift-bot commented on July 20, 2024

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

from pipelines-tutorial.

openshift-bot avatar openshift-bot commented on July 20, 2024

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

from pipelines-tutorial.

openshift-bot avatar openshift-bot commented on July 20, 2024

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

from pipelines-tutorial.

openshift-ci-robot avatar openshift-ci-robot commented on July 20, 2024

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from pipelines-tutorial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.