Correct neutron-ns-metadata-proxy command when watch_log is False

Neutron[1] uses the option --metadata_proxy_watch_log=false to disable
log watch[2] in neutron-ns-metadata-proxy instances but should use the
option --nometadata_proxy_watch_log. It implies that
neutron-ns-metadata-proxy instances fail to start.

This changes updates neutron[1] to use the correct option.

The change also corrects associated functional tests[2], indeed
metadata_proxy_watch_log option has no effect if a log_file/dir is
defined for the agent running the neutron-ns-metadata-proxy.

[1] neutron.agent.common.config
[2] could be done by setting metadata_proxy_watch_log = false
[3] neutron.tests.functional.agent.test_l3_agent

Closes-Bug: #1490594
Change-Id: Iaec4a78847d802234c99514313440fd7c14bc554
This commit is contained in:
Cedric Brandily 2015-08-31 16:40:14 +02:00
parent 6324f7f23d
commit e2fa9012fa
3 changed files with 6 additions and 2 deletions

View File

@ -94,7 +94,7 @@ def get_log_args(conf, log_file_name, **kwargs):
if log_dir:
cmd_args.append('--log-dir=%s' % log_dir)
if kwargs.get('metadata_proxy_watch_log') is False:
cmd_args.append('--metadata_proxy_watch_log=false')
cmd_args.append('--nometadata_proxy_watch_log')
else:
if conf.use_syslog:
cmd_args.append('--use-syslog')

View File

@ -96,6 +96,10 @@ class L3AgentTestFramework(base.BaseSudoTestCase):
get_temp_file_path = functools.partial(self.get_temp_file_path,
root=temp_dir)
conf.set_override('state_path', temp_dir.path)
# NOTE(cbrandily): log_file or log_dir must be set otherwise
# metadata_proxy_watch_log has no effect
conf.set_override('log_file',
get_temp_file_path('log_file'))
conf.set_override('metadata_proxy_socket',
get_temp_file_path('metadata_proxy'))
conf.set_override('ha_confs_path',

View File

@ -121,7 +121,7 @@ class TestMetadataDriverProcess(base.BaseTestCase):
router_id]
if not watch_log:
netns_execute_args.append(
'--metadata_proxy_watch_log=false')
'--nometadata_proxy_watch_log')
ip_mock.assert_has_calls([
mock.call(namespace=router_ns),
mock.call().netns.execute(netns_execute_args, addl_env=None,