Project

General

Profile

Actions

Bug #12083

closed

Domain matching isn't specific enough

Added by James A. about 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Host creation
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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


Related issues 1 (1 open0 closed)

Related to Foreman - Bug #6687: Subdomains in Foreman doesn't workNew07/18/2014Actions
Actions

Also available in: Atom PDF