{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/45633","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/45633/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/45633/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/45633/events","html_url":"https://github.com/saltstack/salt/pull/45633","id":290861558,"node_id":"MDExOlB1bGxSZXF1ZXN0MTY0NTkzMzEx","number":45633,"title":"modules.debian_ip: Fix resolv.conf handling","user":{"login":"eliasp","id":48491,"node_id":"MDQ6VXNlcjQ4NDkx","avatar_url":"https://avatars0.githubusercontent.com/u/48491?v=4","gravatar_id":"","url":"https://api.github.com/users/eliasp","html_url":"https://github.com/eliasp","followers_url":"https://api.github.com/users/eliasp/followers","following_url":"https://api.github.com/users/eliasp/following{/other_user}","gists_url":"https://api.github.com/users/eliasp/gists{/gist_id}","starred_url":"https://api.github.com/users/eliasp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliasp/subscriptions","organizations_url":"https://api.github.com/users/eliasp/orgs","repos_url":"https://api.github.com/users/eliasp/repos","events_url":"https://api.github.com/users/eliasp/events{/privacy}","received_events_url":"https://api.github.com/users/eliasp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-01-23T14:39:42Z","updated_at":"2018-08-28T19:34:44Z","closed_at":"2018-05-29T14:45:03Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/45633","html_url":"https://github.com/saltstack/salt/pull/45633","diff_url":"https://github.com/saltstack/salt/pull/45633.diff","patch_url":"https://github.com/saltstack/salt/pull/45633.patch"},"body":"### What does this PR do?\r\nDon't try to write `/etc/resolv.conf` if it's a symlink.\r\n\r\n`resolv.conf` might be runtime-managed by `systemd-resolved`,\r\n`resolvconf` or similar tools, which is indicated by `/etc/resolv.conf`\r\njust being a symlink e.g. to `/run/systemd/resolve/stub-resolv.conf`\r\n\r\nJust skip any kind of modifications of `resolv.conf` in those cases, as\r\nthis intrudes the domain of those tools and leads to broken resolvers\r\nand causes flip-flopping of the corresponding state.\r\n\r\nFurthermore, it ensures no empty `search` entries are written to `resolv.conf`.\r\n\r\n### What issues does this PR fix or reference?\r\nNone\r\n\r\n### Previous Behavior\r\nUsing `modules.debian_ip` (e.g. through a `network.hostname` state) caused corruption of DNS resolution through empty `search` entries and modifying `resolv.conf` which might be actually runtime-managed e.g. by `systemd-resolved`.\r\n\r\n### New Behavior\r\n- don't touch `/etc/resolv.conf` if it's a symlink\r\n- don't write empty `search` entries to `resolv.conf`\r\n\r\n### Tests written?\r\n\r\nNo\r\n\r\n### Commits signed with GPG?\r\n\r\nYes"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/416713085","html_url":"https://github.com/saltstack/salt/pull/45633#issuecomment-416713085","issue_url":"https://api.github.com/repos/saltstack/salt/issues/45633","id":416713085,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjcxMzA4NQ==","user":{"login":"eliasp","id":48491,"node_id":"MDQ6VXNlcjQ4NDkx","avatar_url":"https://avatars0.githubusercontent.com/u/48491?v=4","gravatar_id":"","url":"https://api.github.com/users/eliasp","html_url":"https://github.com/eliasp","followers_url":"https://api.github.com/users/eliasp/followers","following_url":"https://api.github.com/users/eliasp/following{/other_user}","gists_url":"https://api.github.com/users/eliasp/gists{/gist_id}","starred_url":"https://api.github.com/users/eliasp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliasp/subscriptions","organizations_url":"https://api.github.com/users/eliasp/orgs","repos_url":"https://api.github.com/users/eliasp/repos","events_url":"https://api.github.com/users/eliasp/events{/privacy}","received_events_url":"https://api.github.com/users/eliasp/received_events","type":"User","site_admin":false},"created_at":"2018-08-28T19:34:44Z","updated_at":"2018-08-28T19:34:44Z","author_association":"MEMBER","body":"@rallytime I've pushed updates to the corresponding branch with the intention of finally finishing this and then also forward-porting it to 2018.3 and newer… could you re-open the PR so I can see whether my latest commit fixes the failing test?"}}
{"actor":{"display_login":"eliasp"}}