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
(cherry picked from commit e2fa9012fa
)
This commit is contained in:
parent
7e038c2229
commit
635d5cf885
|
@ -92,7 +92,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')
|
||||
|
|
|
@ -93,6 +93,10 @@ class L3AgentTestFramework(base.BaseOVSLinuxTestCase):
|
|||
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',
|
||||
|
|
|
@ -124,7 +124,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,
|
||||
|
|
Loading…
Reference in New Issue