Changing target node hostname to '3-edon' stops dnsmasq on Fuel master and breaks deployment process

Bug #1585992 reported by Igor Zinovik
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Dmitry Teselkin
Mitaka
Won't Fix
Medium
Maksim Malchuk

Bug Description

Detailed bug description:
 If end user changes node hostname (no matter what role it is assigned) to
 something that is starting from digit [0-9] or dash [-]. Then dnsmasq fails
 to start on Fuel master node with error message:

[root@nailgun log]# pgrep dnsmasq
[root@nailgun log]# dnsmasq -k
dnsmasq: bad DHCP host name at line 50 of /etc/dnsmasq.conf (line
[root@nailgun log]# sed -n '50 p' /etc/dnsmasq.conf
dhcp-host=net:x86_64,64:26:f7:65:b6:91,3-edon.test.domain.local,10.109.0.5

Since all target nodes use Fuel master node as name server before l23network
reconfigures their /etc/resolv.conf, all further environment deployements will
fail.

Steps to reproduce:
 1. Create env with 1 controller.
 2. Change controllers hostname to 1-edon:
    press gear button on the Nodes pane
    press pencil button and enter 1-edon into text field
    hit enter
 3. Press 'Deploy changes' on the Dashboard pane

Expected results:
 Cluster gets successfully deployed or input text field validates
 that hostname cannot start with digit or dash.

Actual result:
 dnsmasq process on master node stops. Deployment stops.
root@3-edon:~# fgrep 'err):' /var/log/puppet.log
2016-05-26 09:22:55 +0000 Puppet (err): getaddrinfo: Name or service not known at /etc/puppet/modules/osnailyfacter/manifests/fuel_pkgs/setup_repositories.pp:21 on node 3-edon.test.domain.local
2016-05-26 09:22:55 +0000 Puppet (err): getaddrinfo: Name or service not known at /etc/puppet/modules/osnailyfacter/manifests/fuel_pkgs/setup_repositories.pp:21 on node 3-edon.test.domain.local
2016-05-26 09:23:27 +0000 Puppet (err): getaddrinfo: Name or service not known at /etc/puppet/modules/osnailyfacter/manifests/fuel_pkgs/setup_repositories.pp:21 on node 3-edon.test.domain.local
2016-05-26 09:23:27 +0000 Puppet (err): getaddrinfo: Name or service not known at /etc/puppet/modules/osnailyfacter/manifests/fuel_pkgs/setup_repositories.pp:21 on node 3-edon.test.domain.local
2016-05-26 09:24:01 +0000 Puppet (err): getaddrinfo: Name or service not known at /etc/puppet/modules/osnailyfacter/manifests/fuel_pkgs/setup_repositories.pp:21 on node 3-edon.test.domain.local
2016-05-26 09:24:01 +0000 Puppet (err): getadd

Reproducibility:
 100%

Workaround:
 Change hostname to something that is valid for dnsmasq configuration.
 Manually edit (remove entry) from /etc/dnsmasq.conf on master node and
 restart dns server.

Impact:
 No more environments can be deployed with master node, because nodes need
 to resolve dns names with package mirrors.

Description of the environment:
 Operation system:
 Ubuntu 14.04

 Versions of components:
 Fuel 9.0 #397
 fuel-plugin-vmware-dvs-3.0-3.0.0-1-475.noarch.rpm
 vCenter 5.5

Additional information:
 I tried to deploy plugin with vCenter as hypervisor and used Fuel VMware DVS plugin
 as network backend for Neutron, but I seriously doubt that issue described above
 is plugin specific.

Tags: area-library
Igor Zinovik (izinovik)
Changed in fuel:
importance: Undecided → High
Revision history for this message
Igor Zinovik (izinovik) wrote :
Revision history for this message
Michael Polenchuk (mpolenchuk) wrote :

Originally the hostname couldn't start with a digit or underscore (RFC 952) but the new specification RFC 1123 allows it.

Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

The Internet standards (Requests for Comments) for protocols mandate that component hostname labels may contain only the ASCII letters 'a' through 'z' (in a case-insensitive manner), the digits '0' through '9', and the hyphen ('-'). The original specification of hostnames in RFC 952, mandated that labels could not start with a digit or with a hyphen, and must not end with a hyphen. However, a subsequent specification (RFC 1123) permitted hostname labels to start with digits.

Anyway it is should be fixed, but this is not a high importance bug.
Lowering to the medium importance and moved to 10.0 due to HCF.

Changed in fuel:
status: New → Confirmed
importance: High → Medium
assignee: Fuel Dev (fuel-dev) → Fuel Sustaining (fuel-sustaining-team)
milestone: 9.0 → 10.0
tags: added: area-library
Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Maksim Malchuk (mmalchuk)
Revision history for this message
Igor Zinovik (izinovik) wrote :

All nodes be offline in Fuel web UI, because of dnsmasq stoppage.

Problem is quite serious, but setting importance to High, because
workaround exist.

Revision history for this message
Michael Polenchuk (mpolenchuk) wrote :
Revision history for this message
Michael Polenchuk (mpolenchuk) wrote :

Affected by patch "dnsmasq-2.66-Tighten_checks_in_legal_hostname.patch"

Revision history for this message
Igor Zinovik (izinovik) wrote :

dnsmasq version if 2.66 on Fuel 9.0 #397.

Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

Won't fix for 9.0 because of HCF

Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

to build our custom package this can be added as Patch22 for https://git.centos.org/git/rpms/dnsmasq.git branch c7

Changed in fuel:
assignee: Maksim Malchuk (mmalchuk) → Dmitry Teselkin (teselkin-d)
Revision history for this message
Dmitry Teselkin (teselkin-d) wrote : Re: [Bug 1585992] [NEW] Changing target node hostname to '3-edon' stops dnsmasq on Fuel master and breaks deployment process
Download full text (3.7 KiB)

According to RFC-1123 only digits and letters can be the first character in
hostname.

On Aug 24, 2016 8:55 PM, "Launchpad Bug Tracker" <email address hidden>
wrote:

> You have assigned this bug to yourself for mitaka:
>
> Detailed bug description:
> If end user changes node hostname (no matter what role it is assigned) to
> something that is starting from digit [0-9] or dash [-]. Then dnsmasq
> fails
> to start on Fuel master node with error message:
>
> [root@nailgun log]# pgrep dnsmasq
> [root@nailgun log]# dnsmasq -k
> dnsmasq: bad DHCP host name at line 50 of /etc/dnsmasq.conf (line
> [root@nailgun log]# sed -n '50 p' /etc/dnsmasq.conf
> dhcp-host=net:x86_64,64:26:f7:65:b6:91,3-edon.test.domain.local,10.109.0.5
>
> Since all target nodes use Fuel master node as name server before
> l23network
> reconfigures their /etc/resolv.conf, all further environment deployements
> will
> fail.
>
> Steps to reproduce:
> 1. Create env with 1 controller.
> 2. Change controllers hostname to 1-edon:
> press gear button on the Nodes pane
> press pencil button and enter 1-edon into text field
> hit enter
> 3. Press 'Deploy changes' on the Dashboard pane
>
> Expected results:
> Cluster gets successfully deployed or input text field validates
> that hostname cannot start with digit or dash.
>
> Actual result:
> dnsmasq process on master node stops. Deployment stops.
> root@3-edon:~# fgrep 'err):' /var/log/puppet.log
> 2016-05-26 09:22:55 +0000 Puppet (err): getaddrinfo: Name or service not
> known at /etc/puppet/modules/osnailyfacter/manifests/fuel_pkgs/setup_repositories.pp:21
> on node 3-edon.test.domain.local
> 2016-05-26 09:22:55 +0000 Puppet (err): getaddrinfo: Name or service not
> known at /etc/puppet/modules/osnailyfacter/manifests/fuel_pkgs/setup_repositories.pp:21
> on node 3-edon.test.domain.local
> 2016-05-26 09:23:27 +0000 Puppet (err): getaddrinfo: Name or service not
> known at /etc/puppet/modules/osnailyfacter/manifests/fuel_pkgs/setup_repositories.pp:21
> on node 3-edon.test.domain.local
> 2016-05-26 09:23:27 +0000 Puppet (err): getaddrinfo: Name or service not
> known at /etc/puppet/modules/osnailyfacter/manifests/fuel_pkgs/setup_repositories.pp:21
> on node 3-edon.test.domain.local
> 2016-05-26 09:24:01 +0000 Puppet (err): getaddrinfo: Name or service not
> known at /etc/puppet/modules/osnailyfacter/manifests/fuel_pkgs/setup_repositories.pp:21
> on node 3-edon.test.domain.local
> 2016-05-26 09:24:01 +0000 Puppet (err): getadd
>
> Reproducibility:
> 100%
>
> Workaround:
> Change hostname to something that is valid for dnsmasq configuration.
> Manually edit (remove entry) from /etc/dnsmasq.conf on master node and
> restart dns server.
>
> Impact:
> No more environments can be deployed with master node, because nodes need
> to resolve dns names with package mirrors.
>
> Description of the environment:
> Operation system:
> Ubuntu 14.04
>
> Versions of components:
> Fuel 9.0 #397
> fuel-plugin-vmware-dvs-3.0-3.0.0-1-475.noarch.rpm
> vCenter 5.5
>
> Additional information:
> I tried to deploy plugin with vCenter as hypervisor and used Fuel VMware
> DVS plugin
> as network backend for Neutron, but I seri...

Read more...

Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

yep, this patch is about this

Revision history for this message
Dmitry Teselkin (teselkin-d) wrote :
Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

yes, Dmitry, this is the same commit provided with my patch: dnsmasq-2.66-d859ca2f.patch <- check the hash id in the filename and in the first line of the patch : https://launchpadlibrarian.net/280754246/dnsmasq-2.66-d859ca2f.patch

Revision history for this message
Dmitry Teselkin (teselkin-d) wrote :
Changed in fuel:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.