← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1369751] Re: Cannot enable both syslog and regular log for neutron-ns-metadata-proxy

 

[Expired for neutron because there has been no activity for 60 days.]

** Changed in: neutron
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1369751

Title:
  Cannot enable both syslog and regular log for neutron-ns-metadata-
  proxy

Status in neutron:
  Expired

Bug description:
  The current implementation of neutron won't allow to enable both
  syslog and regular log for neutron-ns-metadata-proxy.

  In current implemention,  that's how neutron/agent/dhcp_agent.py
  sprawns the neutron-ns-metadata-proxy process.

          def callback(pid_file):
              metadata_proxy_socket = cfg.CONF.metadata_proxy_socket
              proxy_cmd = ['neutron-ns-metadata-proxy',
                           '--pid_file=%s' % pid_file,
                           '--metadata_proxy_socket=%s' % metadata_proxy_socket,
                           neutron_lookup_param,
                           '--state_path=%s' % self.conf.state_path,
                           '--metadata_port=%d' % dhcp.METADATA_PORT]
              proxy_cmd.extend(config.get_log_args(
                  cfg.CONF, 'neutron-ns-metadata-proxy-%s.log' % network.id))
              return proxy_cmd

  However, for the config.get_log_args() in
  neutron/agent/common/config.py

  def get_log_args(conf, log_file_name):
      cmd_args = []
      if conf.debug:
          cmd_args.append('--debug')
      if conf.verbose:
          cmd_args.append('--verbose')
      if (conf.log_dir or conf.log_file):
          cmd_args.append('--log-file=%s' % log_file_name)
          log_dir = None
          if conf.log_dir and conf.log_file:
              log_dir = os.path.dirname(
                  os.path.join(conf.log_dir, conf.log_file))
          elif conf.log_dir:
              log_dir = conf.log_dir
          elif conf.log_file:
              log_dir = os.path.dirname(conf.log_file)
          if log_dir:
              cmd_args.append('--log-dir=%s' % log_dir)
      else:
          if conf.use_syslog:
              cmd_args.append('--use-syslog')
              if conf.syslog_log_facility:
                  cmd_args.append(
                      '--syslog-log-facility=%s' % conf.syslog_log_facility)
      return cmd_args

  It only allows one of the options.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1369751/+subscriptions


References