cisco_cfg_agent.ini file was missed in the initial commit and
caused neutron startup issues. This patch supplies the proper
ini file and adds it back to neutron setup.cfg.
Also the introduced config options are put in a specific group
instead of default as was in the initial commit.
Change-Id: I74b3b77fe6e196524809580f522f91f3b62f5ba7
Closes-bug: #
1351466
--- /dev/null
+[cfg_agent]
+# (IntOpt) Interval in seconds for processing of service updates.
+# That is when the config agent's process_services() loop executes
+# and it lets each service helper to process its service resources.
+# rpc_loop_interval = 10
+
+# (StrOpt) Period-separated module path to the routing service helper class.
+# routing_svc_helper_class = neutron.plugins.cisco.cfg_agent.service_helpers.routing_svc_helper.RoutingServiceHelper
+
+# (IntOpt) Timeout value in seconds for connecting to a hosting device.
+# device_connection_timeout = 30
+
+# (IntOpt) The time in seconds until a backlogged hosting device is
+# presumed dead or booted to an error state.
+# hosting_device_dead_timeout = 300
self.devmgr_rpc = CiscoDeviceManagementApi(topics.L3PLUGIN, host)
def _initialize_service_helpers(self, host):
- svc_helper_class = self.conf.routing_svc_helper_class
+ svc_helper_class = self.conf.cfg_agent.routing_svc_helper_class
try:
self.routing_service_helper = importutils.import_object(
svc_helper_class, host, self.conf, self)
except ImportError as e:
LOG.warn(_("Error in loading routing service helper. Class "
"specified is %(class)s. Reason:%(reason)s"),
- {'class': self.conf.routing_svc_helper_class,
+ {'class': self.conf.cfg_agent.routing_svc_helper_class,
'reason': e})
self.routing_service_helper = None
def _start_periodic_tasks(self):
self.loop = loopingcall.FixedIntervalLoopingCall(self.process_services)
- self.loop.start(interval=self.conf.rpc_loop_interval)
+ self.loop.start(interval=self.conf.cfg_agent.rpc_loop_interval)
def after_start(self):
LOG.info(_("Cisco cfg agent started"))
def main(manager='neutron.plugins.cisco.cfg_agent.'
'cfg_agent.CiscoCfgAgentWithStateReport'):
conf = cfg.CONF
- conf.register_opts(CiscoCfgAgent.OPTS)
+ conf.register_opts(CiscoCfgAgent.OPTS, "cfg_agent")
config.register_agent_state_opts_helper(conf)
config.register_root_helper(conf)
conf.register_opts(interface.OPTS)
if credentials:
self._csr_user = credentials['username']
self._csr_password = credentials['password']
- self._timeout = cfg.CONF.device_connection_timeout
+ self._timeout = cfg.CONF.cfg_agent.device_connection_timeout
self._csr_conn = None
self._intfs_enabled = False
except KeyError as e:
"or high load when the device may not be responding.")),
]
-cfg.CONF.register_opts(STATUS_OPTS)
+cfg.CONF.register_opts(STATUS_OPTS, "cfg_agent")
def _is_pingable(ip):
def get_backlogged_hosting_devices_info(self):
wait_time = datetime.timedelta(
- seconds=cfg.CONF.hosting_device_dead_timeout)
+ seconds=cfg.CONF.cfg_agent.hosting_device_dead_timeout)
resp = []
for hd_id in self.backlog_hosting_devices:
hd = self.backlog_hosting_devices[hd_id]['hd']
'ip': hd['management_ip_address']})
if timeutils.is_older_than(
hd['backlog_insertion_ts'],
- cfg.CONF.hosting_device_dead_timeout):
+ cfg.CONF.cfg_agent.hosting_device_dead_timeout):
LOG.debug("Hosting device: %(hd_id)s @ %(ip)s hasn't "
"been reachable for the last %(time)d seconds. "
"Marking it dead.",
{'hd_id': hd_id,
'ip': hd['management_ip_address'],
- 'time': cfg.CONF.hosting_device_dead_timeout})
+ 'time': cfg.CONF.cfg_agent.
+ hosting_device_dead_timeout})
response_dict['dead'].append(hd_id)
hd.pop('backlog_insertion_ts', None)
del self.backlog_hosting_devices[hd_id]
self.conf = cfg.ConfigOpts()
config.register_agent_state_opts_helper(cfg.CONF)
self.conf.register_opts(base_config.core_opts)
- self.conf.register_opts(cfg_agent.CiscoCfgAgent.OPTS)
+ self.conf.register_opts(cfg_agent.CiscoCfgAgent.OPTS, "cfg_agent")
cfg.CONF.set_override('report_interval', 0, 'AGENT')
super(TestCiscoCfgAgentWIthStateReporting, self).setUp()
self.devmgr_plugin_api_cls_p = mock.patch(
etc/neutron/plugins/bigswitch/ssl/host_certs/README
etc/neutron/plugins/brocade = etc/neutron/plugins/brocade/brocade.ini
etc/neutron/plugins/cisco =
+ etc/neutron/plugins/cisco/cisco_cfg_agent.ini
etc/neutron/plugins/cisco/cisco_plugins.ini
etc/neutron/plugins/cisco/cisco_router_plugin.ini
etc/neutron/plugins/cisco/cisco_vpn_agent.ini