#4710 ipa-server-install: Cannot handle double hyphen "--" in hostname
Closed: Fixed None Opened 9 years ago by mkosek.

Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1160555

Actually I encountered this problem with CentOS "7.0-1406" but because I could
fix the faulty python script myself (easily) I thought to post the solution as
well here.

When running:
~]# ipa-server-install
Server host name [becke-ch--directory--s0-v1.becke.ch]:
I get:
Invalid hostname 'becke-ch--directory--s0-v1.becke.ch', only letters, numbers,
'-' are allowed. DNS label may not start or end with '-'

BUT when I enter:
Server host name [becke-ch--directory--s0-v1.becke.ch]:
Then it runs fine.


Name        : ipa-server
Arch        : x86_64
Version     : 3.3.3

Replace regex repetition character "?" with "*": See:
]# diff util.py /usr/lib/python2.7/site-packages/ipalib/util.py
< label_regex =
r'^[%(base)s%(extra)s]([%(base)s%(extra)s%(middle)s]?[%(base)s%(extra)s])*$' \
> label_regex =
r'^[%(base)s%(extra)s]([%(base)s%(extra)s%(middle)s]*[%(base)s%(extra)s])*$' \

Given we have the fix proposed and it is a simple localized bug, I think we can do it in current bugfixing release.

We have to wait for https://bugzilla.redhat.com/show_bug.cgi?id=1162173 to be fixed, because the double hyphen also breaks CA setup later during the install.

Processing 4.2 backlog. This ticket was found as something that is not a priority for the nearest releases.

But as usual, please feel free to discuss your use cases or contribute patches, to make that happen sooner!

We should first wait for https://fedorahosted.org/pki/ticket/1260 to be fixed, then proceed with relaxing the hostname validation.

Moving back to IPA, dogtag with fix has been released


  • 15cfd0e allow multiple dashes in the components of server hostname

Metadata Update from @mkosek:
- Issue assigned to mbabinsk
- Issue set to the milestone: FreeIPA 4.4.1

6 years ago

Login to comment on this ticket.