{"action":"created","issue":{"url":"https://api.github.com/repos/chef-cookbooks/resolver/issues/30","repository_url":"https://api.github.com/repos/chef-cookbooks/resolver","labels_url":"https://api.github.com/repos/chef-cookbooks/resolver/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/resolver/issues/30/comments","events_url":"https://api.github.com/repos/chef-cookbooks/resolver/issues/30/events","html_url":"https://github.com/chef-cookbooks/resolver/issues/30","id":250789452,"number":30,"title":"resolve.conf is not updated during the first Chef run","user":{"login":"pinterl","id":12851573,"avatar_url":"https://avatars0.githubusercontent.com/u/12851573?v=4","gravatar_id":"","url":"https://api.github.com/users/pinterl","html_url":"https://github.com/pinterl","followers_url":"https://api.github.com/users/pinterl/followers","following_url":"https://api.github.com/users/pinterl/following{/other_user}","gists_url":"https://api.github.com/users/pinterl/gists{/gist_id}","starred_url":"https://api.github.com/users/pinterl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinterl/subscriptions","organizations_url":"https://api.github.com/users/pinterl/orgs","repos_url":"https://api.github.com/users/pinterl/repos","events_url":"https://api.github.com/users/pinterl/events{/privacy}","received_events_url":"https://api.github.com/users/pinterl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-16T23:32:10Z","updated_at":"2017-08-17T00:27:15Z","closed_at":null,"body":"### Cookbook version\r\nresolver (2.0.1)\r\n\r\n### Chef-client version\r\nChef Development Kit Version: 1.0.3\r\nchef-client version: 12.16.42\r\ndelivery version: master (83358fb62c0f711c70ad5a81030a6cae4017f103)\r\nberks version: 5.2.0\r\nkitchen version: 1.13.2\r\n\r\n### Platform Details\r\nRHEL7 in AWS\r\n\r\n### Scenario:\r\nWe are setting the DNS server IP addresses to be able to resolve URLs by name in our private network.\r\n\r\n### Steps to Reproduce:\r\nWe execute\r\n`include_recipe 'resolver'`\r\nfrom a custom resource.\r\nnode['resolver']['nameservers'] contains the list of new IP addresses.\r\n\r\n### Expected Result:\r\nWe expect resolver to update the /etc/resolv.conf file.\r\n\r\n### Actual Result:\r\nThe first Chef run cannot update the /etc/resolv.conf file, but the second Chef run can successfully change it.\r\n \r\nFor security reasons I have removed the IP addresses from this post.\r\n\r\nThe output of the first Chef run\r\n-------------------------------\r\n Recipe: resolver::default\r\n           * template[/etc/resolv.conf] action create\r\n             - update content in file /etc/resolv.conf from 0de330 to 2884f0\r\n             --- /etc/resolv.conf\t2017-08-16 19:01:33.443880993 -0400\r\n             +++ /etc/.chef-resolv.conf20170816-2172-1l49kpx\t2017-08-16 19:03:47.852498628 -0400\r\n             @@ -1,4 +1,7 @@\r\n             -# Generated by NetworkManager\r\n             -search ec2.internal\r\n             -nameserver 10....OLD_IP\r\n             +#\r\n             +# This file is generated by Chef\r\n             +# Do not edit, changes will be overwritten\r\n             +#\r\n             +nameserver 10.....NEW_IP1\r\n             +nameserver 10.....NEW_IP2\r\n             - restore selinux security context\r\n\r\n-------------------------------------------------\r\n\r\nBut the actual content of the file is\r\n----------------------------------\r\n\r\n>     cat /etc/resolv.conf\r\n>     # Generated by NetworkManager\r\n>     search ec2.internal\r\n>     nameserver 10....OLD_IP\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/chef-cookbooks/resolver/issues/comments/322935540","html_url":"https://github.com/chef-cookbooks/resolver/issues/30#issuecomment-322935540","issue_url":"https://api.github.com/repos/chef-cookbooks/resolver/issues/30","id":322935540,"user":{"login":"ccope","id":412019,"avatar_url":"https://avatars3.githubusercontent.com/u/412019?v=4","gravatar_id":"","url":"https://api.github.com/users/ccope","html_url":"https://github.com/ccope","followers_url":"https://api.github.com/users/ccope/followers","following_url":"https://api.github.com/users/ccope/following{/other_user}","gists_url":"https://api.github.com/users/ccope/gists{/gist_id}","starred_url":"https://api.github.com/users/ccope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccope/subscriptions","organizations_url":"https://api.github.com/users/ccope/orgs","repos_url":"https://api.github.com/users/ccope/repos","events_url":"https://api.github.com/users/ccope/events{/privacy}","received_events_url":"https://api.github.com/users/ccope/received_events","type":"User","site_admin":false},"created_at":"2017-08-17T00:27:15Z","updated_at":"2017-08-17T00:27:15Z","body":"This sounds similar to issue #20. The file is getting updated by chef, but then NetworkManager seems to be writing over it again. Can you confirm whether `/etc/resolv.conf` is a symlink by running `file /etc/resolv.conf`?"}}
{"actor":{"display_login":"ccope"}}