Domain name not set properly in Cobbler

Bug #1411425 reported by Claude Durocher
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Low
Bartłomiej Piotrowski
5.1.x
Won't Fix
Low
Fuel Library (Deprecated)
6.0.x
Fix Committed
Low
Bartłomiej Piotrowski

Bug Description

Running Fuel 5.1.1.

I need to change the line "server=/local/" in the dnsmasq configuration of Cobbler in Fuel. I tried to edit /etc/cobbler/dnsmasq.template in the Cobbler container however, when I reboot the fuel node, my changes to the file are lost.

I then realized that the dnsmasq.template is generated by Puppet. Normaly, the domain (local) should be substitued for DNS_DOMAIN value of astute.yaml but the module cobbler.pp doesn't set properly the variable domain_name so it's alway set to local.

File /etc/fuel/astute.yaml (on fuel node):

HOSTNAME: fuel
DNS_DOMAIN: openstack.myorg.local
DNS_SEARCH: openstack.myorg.local
DNS_UPSTREAM: 10.17.76.4, 10.17.76.2
NTP1: 0.pool.ntp.org
NTP2: 1.pool.ntp.org
NTP3: 2.pool.ntp.org
ADMIN_NETWORK:
  dhcp_pool_start: 10.20.0.128
  netmask: 255.255.255.0
...

File /etc/cobbler/dnsmasq.template (in cobbler container):

# Cobbler generated configuration file for dnsmasq
# $date
#

read-ethers
log-queries
log-facility=/var/log/dnsmasq.log
addn-hosts = /var/lib/cobbler/cobbler_hosts
domain=local
dhcp-lease-max=1800
server=/local/
resolv-file=/etc/dnsmasq.upstream
dhcp-match=gpxe,175
interface=eth0
...

File /etc/puppet/modules/nailgun/manifests/cobbler.pp:

...
  class { "::cobbler":
    server => $server,
    production => $production,

    domain_name => $domain_name,
...

I think the line "domain_name => $domain_name," should be replaced to : "domain_name => $dns_name,". in /etc/puppet/modules/nailgun/manifests/cobbler.pp.

Changed in fuel:
assignee: nobody → Fuel Library Team (fuel-library)
importance: Undecided → Low
Changed in fuel:
status: New → Confirmed
milestone: none → 5.1.2
Changed in fuel:
assignee: Fuel Library Team (fuel-library) → Bartlomiej Piotrowski (bpiotrowski)
status: Confirmed → Triaged
Revision history for this message
Bartłomiej Piotrowski (bpiotrowski) wrote :
no longer affects: fuel/5.1.x
Changed in fuel:
milestone: 5.1.2 → 6.1
status: Triaged → Confirmed
status: Confirmed → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/6.0)

Fix proposed to branch: stable/6.0
Review: https://review.openstack.org/150433

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/5.1)

Fix proposed to branch: stable/5.1
Review: https://review.openstack.org/150436

Revision history for this message
Claude Durocher (claude-d) wrote :

Fix in https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=595916315bac34f044d155ae33acca1b0a422d2e doesn't solve my problem.

DNS here is named mydomain.local. I need to change /local/ to something else so I can resolve hosts in mydomain.local.

The fix proposed adds a new domain (the one specified at fuel installation) but I still won't be able to resolve hosts.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/6.0)

Reviewed: https://review.openstack.org/150433
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=2cd50cd27becfc3ad95963373071a41c7bd0e28c
Submitter: Jenkins
Branch: stable/6.0

commit 2cd50cd27becfc3ad95963373071a41c7bd0e28c
Author: Bartłomiej Piotrowski <email address hidden>
Date: Tue Jan 20 13:45:38 2015 +0100

    Do not forward DNS request for default domain to upstream server

    Closes-Bug: 1411425
    Closes-Bug: 1411156
    Change-Id: I1bab9c03c7c65004350325c1c09cfc4c74c5b287

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/5.1)

Reviewed: https://review.openstack.org/150436
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=4f7caeac3942a82f126dda7a1fa47ca582480bf9
Submitter: Jenkins
Branch: stable/5.1

