Univention Bugzilla – Bug 24888
Installer hängt bei sehr langem Domainname/FQDN
Last modified: 2013-12-09 17:24:34 CET
Der Installer hängt sich auf, wenn der letzte Teil des FQDN zu lang ist: mit 26 zeichen funktioniert es noch, mit 30 zeichen hängt er. Der Hostname war 15zeichen, der erste Teil der Domain 14zeichen. FQDN: 15Zeichen.14Zeichen.30Zeichen Auf eine andere TTY kann ich Problemlos wechseln und den Installer neustarten.
Nach der Eingabe des sehr langen FQDNs wurde F12 gedrückt. Anschließend hat der Installer nicht mehr auf F11/F12 reagiert und hing.
We will not ship a UCS 3.1-2 release; the next UCS release will be UCS 3.2. As such, this bug is moved to the new target milestone.
Das lag am regex in syntax_is_domainname(). Den habe ich jetzt etwas vereinfacht, dafür noch zwei weitere Tests (".-" or "-." in domainname) eingebaut. Damit sollte es funktionieren.
The same have to be done for syntax_is_windowsdomain. if "-." in domainname or ".-" in domainname: return False _re = re.compile(r"^([a-z][a-z0-9]+[a-z0-9-]\.)*[a-z][a-z0-9]*$") Also the compiling should be done outside of the function otherwise it has no advantage compared to re.match(..., ...).
(In reply to Florian Best from comment #4) > The same have to be done for syntax_is_windowsdomain. > > if "-." in domainname or ".-" in domainname: > return False > _re = re.compile(r"^([a-z][a-z0-9]+[a-z0-9-]\.)*[a-z][a-z0-9]*$") > > Also the compiling should be done outside of the function otherwise it has > no advantage compared to re.match(..., ...). ok, fixed syntax_is_windowsdomain, removed the "." test from the regex, which leeds to: ^[a-z][a-z0-9-]*[a-z0-9]$ because dots aren't allowed anyway (see installer/modules/50_basis.py)
The fix allows "foo..bar". Philipp suggested: def is_domainname(domainname): """ Check if domainname is a valid DNS domainname accoring to RFC952/1123. >>> is_domainname('foo') True >>> is_domainname('f00.bar') True >>> is_domainname('-f.bar') False >>> is_domainname('f-.bar') False >>> is_domainname('f..bar') False >>> is_domainname('#.bar') False >>> is_domainname('1234567890123456789012345678901234567890123456789012345678901234.bar') False """ return all(is_domainname.RE.match(_) for _ in domainname.split('.')) is_domainname.RE = re.compile(r'^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$', re.I)
fixed
Windowsdomain with one char is now disallowed → REOPENED.
fixed, + if domainname.endswith("-") or domainname.startswith("-") or "--" in domainname: + return False + _re=re.compile("^[a-z0-9-]+$")
I could successfully install system with a 15.14.30 FQDN. Basic UMC tests of the installed systems were succesful. Changelog entry exists.
UCS 3.2 has been released: http://docs.univention.de/release-notes-3.2-en.html http://docs.univention.de/release-notes-3.2-de.html If this error occurs again, please use "Clone This Bug".