Project

General

Profile

Actions

Bug #12083

closed

Domain matching isn't specific enough

Added by James A. over 8 years ago. Updated almost 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 over 8 years ago

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

Updated by Dominic Cleal over 8 years ago

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

Updated by Tomer Brisker over 8 years ago

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

Updated by The Foreman Bot over 8 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 over 8 years ago

I am still struggling with this issue. Any update on what release this might make it into?

Actions #6

Updated by Anonymous over 8 years ago

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

Updated by Dominic Cleal over 8 years ago

  • translation missing: en.field_release set to 104
Actions

Also available in: Atom PDF