commit 4f7caeac3942a82f126dda7a1fa47ca582480bf9
Author: Bartłomiej Piotrowski <email address hidden>
Date: Tue Jan 20 13:45:38 2015 +0100

    Do not forward DNS request for default domain to upstream server

    Closes-Bug: 1411425
    Closes-Bug: 1411156
    Change-Id: I1bab9c03c7c65004350325c1c09cfc4c74c5b287

Revision history for this message
Claude Durocher (claude-d) wrote :

After some extensive testing, I found that the variable "$domain_name" should be replaced to "$dns_domain" in /etc/puppet/modules/cobbler/templates/dnsmasq.template.erb (there are 2 occurences).

Revision history for this message
Claude Durocher (claude-d) wrote :
Changed in fuel:
status: Fix Committed → New
Changed in fuel:
status: New → Fix Committed
Revision history for this message
Claude Durocher (claude-d) wrote :

Let me explain more in details why the fix proposed is not working for
our use case.

Fuel is installed on a corporate lan (on premise cloud).

The domain name for the lan is mydomain.local. There are 2 dns servers
serving mydomain.local : 10.10.10.2 and 10.10.10.3. Those dns servers
also forwards request for internet names.

Fuel has it's own domain name : fuel.mydomain.local. DNS servers in Fuel
configuration are set to the local dns servers (10.10.10.2 and 10.10.10.3).

The fix proposed will add fuel.mydomain.local to the dnsmasq conf file
so that dns requests for this domain name won't be forwarded to the
local dns servers. In the config file you will have :

 server=/local/
 server=/fuel.mydomain.local/

The problem here is that the fuel server is not able to resolve names in
mydomain.local : for example, dnsmasq will try to resolve locally a host
named test.mydomain.local instead of forwarding this request to the
local dns (10.10.10.2 or 10.10.10.3).

The root cause of the problem is due to using an internal domain name
ending with ".local" and the fact that by default, dnsmasq use this as well.

The solution to this is to remove the line "server=/local/" in
dnsmasq.conf so that Fuel can forward *.mydomain.local to the internal
dns servers.

Changed in fuel:
status: Fix Committed → New
Changed in fuel:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/164625

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/164625
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=3ca3ef5aae68b84ec8b9beb55e552bdd70d42599
Submitter: Jenkins
Branch: master

commit 3ca3ef5aae68b84ec8b9beb55e552bdd70d42599
Author: Bartłomiej Piotrowski <email address hidden>
Date: Mon Mar 16 09:20:06 2015 +0100

    Do not add @domain_name to dnsmasq.conf if it equals 'local'

    Currently dnsmasq tries to resolve locally a host named
    test.mydomain.local instead of forwarding this request to the local dns
    server.

    Change-Id: I5892fddaffa0dc619f0a54ac0f9fac34055b9b3f
    Closes-Bug: 1411425

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/6.0)

Fix proposed to branch: stable/6.0
Review: https://review.openstack.org/166220

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/5.1)

Fix proposed to branch: stable/5.1
Review: https://review.openstack.org/166221

tags: added: customer-found
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/6.0)

Reviewed: https://review.openstack.org/166220
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=4963722617129866d77a1ca832254696be4130fd
Submitter: Jenkins
Branch: stable/6.0

commit 4963722617129866d77a1ca832254696be4130fd
Author: Bartłomiej Piotrowski <email address hidden>
Date: Mon Mar 16 09:20:06 2015 +0100

    Do not add @domain_name to dnsmasq.conf if it equals 'local'

    Currently dnsmasq tries to resolve locally a host named
    test.mydomain.local instead of forwarding this request to the local dns
    server.

    Change-Id: I5892fddaffa0dc619f0a54ac0f9fac34055b9b3f
    Closes-Bug: 1411425
    (cherry picked from commit 3ca3ef5aae68b84ec8b9beb55e552bdd70d42599)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-library (stable/5.1)

Change abandoned by Bartłomiej Piotrowski (<email address hidden>) on branch: stable/5.1
Review: https://review.openstack.org/166221

Revision history for this message
Vitaly Sedelnik (vsedelnik) wrote :

Won't Fix for 5.1.1-updates because of Low importance

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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