{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/54789","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/54789/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/54789/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/54789/events","html_url":"https://github.com/kubernetes/kubernetes/issues/54789","id":269564769,"number":54789,"title":"Stateful set miscalculates used quota","user":{"login":"mishamo","id":1180322,"avatar_url":"https://avatars3.githubusercontent.com/u/1180322?v=4","gravatar_id":"","url":"https://api.github.com/users/mishamo","html_url":"https://github.com/mishamo","followers_url":"https://api.github.com/users/mishamo/followers","following_url":"https://api.github.com/users/mishamo/following{/other_user}","gists_url":"https://api.github.com/users/mishamo/gists{/gist_id}","starred_url":"https://api.github.com/users/mishamo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mishamo/subscriptions","organizations_url":"https://api.github.com/users/mishamo/orgs","repos_url":"https://api.github.com/users/mishamo/repos","events_url":"https://api.github.com/users/mishamo/events{/privacy}","received_events_url":"https://api.github.com/users/mishamo/received_events","type":"User","site_admin":false},"labels":[{"id":105146071,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/bug","name":"kind/bug","color":"e11d21","default":false},{"id":404091735,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/apps","name":"sig/apps","color":"d2b48c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-10-30T11:23:28Z","updated_at":"2017-11-06T10:04:00Z","closed_at":null,"author_association":"NONE","body":"<!-- This form is for bug reports and feature requests ONLY! \r\n\r\nIf you're looking for help check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).\r\n-->\r\n\r\n**Is this a BUG REPORT or FEATURE REQUEST?**:\r\n\r\n> Uncomment only one, leave it on its own line: \r\n>\r\n/kind bug\r\n> /kind feature\r\n\r\n\r\n**What happened**:\r\nStatefulset cluster does not complete deployment\r\n\r\n**What you expected to happen**:\r\nStatefulset cluster to roll out successfully\r\n\r\n**How to reproduce it (as minimally and precisely as possible)**:\r\n - Quota set up on a namespace with a hard limit of 300m cpu (and 3900Mi memory).\r\n - Apply the following minimal statefulset:\r\n```\r\napiVersion: apps/v1beta1\r\nkind: StatefulSet\r\nmetadata:\r\n  name: somename\r\n  namespace: somenamespace\r\nspec:\r\n  serviceName: \"someservice\"\r\n  replicas: 3\r\n  template:\r\n    metadata:\r\n      labels:\r\n        app: somename\r\n      annotations:\r\n    spec:\r\n      terminationGracePeriodSeconds: 30\r\n      containers:\r\n      - name: someservice\r\n        image: alpine:3.6 \r\n        command:\r\n        - /bin/sh\r\n        - -c\r\n        - |\r\n          echo \"Do nothing\"\r\n          while true; do\r\n            sleep 1\r\n          done\r\n        resources:\r\n          requests:\r\n            cpu: 100m\r\n            memory: 1300Mi\r\n          limits:\r\n            memory: 1300Mi\r\n```\r\n - Sometimes this rolls out successfully, but most times it will stop after the first or second pod and send out the following event: \r\n```\r\nforbidden: exceeded quota: quota, requested: requests.cpu=100m, used: requests.cpu=300m, limited: requests.cpu=300m\r\n```\r\n\r\n**Anything else we need to know?**:\r\n - It seems that this can be manually fixed by deleting one of the pods; the deployment then continues with reclaimed resources.\r\n - `--show-all` does not show any extra pods using resources.\r\n\r\n\r\n**Environment**:\r\n- Kubernetes version (use `kubectl version`): Reproduced with `1.6.9` and `1.7.8`\r\n- Cloud provider or hardware configuration: AWS\r\n- OS (e.g. from /etc/os-release): \r\n```\r\n/etc # cat os-release\r\nNAME=\"Alpine Linux\"\r\nID=alpine\r\nVERSION_ID=3.6.2\r\nPRETTY_NAME=\"Alpine Linux v3.6\"\r\nHOME_URL=\"http://alpinelinux.org\"\r\nBUG_REPORT_URL=\"http://bugs.alpinelinux.org\"\r\n```\r\n- Kernel (e.g. `uname -a`): `/ # uname -a\r\nLinux kafka-0 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 Linux`\r\n- Install tools: Custom Ansible\r\n- Others:\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/342101304","html_url":"https://github.com/kubernetes/kubernetes/issues/54789#issuecomment-342101304","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/54789","id":342101304,"user":{"login":"WanLinghao","id":13160186,"avatar_url":"https://avatars3.githubusercontent.com/u/13160186?v=4","gravatar_id":"","url":"https://api.github.com/users/WanLinghao","html_url":"https://github.com/WanLinghao","followers_url":"https://api.github.com/users/WanLinghao/followers","following_url":"https://api.github.com/users/WanLinghao/following{/other_user}","gists_url":"https://api.github.com/users/WanLinghao/gists{/gist_id}","starred_url":"https://api.github.com/users/WanLinghao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WanLinghao/subscriptions","organizations_url":"https://api.github.com/users/WanLinghao/orgs","repos_url":"https://api.github.com/users/WanLinghao/repos","events_url":"https://api.github.com/users/WanLinghao/events{/privacy}","received_events_url":"https://api.github.com/users/WanLinghao/received_events","type":"User","site_admin":false},"created_at":"2017-11-06T10:04:00Z","updated_at":"2017-11-06T10:04:00Z","author_association":"CONTRIBUTOR","body":"@mishamo  I guess it's some kind of outdated bug. Current k8s version is 1.9.x, upgrading could solve it.\r\n\r\n"}}
{"actor":{"display_login":"WanLinghao"}}