{"action":"created","issue":{"url":"https://api.github.com/repos/theforeman/smart-proxy/issues/369","labels_url":"https://api.github.com/repos/theforeman/smart-proxy/issues/369/labels{/name}","comments_url":"https://api.github.com/repos/theforeman/smart-proxy/issues/369/comments","events_url":"https://api.github.com/repos/theforeman/smart-proxy/issues/369/events","html_url":"https://github.com/theforeman/smart-proxy/pull/369","id":129295478,"number":369,"title":"Fixes #13421 - dnscmd now adds/removes records in sub zones","user":{"login":"helge000","id":13696924,"avatar_url":"https://avatars.githubusercontent.com/u/13696924?v=3","gravatar_id":"","url":"https://api.github.com/users/helge000","html_url":"https://github.com/helge000","followers_url":"https://api.github.com/users/helge000/followers","following_url":"https://api.github.com/users/helge000/following{/other_user}","gists_url":"https://api.github.com/users/helge000/gists{/gist_id}","starred_url":"https://api.github.com/users/helge000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helge000/subscriptions","organizations_url":"https://api.github.com/users/helge000/orgs","repos_url":"https://api.github.com/users/helge000/repos","events_url":"https://api.github.com/users/helge000/events{/privacy}","received_events_url":"https://api.github.com/users/helge000/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/theforeman/smart-proxy/labels/Needs%20testing","name":"Needs testing","color":"fbca04"},{"url":"https://api.github.com/repos/theforeman/smart-proxy/labels/Not%20yet%20reviewed","name":"Not yet reviewed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-27T22:51:52Z","updated_at":"2016-01-28T08:22:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/theforeman/smart-proxy/pulls/369","html_url":"https://github.com/theforeman/smart-proxy/pull/369","diff_url":"https://github.com/theforeman/smart-proxy/pull/369.diff","patch_url":"https://github.com/theforeman/smart-proxy/pull/369.patch"},"body":"I could only test this on my production env running 1.10-stable, but this seems to work now running the same patch. \r\n\r\nPlease advice reading from setting `::Proxy::Dns::Plugin.settings.dns_domain` directly...\r\nAlso, I never ever ran Windows DNS without AD, hence I cannot really tell if the old regex method works in this case. \r\nBut in case of AD, for sure the `zonename` parameter has to match the active directory zone and must not contain any sub zone.\r\n\r\nAlso, as I stated in the ticket, I can think of no reliable way to determine this zone name apart from a setting - witch means better ideas welcome!\r\n(Ok, not true, we could use `dnscmd /EnumZones`, parse it and select the best match... but I really think this would overdue it, aka I do not like to be the one implementing this ;)\r\n\r\nThat said a better fallback could be the second level domain?\r\n```\r\nD, [2016-01-27T23:36:54.516411 #3676] DEBUG -- : executing: c:\\windows\\system32\\cmd.exe /c c:\\Windows\\System32\\dnscmd.exe localhost /RecordAdd domain.com testdns2.sec.domain.com. A 192.168.0.155\r\nI, [2016-01-27T23:36:54.563119 #3676]  INFO -- : Added DNS entry testdns2.sec.domain.com => 192.168.0.155\r\nI, [2016-01-27T23:36:54.563119 #3676]  INFO -- : 2001:dbff:2c2c::15 - - [27/Jan/2016 23:36:54] \"POST /dns/ HTTP/1.1\" 200 - 0.0936\r\n```"},"comment":{"url":"https://api.github.com/repos/theforeman/smart-proxy/issues/comments/176048654","html_url":"https://github.com/theforeman/smart-proxy/pull/369#issuecomment-176048654","issue_url":"https://api.github.com/repos/theforeman/smart-proxy/issues/369","id":176048654,"user":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T08:22:57Z","updated_at":"2016-01-28T08:22:57Z","body":"Administrivia: I invited you to our GitHub org to get your PRs tested automatically, thanks for your contributions @helge000.  If you accept, please set membership to public on https://github.com/orgs/theforeman/people so Jenkins can see it.\r\n\r\nThis PR contains a couple of commits - you might need to rebase the latest one on top of develop (`git rebase --onto theforeman/develop HEAD^` or similar)."}}