From 8c5d132f2f1e8bebd8f167b46d5155134bd6a78c Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Thu, 11 Jul 2013 10:31:51 +0100 Subject: [PATCH] Change force_dhcp_release default to True Historically it was was false because it requires the dnsmasq binary 'dhcp_release' which was not present in all distros. Related to bug 970893 DocImpact Change-Id: I4975d85a66fb930d6a56900dd569cec2a1874439 --- etc/nova/nova.conf.sample | 2 +- nova/network/manager.py | 2 +- nova/test.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/etc/nova/nova.conf.sample b/etc/nova/nova.conf.sample index 9e095cb29b09..dcd728e8c113 100644 --- a/etc/nova/nova.conf.sample +++ b/etc/nova/nova.conf.sample @@ -1181,7 +1181,7 @@ # If True, send a dhcp release on instance termination # (boolean value) -#force_dhcp_release=false +#force_dhcp_release=true # If True in multi_host mode, all compute hosts share the same # dhcp address. (boolean value) diff --git a/nova/network/manager.py b/nova/network/manager.py index 76c29a496bde..d8304ce6daed 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -148,7 +148,7 @@ network_opts = [ 'deleted in VLAN network mode with multi hosted ' 'networks'), cfg.BoolOpt('force_dhcp_release', - default=False, + default=True, help='If True, send a dhcp release on instance termination'), cfg.BoolOpt('share_dhcp_address', default=False, diff --git a/nova/test.py b/nova/test.py index a8af00889ba7..babea87f47c0 100644 --- a/nova/test.py +++ b/nova/test.py @@ -250,6 +250,7 @@ class TestCase(testtools.TestCase): self.policy = self.useFixture(policy_fixture.PolicyFixture()) CONF.set_override('fatal_exception_format_errors', True) CONF.set_override('enabled', True, 'osapi_v3') + CONF.set_override('force_dhcp_release', False) def _restore_obj_registry(self): objects_base.NovaObject._obj_classes = self._base_test_obj_backup