[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Error creating: pods "mysql-79-" is forbidden: failed quota: resource-quota: must specify limits.cpu, limits.memory, requests.cpu, requests.memory



It means the pod template in your DC doesn't set requests and limits for the pods.  If you are going to have a resourcequota restricting cpu and memory then you either have to explicitly set requests/limits on all of your pod templates OR you need to create a limit range that will provide defaults.  If you are setting this up for other users, having a limit range with reasonable defaults when you have a resource quota is recommended from a user experience perspective.

On Thu, Jun 29, 2017 at 10:21 AM, Stéphane Klein <contact stephane-klein info> wrote:
Hi,

I have a project with this ResourceQuota:

$ oc describe ResourceQuota resource-quota
Name: resource-quota
Namespace: zf-novalac-staging
Resource Used Hard
-------- ---- ----
limits.cpu 0 1
limits.memory 0 2Gi
requests.cpu 0 1
requests.memory 0 2Gi

I start one DC:

$ oc scale dc mysql --replicas=1

$ oc get events -w
LASTSEEN                         FIRSTSEEN                        COUNT     NAME       KIND                    SUBOBJECT   TYPE      REASON                        SOURCE                           MESSAGE
2017-06-29 15:41:38 +0200 CEST   2017-06-29 15:31:03 +0200 CEST   5         mysql      DeploymentConfig                    Normal    ReplicationControllerScaled   {deploymentconfig-controller }   Scaled replication controller "mysql-79" from 0 to 1
2017-06-29 15:54:44 +0200 CEST   2017-06-29 15:34:44 +0200 CEST   63        mysql-79   ReplicationController               Warning   FailedCreate                  {replication-controller }        Error creating: pods "mysql-79-" is forbidden: failed quota: resource-quota: must specify limits.cpu,limits.memory,requests.cpu,requests.memory

I don't understand this error « resource-quota: must specify limits.cpu,limits.memory,requests.cpu,requests.memory » because I have specified this parameters.

Where did I go wrong?

Best regards,
Stéphane
--

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]