Bug #1132

host validation doesn't like hyphens after first dot

Added by Eric Eisenhart about 4 years ago. Updated about 4 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Puppet Community % Done:

0%

Category:-
Target version:0.24.3
Affected Puppet version:0.25.4 Branch:
Keywords:
Votes: 0

Description

host didn’t want to work with a few of our odder hostnames (giving errors on the client), and I tracked the problem down to the validate routine in puppet/type/host.rb.

Basically, “foo-bar” works, “foo-bar.baz” works, but “foo.bar-baz” doesn’t. And all three should.

Attaching patch that fixes the problem and adds tests for a number of different formats of valid hostname.

Alternately, using something more like the original pseudo-code in #151 might be even better.

host-validate.patch (1.4 kB) Eric Eisenhart, 03/12/2008 09:53 pm

host-validate-alternate.patch (1.9 kB) Eric Eisenhart, 03/13/2008 12:24 am

History

Updated by Luke Kanies about 4 years ago

  • Status changed from 1 to Closed
  • 7 set to fixed

Applied in [056d213].

Updated by Luke Kanies about 4 years ago

Very strange; that commit seems to be lost. Redon in r4956323.

Also available in: Atom PDF