dhcp_domain used when use_neutron is not set

Bug #1694417 reported by Eduardo Gonzalez
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

Description
===========

While configuring nova with neutron and designate to provide DNS to instances, found that if use_neutron is not explicitly set to True in nova.conf it gets ignored and dhcp_domain setting is used (novalocal by default). I think designate does nothing here and the issue is between nova and neutron configuration because if nova option is not used, neutron default dns_domain would be openstacklocal.

network_opts = [
    cfg.BoolOpt('use_neutron',
        default=True,
        deprecated_for_removal=True,
        deprecated_since='15.0.0',
        deprecated_reason="""
nova-network is deprecated, as are any related configuration options.
""",
        help="""
Enable neutron as the backend for networking.
Determine whether to use Neutron or Nova Network as the back end. Set to true
to use neutron.
"""),

From what I understand from [0] is if use_neutron is True(default value, see above), dhcp_domain option is not used and uses neutron settings.

    cfg.StrOpt("dhcp_domain",
        default="novalocal",
        deprecated_for_removal=True,
        deprecated_since='15.0.0',
        deprecated_reason="""
nova-network is deprecated, as are any related configuration options.
""",
        help="""
This option allows you to specify the domain for the DHCP server.
Possible values:
* Any string that is a valid domain name.
Related options:
* ``use_neutron``
"""),

Steps to reproduce
==================

No set use_neutron=True at nova.conf (is default)
Set dns_domain = sample.openstack.org. in neutron.conf
Boot an instance and check fqdn

Expected results
================

Instance have fqdn <vm-name>.sample.openstack.org

Actual results
==============

Instance have fqdn <vm-name>.novalocal

Environment
===========

CentOS
Source code from master
Deployed with kolla-ansible
neutron + ml2 + ovs
nova==16.0.0.0b2.dev511
Latest commit: https://github.com/openstack/nova/commit/98b8e39ac5f7b3f2bb06ca415bbb806705461d74

If manually set use_neutron=True in nova.conf instance gets domain based on dns_domain setting from neutron.

[0] https://github.com/openstack/nova/blob/master/nova/conf/network.py

summary: - dhcp_domain used when use_neutron is not set to True
+ dhcp_domain used when use_neutron is not set
Revision history for this message
Matt Riedemann (mriedem) wrote :

use_neutron defaults to True, so you don't need to explicitly set it in nova.conf to be using neutron. The dhcp_domain option is deprecated since the Ocata release as it's only used for nova-network, which it sounds like you're not using.

I think there is a misunderstanding here about how things are working with the use_neutron config option, so I'm going to invalidate this, but please re-open and explain if I'm missing something.

Changed in nova:
status: New → Invalid
Revision history for this message
Matt Riedemann (mriedem) wrote :

Also see this Mitaka spec about neutron + DNS:

https://specs.openstack.org/openstack/nova-specs/specs/mitaka/implemented/internal-dns-resolution.html

Does that help you at all?

Revision history for this message
Matt Riedemann (mriedem) wrote :

"If manually set use_neutron=True in nova.conf instance gets domain based on dns_domain setting from neutron."

Is there something in Kolla that reads from the use_neutron value and changes it's behavior in how it deploys? Does Kolla Ansible default use_neutron to False still?

Changed in nova:
status: Invalid → Incomplete
Revision history for this message
Stephen Finucane (stephenfinucane) wrote :

(There is possibly something happening here because the metadata service relies on that value. Setting to incomplete while we wait for the below information.)

> Expected results
> ================
>
> Instance have fqdn <vm-name>.sample.openstack.org
>
> Actual results
> ==============
>
> Instance have fqdn <vm-name>.novalocal

What happens if you actually change the nova configuration option? Does it propagate to the hosts or only affect newly created hosts? Also, to clarify, you mean the hostname on the instances themselves (the output of 'hostname') is '<vm-name>.novalocal', yes?

I'm thinking this could be related to the metadata service, as seen here [1]. Are you using cloud-init?

[1] https://github.com/openstack/nova/blob/a1eca94d89ba49eaa521303dfa8d991237cb5eb7/nova/api/metadata/base.py#L535-L538

Revision history for this message
Stephen Finucane (stephenfinucane) wrote :

s/hosts/instances/

Revision history for this message
Matt Riedemann (mriedem) wrote :

A few other questions:

1. Do you have the "DNS Integration" and "Port Binding" extensions enabled in Neutron?

2. Does the related port have the dns_name attribute set?

3. Does the Neutron network that the port is on have "dns_domain" set?

4. What happens if you configure nova and set dhcp_domain=''? Restart the services and then try again - does it work as expected now?

Revision history for this message
Stephen Finucane (stephenfinucane) wrote :

fwiw, I wasn't able to reproduce this using the following configuration:

  Ubuntu
  Source code from master
  Deployed with devstack
  neutron + ml2 + ovs
  nova==16.0.0.0b1-585-ga1eca94

This was using the default CirrOS image seems to have cloud-init integrated

Revision history for this message
Eduardo Gonzalez (egonzalez90) wrote :

The root cause of this issue was not nova, it was CentOS image defaults to domain .novalocal, then cloud-init apply that value on startup. With ubuntu or cirros this don't happen.

Will mark the bug as invalid.

Thanks for your work.

Regards

Changed in nova:
status: Incomplete → Invalid
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.