Bug #4599

Managed interfaces do not create proper DNS records

Added by Trey Dockendorf over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Trey Dockendorf
Category:Network
Target version:Sprint 23
Difficulty: Bugzilla link:
Found in release:1.4.1 Pull request:
Story points-
Velocity based estimate-
Release1.5.0Release relationshipAuto

Description

A host's managed interfaces, including BMC, create invalid PTR DNS records and do not create A records. This is due to the DNS record for the interface using it's short name (no domain name appended).


Related issues

Related to Foreman - Bug #2750: DNS record for BMC interface don't append domain name Duplicate 07/05/2013
Related to Foreman - Tracker #5409: DNS Proxy Improvements New 04/23/2014
Related to Foreman - Bug #6374: NIC with domain but no hostname tries to create ".domain.... Closed 06/25/2014

Associated revisions

Revision 21e07e92
Added by Trey Dockendorf over 3 years ago

fixes #4599 - DNS and DHCP records for BMC and managed interfaces not using FQDN

Revision 0ef59e67
Added by Trey Dockendorf over 3 years ago

fixes #4599 - DNS and DHCP records for BMC and managed interfaces not using FQDN

(cherry picked from commit 21e07e92ca2d0341a09de48fadfa95625f6d9f55)

History

#1 Updated by Trey Dockendorf over 3 years ago

This also effects DHCP records created for managed interfaces.

Example from rails console:

irb(main):005:0> host = Host.find_by_name('vm01.DOMAIN')
  Host::Managed Load (0.3ms)  SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`type` IN ('Host::Managed') AND `hosts`.`name` = 'vm01.DOMAIN' LIMIT 1
=> #<Host::Managed id: 60, name: "vm01.DOMAIN", ip: "192.168.202.101", last_compile: "2014-02-14 18:43:52", last_freshcheck: nil, last_report: "2014-02-14 18:43:41", updated_at: "2014-02-14 18:44:04", source_file_id: nil, created_at: "2014-01-16 19:53:48", mac: "00:30:48:bc:98:1e", root_pass: nil, serial: nil, puppet_status: 1241522176, domain_id: 1, architecture_id: 1, operatingsystem_id: 8, environment_id: 2, subnet_id: 1, ptable_id: 13, medium_id: 7, build: false, comment: "", disk: "", installed_at: "2014-02-14 01:24:53", model_id: 4, hostgroup_id: 26, owner_id: nil, owner_type: nil, enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: 1, certname: "vm01.DOMAIN", image_id: nil, organization_id: nil, location_id: nil, type: "Host::Managed", compute_profile_id: nil>
irb(main):006:0> host.dns_a_record
  Domain Load (0.2ms)  SELECT `domains`.* FROM `domains` WHERE `domains`.`id` = 1 ORDER BY domains.name LIMIT 1
  SmartProxy Load (0.1ms)  SELECT `smart_proxies`.* FROM `smart_proxies` WHERE `smart_proxies`.`id` = 1 ORDER BY smart_proxies.name LIMIT 1
=> vm01.DOMAIN/192.168.202.101
irb(main):007:0> host.dns_ptr_record
  Subnet Load (0.2ms)  SELECT `subnets`.* FROM `subnets` WHERE `subnets`.`id` = 1 ORDER BY vlanid LIMIT 1
  SmartProxy Load (0.1ms)  SELECT `smart_proxies`.* FROM `smart_proxies` WHERE `smart_proxies`.`id` = 1 ORDER BY smart_proxies.name LIMIT 1
=> 192.168.202.101/vm01.DOMAIN
irb(main):008:0> interface = host.interfaces.first
  Nic::Base Load (0.3ms)  SELECT `nics`.* FROM `nics` WHERE `nics`.`host_id` = 60 LIMIT 1
=> #<Nic::BMC id: 34, mac: "00:30:48:bc:98:20", ip: "192.168.206.101", type: "Nic::BMC", name: "vm01-bmc", host_id: 60, subnet_id: 2, domain_id: 1, attrs: {:username=>"ADMIN", :password=>"ADMIN", :provider=>"IPMI"}, created_at: "2014-01-16 19:54:41", updated_at: "2014-01-16 19:54:41">
irb(main):009:0> interface.dns_a_record
  Domain Load (0.2ms)  SELECT `domains`.* FROM `domains` WHERE `domains`.`id` = 1 ORDER BY domains.name LIMIT 1
  SmartProxy Load (0.1ms)  SELECT `smart_proxies`.* FROM `smart_proxies` WHERE `smart_proxies`.`id` = 1 ORDER BY smart_proxies.name LIMIT 1
  Host::Managed Load (0.1ms)  SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`type` IN ('Host::Managed') AND `hosts`.`id` = 60 LIMIT 1
=> vm01-bmc/192.168.206.101
irb(main):010:0> interface.dns_ptr_record
  Subnet Load (0.2ms)  SELECT `subnets`.* FROM `subnets` WHERE `subnets`.`id` = 2 ORDER BY vlanid LIMIT 1
  SmartProxy Load (0.2ms)  SELECT `smart_proxies`.* FROM `smart_proxies` WHERE `smart_proxies`.`id` = 1 ORDER BY smart_proxies.name LIMIT 1
=> 192.168.206.101/vm01-bmc
irb(main):011:0> host.dhcp_record
  SmartProxy Load (0.3ms)  SELECT `smart_proxies`.* FROM `smart_proxies` WHERE `smart_proxies`.`id` = 1 ORDER BY smart_proxies.name LIMIT 1
  Operatingsystem Load (0.1ms)  SELECT `operatingsystems`.* FROM `operatingsystems` WHERE `operatingsystems`.`id` = 8 ORDER BY operatingsystems.name LIMIT 1
  SmartProxy Load (0.2ms)  SELECT `smart_proxies`.* FROM `smart_proxies` WHERE `smart_proxies`.`id` = 1 ORDER BY smart_proxies.name LIMIT 1
=> vm01.DOMAIN-00:30:48:bc:98:1e/192.168.202.101
irb(main):012:0> interface.dhcp_record
  SmartProxy Load (0.2ms)  SELECT `smart_proxies`.* FROM `smart_proxies` WHERE `smart_proxies`.`id` = 1 ORDER BY smart_proxies.name LIMIT 1
=> vm01-bmc-00:30:48:bc:98:20/192.168.206.101

#2 Updated by Trey Dockendorf over 3 years ago

  • Related to Bug #2750: DNS record for BMC interface don't append domain name added

#3 Updated by Trey Dockendorf over 3 years ago

  • Assigned To set to Trey Dockendorf

#4 Updated by Stephen Benjamin over 3 years ago

#5 Updated by Dominic Cleal over 3 years ago

  • Status changed from New to Ready For Testing
  • Target version set to Sprint 22

#6 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 22 to Sprint 23

#7 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 23 to Sprint 22

#8 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 22 to Sprint 23

#9 Updated by Dominic Cleal over 3 years ago

  • Release set to 1.5.0

#10 Updated by Trey Dockendorf over 3 years ago

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

#11 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #6374: NIC with domain but no hostname tries to create ".domain.com" DNS record added

Also available in: Atom PDF