Bug #12083
closedDomain matching isn't specific enough
Description
As per the discussion on the foreman list1 and on IRC, we are running into an issue where the domain matching is not specific enough to properly match a host. We had suggested
We had suggested replacing https://github.com/theforeman/foreman/blob/develop/app/models/nic/interface.rb#L101 with
self.domain = Domain.all.find { |d| d == name.split('.', 2).last }
but after discussions with Tomer, I realized that this wouldn't match anything correctly if there wasn't a . preceding the domain, and the domain name value that would be returned when querying by domain_id wouldn't have that.
As per that conversation I'm opening up this bug to get a fix that should hopefully provide proper (exact?) domain matching. If any further info is required let me know.
Note: Because of this bug we'll have to clean up our database too since we have a bunch of hosts that are now in disrepair because of it.
[1] https://groups.google.com/forum/#!msg/foreman-users/laa0UwXQo60/PBWVqN_zCQAJ
Updated by Dominic Cleal about 9 years ago
- Related to Bug #6687: Subdomains in Foreman doesn't work added
Updated by Dominic Cleal about 9 years ago
- Category set to Host creation
- Priority changed from High to Normal
Updated by Tomer Brisker about 9 years ago
- Status changed from New to Assigned
- Assignee set to Tomer Brisker
Updated by The Foreman Bot about 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2794 added
- Pull request deleted (
)
Updated by Jon Skarpeteig about 9 years ago
I am still struggling with this issue. Any update on what release this might make it into?
Updated by Anonymous about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 53f87c0b602c99ad94af3d5f6128c0ce48be2cfa.
Updated by Dominic Cleal about 9 years ago
- Translation missing: en.field_release set to 104