{"action":"created","issue":{"url":"https://api.github.com/repos/chef-cookbooks/yum-mysql-community/issues/7","labels_url":"https://api.github.com/repos/chef-cookbooks/yum-mysql-community/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/yum-mysql-community/issues/7/comments","events_url":"https://api.github.com/repos/chef-cookbooks/yum-mysql-community/issues/7/events","html_url":"https://github.com/chef-cookbooks/yum-mysql-community/issues/7","id":119689388,"number":7,"title":"Cookbook generate repo config without baseurl","user":{"login":"UnderGreen","id":2656737,"avatar_url":"https://avatars.githubusercontent.com/u/2656737?v=3","gravatar_id":"","url":"https://api.github.com/users/UnderGreen","html_url":"https://github.com/UnderGreen","followers_url":"https://api.github.com/users/UnderGreen/followers","following_url":"https://api.github.com/users/UnderGreen/following{/other_user}","gists_url":"https://api.github.com/users/UnderGreen/gists{/gist_id}","starred_url":"https://api.github.com/users/UnderGreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnderGreen/subscriptions","organizations_url":"https://api.github.com/users/UnderGreen/orgs","repos_url":"https://api.github.com/users/UnderGreen/repos","events_url":"https://api.github.com/users/UnderGreen/events{/privacy}","received_events_url":"https://api.github.com/users/UnderGreen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-01T10:38:37Z","updated_at":"2015-12-03T12:44:59Z","closed_at":"2015-12-02T06:14:27Z","body":"Hi, \r\nWith version 0.1.20 of cookbook on Centos 7 repo file is:\r\n```ini\r\n# This file was generated by Chef\r\n# Do NOT modify this file by hand.\r\n\r\n[mysql55-community]\r\nname=MySQL 5.5 Community Server\r\nenabled=1\r\nfailovermethod=priority\r\ngpgcheck=1\r\n```\r\nI think problem in code `baseurl node['yum']['mysql55-community']['baseurl'] if  node['yum']['mysql55-community']['baseurl'].nil?`. Maybe in this place should be `unless`?\r\n\r\nAddition information about system:\r\n```\r\nknife node show chef12-client.test -l | grep -E '^platform'\r\nplatform:          centos\r\nplatform_family:   rhel\r\nplatform_version:  7.1.1503\r\n```"},"comment":{"url":"https://api.github.com/repos/chef-cookbooks/yum-mysql-community/issues/comments/161623425","html_url":"https://github.com/chef-cookbooks/yum-mysql-community/issues/7#issuecomment-161623425","issue_url":"https://api.github.com/repos/chef-cookbooks/yum-mysql-community/issues/7","id":161623425,"user":{"login":"eric-tucker","id":2693414,"avatar_url":"https://avatars.githubusercontent.com/u/2693414?v=3","gravatar_id":"","url":"https://api.github.com/users/eric-tucker","html_url":"https://github.com/eric-tucker","followers_url":"https://api.github.com/users/eric-tucker/followers","following_url":"https://api.github.com/users/eric-tucker/following{/other_user}","gists_url":"https://api.github.com/users/eric-tucker/gists{/gist_id}","starred_url":"https://api.github.com/users/eric-tucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eric-tucker/subscriptions","organizations_url":"https://api.github.com/users/eric-tucker/orgs","repos_url":"https://api.github.com/users/eric-tucker/repos","events_url":"https://api.github.com/users/eric-tucker/events{/privacy}","received_events_url":"https://api.github.com/users/eric-tucker/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T12:44:59Z","updated_at":"2015-12-03T12:44:59Z","body":"The problem is that one cannot have a successful Chef run after having 0.1.20 unleashed on their servers as the broken yum repo prevents the Chef run from getting to the point where the updated cookbook fixes the repo file (unless you happen to have no yum calls before getting to this cookbook).\r\n\r\nSo anyone who encounters this issue, you have to manually remove the broken repo file before running Chef to fix the issue.\r\n\r\nI'm surprised this wasn't caught in testing.  It is trivial to reproduce using cookbook version 0.1.20.  Just set your cookbook dependency to this version and run Chef. Things immediately blow up when yum tries to refresh cache based on the new/updated repo file.\r\n"}}