{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/govuk-puppet/issues/4097","repository_url":"https://api.github.com/repos/alphagov/govuk-puppet","labels_url":"https://api.github.com/repos/alphagov/govuk-puppet/issues/4097/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/govuk-puppet/issues/4097/comments","events_url":"https://api.github.com/repos/alphagov/govuk-puppet/issues/4097/events","html_url":"https://github.com/alphagov/govuk-puppet/pull/4097","id":133015568,"number":4097,"title":"Add unattended reboot check for lockfiles","user":{"login":"MatMoore","id":87579,"avatar_url":"https://avatars.githubusercontent.com/u/87579?v=3","gravatar_id":"","url":"https://api.github.com/users/MatMoore","html_url":"https://github.com/MatMoore","followers_url":"https://api.github.com/users/MatMoore/followers","following_url":"https://api.github.com/users/MatMoore/following{/other_user}","gists_url":"https://api.github.com/users/MatMoore/gists{/gist_id}","starred_url":"https://api.github.com/users/MatMoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatMoore/subscriptions","organizations_url":"https://api.github.com/users/MatMoore/orgs","repos_url":"https://api.github.com/users/MatMoore/repos","events_url":"https://api.github.com/users/MatMoore/events{/privacy}","received_events_url":"https://api.github.com/users/MatMoore/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-11T16:09:00Z","updated_at":"2016-03-02T11:38:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/alphagov/govuk-puppet/pulls/4097","html_url":"https://github.com/alphagov/govuk-puppet/pull/4097","diff_url":"https://github.com/alphagov/govuk-puppet/pull/4097.diff","patch_url":"https://github.com/alphagov/govuk-puppet/pull/4097.patch"},"body":"This is a first stab at https://trello.com/c/Z5T7xEcX/72-add-lockfile-functionality-to-nightly-reboots-have-important-jobs-write-release-this-lock after discussing with @alexmuller \r\n\r\nChecks that other jobs don't have active lockfiles before the unattended reboot can go ahead.\r\n\r\nThis assumes the jobs are already using setlock to acquire locks.\r\n\r\nFor now, this check is just going to immediately release the lock after acquiring it, to keep things simple. There's a short period of time when jobs could still be started after this check runs, but we think this is still an improvement."},"comment":{"url":"https://api.github.com/repos/alphagov/govuk-puppet/issues/comments/191200359","html_url":"https://github.com/alphagov/govuk-puppet/pull/4097#issuecomment-191200359","issue_url":"https://api.github.com/repos/alphagov/govuk-puppet/issues/4097","id":191200359,"user":{"login":"MatMoore","id":87579,"avatar_url":"https://avatars.githubusercontent.com/u/87579?v=3","gravatar_id":"","url":"https://api.github.com/users/MatMoore","html_url":"https://github.com/MatMoore","followers_url":"https://api.github.com/users/MatMoore/followers","following_url":"https://api.github.com/users/MatMoore/following{/other_user}","gists_url":"https://api.github.com/users/MatMoore/gists{/gist_id}","starred_url":"https://api.github.com/users/MatMoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatMoore/subscriptions","organizations_url":"https://api.github.com/users/MatMoore/orgs","repos_url":"https://api.github.com/users/MatMoore/repos","events_url":"https://api.github.com/users/MatMoore/events{/privacy}","received_events_url":"https://api.github.com/users/MatMoore/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T11:38:30Z","updated_at":"2016-03-02T11:38:30Z","body":"@surminus are those commands interoperable with setlock? If it works that would be preferable to using setlock in this way I think.\r\n\r\nWhat I had in mind originally was customising the cron script generated by that module to use a setlock command rather than defining pre/postbackup scripts. \r\n\r\n```\r\n$cron_template        = 'automysqlbackup/automysqlbackup.cron.erb',\r\n```\r\n\r\nI didn't look into it any further though - any idea if that would work?"}}