{"action":"created","issue":{"url":"https://api.github.com/repos/puppet-community/puppet-unattended_upgrades/issues/16","labels_url":"https://api.github.com/repos/puppet-community/puppet-unattended_upgrades/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/puppet-community/puppet-unattended_upgrades/issues/16/comments","events_url":"https://api.github.com/repos/puppet-community/puppet-unattended_upgrades/issues/16/events","html_url":"https://github.com/puppet-community/puppet-unattended_upgrades/issues/16","id":90938501,"number":16,"title":"potential dependency cycle for users","user":{"login":"lexelby","id":4446653,"avatar_url":"https://avatars.githubusercontent.com/u/4446653?v=3","gravatar_id":"","url":"https://api.github.com/users/lexelby","html_url":"https://github.com/lexelby","followers_url":"https://api.github.com/users/lexelby/followers","following_url":"https://api.github.com/users/lexelby/following{/other_user}","gists_url":"https://api.github.com/users/lexelby/gists{/gist_id}","starred_url":"https://api.github.com/users/lexelby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexelby/subscriptions","organizations_url":"https://api.github.com/users/lexelby/orgs","repos_url":"https://api.github.com/users/lexelby/repos","events_url":"https://api.github.com/users/lexelby/events{/privacy}","received_events_url":"https://api.github.com/users/lexelby/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-06-25T11:46:31Z","updated_at":"2015-09-22T00:08:26Z","closed_at":null,"body":"The 3 requires here could cause issues for users: https://github.com/puppet-community/puppet-unattended_upgrades/commit/886245f2cb7614a8c749d34e6f08ee17b92c970f#diff-60ae41fd0a31977447947f59940ee9a4R54\r\n\r\nWe ran into an issue where new hosts coming up couldn't find packages that were in our repo because the `apt-get update` wasn't running before packages were installed.  A solution would be something like this in site.pp:\r\n\r\n    Class['apt::update'] -> Package <| |>\r\n\r\nHowever, the requires here cause a dependency cycle if you do that.  apt::conf notifies Exec\\['apt_update'\\] (in apt::setting), so Package['unattended-upgrades'] gets chained before the apt update, but my spaceship operator up there wants to chain it after.\r\n\r\nWe ran into this problem with our own in-house unattended-upgrades module which had the exact same dependency (probably for the same reason :)).  The only way for a user of your module in our situation to work around this would be:\r\n\r\n    Class['apt::update'] -> Package <| title != \"unattended-upgrades\" |>\r\n\r\nwhich would work but is very hacky.\r\n\r\nIf you don't chain here, of course, you run the risk that the apt-periodic daily cron job runs after you've put down these config files but before the unattended-upgrades package is installed.  In practice, that's going to require some incredibly exact timing, and the result is just a failed cron job and not a failed puppet run.  We decided the risk was worthwhile.\r\n\r\nIt's occurred to us that perhaps we're doing something wrong with the above chaining, but we can't figure out what the \"right\" way to do it would be.  Any ideas?"},"comment":{"url":"https://api.github.com/repos/puppet-community/puppet-unattended_upgrades/issues/comments/142143174","html_url":"https://github.com/puppet-community/puppet-unattended_upgrades/issues/16#issuecomment-142143174","issue_url":"https://api.github.com/repos/puppet-community/puppet-unattended_upgrades/issues/16","id":142143174,"user":{"login":"nibalizer","id":195179,"avatar_url":"https://avatars.githubusercontent.com/u/195179?v=3","gravatar_id":"","url":"https://api.github.com/users/nibalizer","html_url":"https://github.com/nibalizer","followers_url":"https://api.github.com/users/nibalizer/followers","following_url":"https://api.github.com/users/nibalizer/following{/other_user}","gists_url":"https://api.github.com/users/nibalizer/gists{/gist_id}","starred_url":"https://api.github.com/users/nibalizer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nibalizer/subscriptions","organizations_url":"https://api.github.com/users/nibalizer/orgs","repos_url":"https://api.github.com/users/nibalizer/repos","events_url":"https://api.github.com/users/nibalizer/events{/privacy}","received_events_url":"https://api.github.com/users/nibalizer/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T00:08:26Z","updated_at":"2015-09-22T00:08:26Z","body":"@mhaskel no worries! :)"}}