Project

General

Profile

Bug #3156

Foreman allows underscores in hostnames

Added by Petter Hassberg almost 9 years ago. Updated about 8 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Host creation
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

If I enter a hostname with an underscore in it while creating a new host,

eg "ore1-func_2", then foreman won't complain although the smart-proxy won't be able to update the dns record.


Related issues

Is duplicate of Foreman - Bug #3697: Field Validations Should be more ComprehensiveClosed2013-11-20

History

#1 Updated by Petter Hassberg almost 9 years ago

reproduced in foreman-1.2.1-1.el6.noarch

#2 Updated by Dominic Cleal almost 9 years ago

  • Category set to Host creation

We'll have to be careful implementing this, as underscores are valid in domains. Perhaps we can prohibit it in the hostname and permit it only in the domain portion.

#3 Updated by Greg Sutcliffe almost 9 years ago

If you go down that road, watch out for unmanaged Hosts, we specify the FQDN in the name field there...

#4 Updated by Ewoud Kohl van Wijngaarden almost 9 years ago

Since those host names are not allowed by the DNS RFC, it should be discouraged. (In practice it may or may not work since most software does accept it.) From http://domainkeys.sourceforge.net/underscore.html: Host names are not allowed to have underscores in them. In DNS, host names are the name fields of A or MX records or the data fields of the SOA and NS records. Thus, there are many DNS entries that are not hostnames.

#5 Updated by Dominic Cleal about 8 years ago

  • Is duplicate of Bug #3697: Field Validations Should be more Comprehensive added

#6 Updated by Dominic Cleal about 8 years ago

  • Status changed from New to Duplicate

Shipped in 1.4 via #3697.

Also available in: Atom PDF