{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/prometheus-operator/issues/541","repository_url":"https://api.github.com/repos/coreos/prometheus-operator","labels_url":"https://api.github.com/repos/coreos/prometheus-operator/issues/541/labels{/name}","comments_url":"https://api.github.com/repos/coreos/prometheus-operator/issues/541/comments","events_url":"https://api.github.com/repos/coreos/prometheus-operator/issues/541/events","html_url":"https://github.com/coreos/prometheus-operator/issues/541","id":248072307,"node_id":"MDU6SXNzdWUyNDgwNzIzMDc=","number":541,"title":"Permission denied using volumeClaimTemplate w/ automatically provisioned storage","user":{"login":"Capitrium","id":5111534,"node_id":"MDQ6VXNlcjUxMTE1MzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5111534?v=4","gravatar_id":"","url":"https://api.github.com/users/Capitrium","html_url":"https://github.com/Capitrium","followers_url":"https://api.github.com/users/Capitrium/followers","following_url":"https://api.github.com/users/Capitrium/following{/other_user}","gists_url":"https://api.github.com/users/Capitrium/gists{/gist_id}","starred_url":"https://api.github.com/users/Capitrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Capitrium/subscriptions","organizations_url":"https://api.github.com/users/Capitrium/orgs","repos_url":"https://api.github.com/users/Capitrium/repos","events_url":"https://api.github.com/users/Capitrium/events{/privacy}","received_events_url":"https://api.github.com/users/Capitrium/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2017-08-04T17:43:59Z","updated_at":"2018-12-03T12:49:32Z","closed_at":"2017-08-23T08:43:30Z","author_association":"CONTRIBUTOR","body":"**What did you do?**\r\n\r\nI ran the latest versions of the Prometheus Operator (v0.11.0 and v0.11.1) configured to use the new Prometheus v2.0.0-beta.0 version with persistent storage on the Prometheus pods using the following storage config:\r\n```\r\n...\r\n  storage:\r\n    volumeClaimTemplate:\r\n      metadata:\r\n        annotations:\r\n          volume.beta.kubernetes.io/storage-class: ssd\r\n      spec:\r\n        resources:\r\n          requests:\r\n            storage: 10Gi\r\n...\r\n```\r\n\r\nNote: `ssd` is a `StorageClass` for AWS EBS gp2 volumes.\r\n\r\n**What did you expect to see?**\r\n\r\nPods on the Prometheus StatefulSet launching correctly.\r\n\r\n**What did you see instead? Under which circumstances?**\r\n\r\nThe `prometheus-k8s-0` pod fails to start due to a permissions issue on the persistent volume and ends up in a `CrashLoopBackOff` state. Inspection on the node reveals the mount point of the persistent volume created by the Prometheus Operator is owned by `root`, which is not the case for mount points of persistent volumes on a regular StatefulSet using the same `StorageClass`.\r\n\r\nThe pods launch correctly when the `volumeClaimTemplate` configuration is omitted.\r\n\r\nThis issue seems similar to #518, although in this case storage is being provisioned automatically.\r\n\r\n**Environment**\r\n\r\n* Kubernetes version information:\r\n\r\nTested on both 1.6.2 and 1.6.4.\r\n```\r\nClient Version: version.Info{Major:\"1\", Minor:\"6\", GitVersion:\"v1.6.4\", GitCommit:\"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae\", GitTreeState:\"clean\", BuildDate:\"2017-05-19T18:44:27Z\", GoVersion:\"go1.7.5\", Compiler:\"gc\", Platform:\"darwin/amd64\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"6\", GitVersion:\"v1.6.4+coreos.0\", GitCommit:\"8996efde382d88f0baef1f015ae801488fcad8c4\", GitTreeState:\"clean\", BuildDate:\"2017-05-19T21:11:20Z\", GoVersion:\"go1.7.5\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n```\r\n\r\n* Kubernetes cluster kind: \r\n\r\nCustom terraform deploy on AWS using CoreOS 1409.7.0\r\n\r\n* Manifests:\r\n\r\n```\r\nsee contrib/kube-prometheus/manifests\r\n```\r\n\r\n* Prometheus Operator Logs:\r\n\r\n```\r\ntime=\"2017-08-04T16:56:37Z\" level=info msg=\"Starting prometheus (version=2.0.0-beta.0, branch=master, revision=2b5d9159537cbd123219296121e05244e26c0940)\" source=\"main.go:202\" \r\ntime=\"2017-08-04T16:56:37Z\" level=info msg=\"Build context (go=go1.8.3, user=root@fc24486243df, date=20170712-12:21:13)\" source=\"main.go:203\" \r\ntime=\"2017-08-04T16:56:37Z\" level=info msg=\"Host details (Linux 4.11.11-coreos #1 SMP Tue Jul 18 23:06:59 UTC 2017 x86_64 prometheus-k8s-0 (none))\" source=\"main.go:204\" \r\ntime=\"2017-08-04T16:56:37Z\" level=info msg=\"Starting tsdb\" source=\"main.go:216\" \r\ntime=\"2017-08-04T16:56:37Z\" level=error msg=\"Opening storage failed: open DB in /var/prometheus/data: open /var/prometheus/data/969552713: permission denied\" source=\"main.go:219\" \r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/coreos/prometheus-operator/issues/comments/443698949","html_url":"https://github.com/coreos/prometheus-operator/issues/541#issuecomment-443698949","issue_url":"https://api.github.com/repos/coreos/prometheus-operator/issues/541","id":443698949,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzY5ODk0OQ==","user":{"login":"brancz","id":4546722,"node_id":"MDQ6VXNlcjQ1NDY3MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/4546722?v=4","gravatar_id":"","url":"https://api.github.com/users/brancz","html_url":"https://github.com/brancz","followers_url":"https://api.github.com/users/brancz/followers","following_url":"https://api.github.com/users/brancz/following{/other_user}","gists_url":"https://api.github.com/users/brancz/gists{/gist_id}","starred_url":"https://api.github.com/users/brancz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brancz/subscriptions","organizations_url":"https://api.github.com/users/brancz/orgs","repos_url":"https://api.github.com/users/brancz/repos","events_url":"https://api.github.com/users/brancz/events{/privacy}","received_events_url":"https://api.github.com/users/brancz/received_events","type":"User","site_admin":false},"created_at":"2018-12-03T12:49:32Z","updated_at":"2018-12-03T12:49:32Z","author_association":"MEMBER","body":"That looks like it should do the trick. Is there anything in “...” that might be influencing it?"}}
{"actor":{"display_login":"brancz"}}