{"action":"created","issue":{"url":"https://api.github.com/repos/echocat/puppet-graphite/issues/277","repository_url":"https://api.github.com/repos/echocat/puppet-graphite","labels_url":"https://api.github.com/repos/echocat/puppet-graphite/issues/277/labels{/name}","comments_url":"https://api.github.com/repos/echocat/puppet-graphite/issues/277/comments","events_url":"https://api.github.com/repos/echocat/puppet-graphite/issues/277/events","html_url":"https://github.com/echocat/puppet-graphite/issues/277","id":148194384,"number":277,"title":"gunicorn service and exec","user":{"login":"solud","id":8294366,"avatar_url":"https://avatars.githubusercontent.com/u/8294366?v=3","gravatar_id":"","url":"https://api.github.com/users/solud","html_url":"https://github.com/solud","followers_url":"https://api.github.com/users/solud/followers","following_url":"https://api.github.com/users/solud/following{/other_user}","gists_url":"https://api.github.com/users/solud/gists{/gist_id}","starred_url":"https://api.github.com/users/solud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solud/subscriptions","organizations_url":"https://api.github.com/users/solud/orgs","repos_url":"https://api.github.com/users/solud/repos","events_url":"https://api.github.com/users/solud/events{/privacy}","received_events_url":"https://api.github.com/users/solud/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-13T21:55:34Z","updated_at":"2016-04-25T19:13:28Z","closed_at":null,"body":"CentOS 7, Puppet 3.8, gr_web_server='wsgionly'\r\nI've had to use the following changes to get this module to work. I'm not experiencing a race condition so removing the exec cleans up the puppet output. The Exec executes on every run and the wsgi.py doesn't seem to be needed. \r\n\r\nhttps://github.com/echocat/puppet-graphite/compare/develop...solud:develop?expand=1\r\n\r\nWhat does the race condition fix's script actually do and why would this need to run every time?"},"comment":{"url":"https://api.github.com/repos/echocat/puppet-graphite/issues/comments/214485534","html_url":"https://github.com/echocat/puppet-graphite/issues/277#issuecomment-214485534","issue_url":"https://api.github.com/repos/echocat/puppet-graphite/issues/277","id":214485534,"user":{"login":"squarebracket","id":127774,"avatar_url":"https://avatars.githubusercontent.com/u/127774?v=3","gravatar_id":"","url":"https://api.github.com/users/squarebracket","html_url":"https://github.com/squarebracket","followers_url":"https://api.github.com/users/squarebracket/followers","following_url":"https://api.github.com/users/squarebracket/following{/other_user}","gists_url":"https://api.github.com/users/squarebracket/gists{/gist_id}","starred_url":"https://api.github.com/users/squarebracket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squarebracket/subscriptions","organizations_url":"https://api.github.com/users/squarebracket/orgs","repos_url":"https://api.github.com/users/squarebracket/repos","events_url":"https://api.github.com/users/squarebracket/events{/privacy}","received_events_url":"https://api.github.com/users/squarebracket/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T19:13:28Z","updated_at":"2016-04-25T19:13:28Z","body":"I just submitted PR-281 which makes the race condition script only run on initial install.\r\n\r\nThe script fixes a [race condition that's present in the graphite 0.9.x branch](https://github.com/graphite-project/graphite-web/issues/403), which is the default branch used when installing via pip. That bug has been closed in the upstream graphite (v 10.0, not yet released), but no fix was backported.\r\n\r\nThe bug is caused by multiple threads trying to create a default user at the same time. The script is essentially a single-threaded call to the script snippet in graphite that causes the race condition. Without it, the web server may fail to start on first run. It will work on subsequent puppet runs because the first run, despite failing to launch properly, will create the default user/profile needed by graphite."}}