Allow configuration of dhcp_domain in nova.conf

Bug #1482045 reported by Jordan Callicoat on 2015-08-06
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openstack-ansible
Wishlist
Jesse Pretorius
Kilo
Wishlist
Jesse Pretorius
Trunk
Wishlist
Jesse Pretorius

Bug Description

The dhcp_domain is used by the neutron-dhcp-agent for handing out the domain via DHCP option. However, we are using neutron-metadata-proxy to proxy metadata API requests to nova-api-metadata, which uses the dhcp_domain option in nova.conf to build the hostname handed out via metadata.

The dhcp_domain option was parameterized for dhcp-agent in LP:#1430872. A similar option should be added to the nova.conf template so that instances querying the metadata API (e.g., via cloud-init) see a consistent hostname as what is handed out via DHCP.

dhcp_domain in nova.conf should only be used for nova network, whereas we only deploy neutron at this stage and we have this facilitated in neutron via the variable neutron_dhcp_domain

Can you please provide more information about this? Was this Juno or Kilo?

Changed in openstack-ansible:
status: New → Incomplete
Jordan Callicoat (jcallicoat) wrote :

It's used to build the hostname by the nova metadata api in every version.

https://github.com/openstack/nova/blob/stable/kilo/nova/api/metadata/base.py#L375-L378

@Jordan I might be reading the code wrong, but it seems that setting is only applied when using nova-network: https://github.com/openstack/nova/blob/stable/kilo/nova/api/metadata/base.py#L56

Jordan Callicoat (jcallicoat) wrote :

It is definitely used for the hostname provided by metadata.

Here's the output from a cirros instance on a fresh v11 deployment:

$ curl http://169.254.169.254/latest/meta-data/public-hostname
test.novalocal

Changed in openstack-ansible:
status: Incomplete → Triaged
importance: Undecided → Wishlist
assignee: nobody → Jesse Pretorius (jesse-pretorius)

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

Changed in openstack-ansible:
status: Triaged → In Progress
tags: added: low-hanging-fruit

Reviewed: https://review.openstack.org/213127
Committed: https://git.openstack.org/cgit/stackforge/os-ansible-deployment/commit/?id=7427775201bc17e0dd7bf3dafe96263eb3b916d3
Submitter: Jenkins
Branch: master

commit 7427775201bc17e0dd7bf3dafe96263eb3b916d3
Author: Jesse Pretorius <email address hidden>
Date: Fri Aug 14 13:38:21 2015 +0100

    Ensure that nova and neutron provide consistent DHCP domain values

    This patch adds the dhcp_domain config entry to nova.conf and
    implements group_vars to default both nova and neutron's dhcp
    domain values to be the same.

    The individual values can still be overridden in user_variables
    by using nova_dhcp_domain or neutron_dhcp_domain, but it's expected
    that deployers would like these to be consistent.

    Change-Id: I97beb78f62aeca2665ff72805056d36ead2adaaa
    Closes-Bug: #1482045

Changed in openstack-ansible:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/215650
Committed: https://git.openstack.org/cgit/stackforge/os-ansible-deployment/commit/?id=9cd64437d1c325e6def7d5b393ea296ba34f6059
Submitter: Jenkins
Branch: kilo

commit 9cd64437d1c325e6def7d5b393ea296ba34f6059
Author: Jesse Pretorius <email address hidden>
Date: Fri Aug 14 13:38:21 2015 +0100

    Ensure that nova and neutron provide consistent DHCP domain values

    This patch adds the dhcp_domain config entry to nova.conf and
    implements group_vars to default both nova and neutron's dhcp
    domain values to be the same.

    The individual values can still be overridden in user_variables
    by using nova_dhcp_domain or neutron_dhcp_domain, but it's expected
    that deployers would like these to be consistent.

    Change-Id: I97beb78f62aeca2665ff72805056d36ead2adaaa
    Closes-Bug: #1482045
    (cherry picked from commit 7427775201bc17e0dd7bf3dafe96263eb3b916d3)

tags: removed: low-hanging-fruit

This issue was fixed in the openstack/openstack-ansible 11.2.11 release.

This issue was fixed in the openstack/openstack-ansible 11.2.12 release.

This issue was fixed in the openstack/openstack-ansible 11.2.14 release.

no longer affects: openstack-ansible/juno
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers