{"action":"created","issue":{"url":"https://api.github.com/repos/theforeman/foreman/issues/3206","repository_url":"https://api.github.com/repos/theforeman/foreman","labels_url":"https://api.github.com/repos/theforeman/foreman/issues/3206/labels{/name}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/3206/comments","events_url":"https://api.github.com/repos/theforeman/foreman/issues/3206/events","html_url":"https://github.com/theforeman/foreman/pull/3206","id":134525673,"number":3206,"title":"Fixes #13725 - MAC conflicts are reported correctly","user":{"login":"lzap","id":49752,"avatar_url":"https://avatars.githubusercontent.com/u/49752?v=3","gravatar_id":"","url":"https://api.github.com/users/lzap","html_url":"https://github.com/lzap","followers_url":"https://api.github.com/users/lzap/followers","following_url":"https://api.github.com/users/lzap/following{/other_user}","gists_url":"https://api.github.com/users/lzap/gists{/gist_id}","starred_url":"https://api.github.com/users/lzap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzap/subscriptions","organizations_url":"https://api.github.com/users/lzap/orgs","repos_url":"https://api.github.com/users/lzap/repos","events_url":"https://api.github.com/users/lzap/events{/privacy}","received_events_url":"https://api.github.com/users/lzap/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/theforeman/foreman/labels/Needs%20testing","name":"Needs testing","color":"fbca04"},{"url":"https://api.github.com/repos/theforeman/foreman/labels/Not%20yet%20reviewed","name":"Not yet reviewed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-18T09:25:12Z","updated_at":"2016-03-01T10:35:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/3206","html_url":"https://github.com/theforeman/foreman/pull/3206","diff_url":"https://github.com/theforeman/foreman/pull/3206.diff","patch_url":"https://github.com/theforeman/foreman/pull/3206.patch"},"body":"In patch https://github.com/theforeman/foreman/pull/2022 we removed MAC\nconflicts validation because PXE-booted hosts (usually those which were\ndiscovered) were generating multiple leases on some BIOSes leading to MAC\nconflicts.\n\nWe have fixed how proxy handles multiple records, therefore proxy API no longer\nexpose those and always returns the latest lease, if there are multiple.\nTherefore we can enable MAC validation back. I have tested this with discovered\nhosts with multiple leases and it works fine.\n\nReproducer: Try to create a host with existing MAC address, it will correctly\nissue a conflict. Without this patch, proxy Error 409 was raised.\n\nAlso added one more test for better coverage."},"comment":{"url":"https://api.github.com/repos/theforeman/foreman/issues/comments/190655184","html_url":"https://github.com/theforeman/foreman/pull/3206#issuecomment-190655184","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/3206","id":190655184,"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-03-01T10:35:59Z","updated_at":"2016-03-01T10:35:59Z","body":"I'm trying to understand why the ticket here (http://projects.theforeman.org/issues/13725) reports an error from the smart proxy (difficult, as there aren't logs or data).  Is this because there's a DHCP _reservation_ with the same MAC address?\r\n\r\nI'm comparing this with the Discovery scenario at http://projects.theforeman.org/issues/8727#note-2, which explains that there can be two _leases_ with the same MAC address, but different IPs.\r\n\r\nIs there a behaviour difference in the smart proxy (or ISC DHCP) that a conflict can occur with multiple reservations with the same MAC, but not leases, hence trying to delete those conflicts now but ignoring them in #8727?\r\n\r\n#8727 seems to be about disabling the overwrite confirmation box when using Discovery.  If you apply this patch, wouldn't it still flag up a conflict for `[mac1, ip2] - dhcpcd lease` (taking the example from http://projects.theforeman.org/issues/8727#note-2) assuming the host form has `[mac1, ip3]`?\r\n\r\n---\r\n\r\nAlso, could you put the info from the PR description into the commit message too, so it's preserved for posterity?  This level of detail is very useful later."}}