awx-operator
awx-operator copied to clipboard
Error creating pod: Pod "automation-job" is invalid: spec.containers[0].resources.requests: Invalid value: "250m": must be less than or equal to cpu limit
Please confirm the following
- [X] I agree to follow this project's code of conduct.
- [X] I have checked the current issues for duplicates.
- [X] I understand that the AWX Operator is open source software provided for free and that I might not receive a timely response.
Bug Summary
Receptor detail: Error creating pod: Pod "automation-job-24-c6krq" is invalid: spec.containers[0].resources.requests: Invalid value: "250m": must be less than or equal to cpu limit
Whereto set the resources limits for the automation-job ?
AWX Operator version
23.0.0
AWX version
23.0.0
Kubernetes platform
openshift
Kubernetes/Platform version
v1.19
Modifications
yes
Steps to reproduce
Launch job with awx-ee image execution environment
Expected results
The job running.
Actual results
invalid: spec.containers[0].resources.requests: Invalid value: "250m": must be less than or equal to cpu limit
Additional information
No response
Operator Logs
No response
I'm running into this problem, too.
@kmj251 The source of the problem is that there is a default limit range set in you namespace, so if you don't set up the limit on the automation job created in your namespace, the default limit is used. This create a problem if the resources requested are over the default limit.
The work around for this problem is to edit the pod specification in your container group in the instance group.
You will find the option to modify the yaml used to create your job, check it and add limits on the cpu and memory :
added limits
- ansible-runner
- worker
- '--private-data-dir=/runner'
resources:
limits:
cpu: 500m
memory: 250Mi
requests:
cpu: 250m
memory: 100Mi
@rachid1234 Thanks for the workaround! It worked like a charm.