From 3a57401e86b1646a98163a975977477b35e2fb9b Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Mon, 16 Nov 2015 10:53:24 +0000 Subject: [PATCH] Revert "Move dhcp_lease_duration into DHCP agent config options list" This reverts commit 3101e2b62f0741baffc61174637486da17dd29bb. The lease duration isn't DHCP agent specific. DHCP is a feature that should be provided by whatever plugin is loaded and operators would still like to set lease times for DHCP. In the reference implementation we just consume it directly in the agent, but that doesn't mean it's specific to the agent implementation. Change-Id: I5efb6aa5e196d4cac5ff7c0c35be5a350401b925 --- etc/dhcp_agent.ini | 3 --- etc/neutron.conf | 4 ++++ neutron/agent/dhcp/config.py | 4 ---- neutron/common/config.py | 4 ++++ 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/etc/dhcp_agent.ini b/etc/dhcp_agent.ini index 21e12488f..a7e5547ba 100644 --- a/etc/dhcp_agent.ini +++ b/etc/dhcp_agent.ini @@ -95,9 +95,6 @@ # If the timeout expires, ovs commands will fail with ALARMCLOCK error. # ovs_vsctl_timeout = 10 -# DHCP lease duration (in seconds). Use -1 for infinite lease times. -# dhcp_lease_duration = 86400 - [AGENT] # Log agent heartbeats from this DHCP agent # log_agent_heartbeats = False diff --git a/etc/neutron.conf b/etc/neutron.conf index 763786b81..3140c2c35 100644 --- a/etc/neutron.conf +++ b/etc/neutron.conf @@ -110,6 +110,10 @@ # Maximum amount of retries to generate a unique MAC address # mac_generation_retries = 16 +# DHCP Lease duration (in seconds). Use -1 to +# tell dnsmasq to use infinite lease times. +# dhcp_lease_duration = 86400 + # Domain to use for building the hostnames # dns_domain = openstacklocal diff --git a/neutron/agent/dhcp/config.py b/neutron/agent/dhcp/config.py index 837b7467a..a6c00b9e1 100644 --- a/neutron/agent/dhcp/config.py +++ b/neutron/agent/dhcp/config.py @@ -45,10 +45,6 @@ DHCP_OPTS = [ 'neutron.conf as dns_domain. It will removed from here ' 'in a future release'), deprecated_for_removal=True), - cfg.IntOpt('dhcp_lease_duration', default=86400, - deprecated_name='dhcp_lease_time', - help=_('DHCP lease duration (in seconds). Use -1 for infinite ' - 'lease times.')), ] DNSMASQ_OPTS = [ diff --git a/neutron/common/config.py b/neutron/common/config.py index 38ae94f38..1f07ba00a 100644 --- a/neutron/common/config.py +++ b/neutron/common/config.py @@ -81,6 +81,10 @@ core_opts = [ cfg.BoolOpt('ipv6_pd_enabled', default=False, help=_("Enables IPv6 Prefix Delegation for automatic subnet " "CIDR allocation")), + cfg.IntOpt('dhcp_lease_duration', default=86400, + deprecated_name='dhcp_lease_time', + help=_("DHCP lease duration (in seconds). Use -1 to tell " + "dnsmasq to use infinite lease times.")), cfg.StrOpt('dns_domain', default='openstacklocal', help=_('Domain to use for building the hostnames')), -- 2.45.2