Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1362288 - custom rhev hostname length not checked
Summary: custom rhev hostname length not checked
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Quickstart Cloud Installer
Classification: Red Hat
Component: Installation - RHEV
Version: 1.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ga
: 1.0
Assignee: cchase
QA Contact: Tasos Papaioannou
Dan Macpherson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-01 20:09 UTC by Tasos Papaioannou
Modified: 2016-09-13 16:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-13 16:35:02 UTC


Attachments (Terms of Use)
rhev hypervisor error (deleted)
2016-08-01 20:09 UTC, Tasos Papaioannou
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:1862 normal SHIPPED_LIVE Red Hat Quickstart Installer 1.0 2016-09-13 20:18:48 UTC

Description Tasos Papaioannou 2016-08-01 20:09:01 UTC
Created attachment 1186532 [details]
rhev hypervisor error

Description of problem:

RHEV deployments will fail if a free-form hostname for the engine or hypervisor(s) is too long. For example, entering a hypervisor name of 'rhev-hypervisor-6666666666666666666666666666666666666666666666666' causes the RHEV progress bar to hang and eventually time out at 10%. The attached screenshot from the hypervisor's console shows that anaconda fails to create an LVM volume group named 'rhel_rhev-hypervisor-6666666666666666666666666666666666666666666666666'. The error is thrown because the device name derived from the hostname is >55 characters long: 

----
/usr/lib/python2.7/site-packages/blivet/devices/lvm.py:

class LVMVolumeGroupDevice(ContainerDevice):

    @classmethod
    def isNameValid(cls, name):
[...]
        # According to the LVM developers, vgname + lvname is limited to 126 characters
        # minus the number of hyphens, and possibly minus up to another 8 characters
        # in some unspecified set of situations. Instead of figuring all of that out,
        # no one gets a vg or lv name longer than, let's say, 55.
        if len(name) > 55:
            return False

        return True
----

Besides this issue, RFC 1034 for DNS restricts each segment of the fully-qualified domain name to be 63 'octets' or less (including the octet used to store the length of that segment), and the total length to be 255 octets or less.

----
DOMAIN NAMES - CONCEPTS AND FACILITIES

https://tools.ietf.org/html/rfc1034#section-3.1

3.1. Name space specifications and terminology

Each node has a label, which is zero to 63 octets in length.

One label is reserved, and that is the null (i.e., zero length) label used for the root.

Internally, programs that manipulate domain names should represent them
as sequences of labels, where each label is a length octet followed by
an octet string.

To simplify implementations, the total number of octets that represent a
domain name (i.e., the sum of all label octets and label lengths) is
limited to 255.
----


Version-Release number of selected component (if applicable):

QCI-1.0-RHEL-7-20160729.t.0

How reproducible:

100%

Steps to Reproduce:
1.) Start RHEV deployment, setting hypervisor name to be >55 characters.
2.) See RHEV progress bar hang at 10%.
3.) From the hypervisor's console, see the error in the attached screenshot.

Actual results:

Failed deployment with long hostnames.

Expected results:

Long hostnames not allowed, no deployment failures.

Additional info:

Comment 2 cchase 2016-08-09 15:30:50 UTC
https://github.com/fusor/fusor/pull/1140

Hostnames are restricted to 55 characters on the field.  If changed to a value greater than 55 from somewhere else, the deployment review will show an error.

Comment 3 John Matthews 2016-08-10 11:27:44 UTC
QCI-1.0-RHEL-7-20160809.t.1

Comment 4 Tasos Papaioannou 2016-08-12 18:34:29 UTC
The hostname is restricted to 55 characters in the web UI, but kickstart still fails because the lvm volume group name is "rhel_" + hostname. The hostname would need to be restricted to 50 characters

Comment 5 cchase 2016-08-12 19:31:06 UTC
https://github.com/fusor/fusor/pull/1156

bumped it down to 45 chars

Comment 6 cchase 2016-08-15 13:41:14 UTC
Had to remove the server side validation for now so we don't prevent saving a deployment after the domain has been appended to the hostname.

Comment 7 Tasos Papaioannou 2016-08-31 14:26:31 UTC
Verified on QCI-1.0-RHEL-7-20160829.t.0.

Comment 9 errata-xmlrpc 2016-09-13 16:35:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2016:1862


Note You need to log in before you can comment on or make changes to this bug.