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 #1

Updated by Dominic Cleal about 9 years ago

  • Related to Bug #6687: Subdomains in Foreman doesn't work added
Actions #2

Updated by Dominic Cleal about 9 years ago

  • Category set to Host creation
  • Priority changed from High to Normal
Actions #3

Updated by Tomer Brisker about 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Tomer Brisker
Actions #4

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 ()
Actions #5

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?

Actions #6

Updated by Anonymous about 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #7

Updated by Dominic Cleal about 9 years ago

  • Translation missing: en.field_release set to 104
Actions

Also available in: Atom PDF