All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 8ff0db9d authored by David Johnson's avatar David Johnson

Add option to neutron agent to pause for gdb attach after spawning controller.

:) :) :)
parent 15e5bb6e
Pipeline #1325 skipped
......@@ -104,6 +104,8 @@ capnet_opts = [
help="Specify extra args to the Capnet switch controller."),
cfg.IntOpt('capnet_controller_base_port',default=6733,
help="Controller base port for multi-controller mode."),
cfg.IntOpt('capnet_controller_gdb_attach_wait_time',default=0,
help="Wait this many seconds for GDB to attach to the controller before firing anything else off (like a workflow agent)."),
cfg.BoolOpt('impotent_mode',default=False,
help="Do not set the bridges' controllers to Capnet controller; just install a NORMAL L2 forwarding flow."),
......
......@@ -578,6 +578,8 @@ class CapnetControllerProcesses(object):
self.controller_logfile = '%s/%s-controller.log' % (self.rundir,self.name)
self.controller_pidfile = '%s/%s-controller.pid' % (self.rundir,self.name)
self.controller_port = int(self.conf.CAPNET.capnet_controller_base_port) + self.idx
self.capnet_controller_gdb_attach_wait_time = \
self.conf.CAPNET.capnet_controller_gdb_attach_wait_time
self._load_existing()
pass
......@@ -815,6 +817,17 @@ class CapnetControllerProcesses(object):
LOG.error("failed to start capnet controller for physnet %s, bridge %s --"
" expect problems!"
% (self.physnet,self.name))
if self.capnet_controller_gdb_attach_wait_time > 0:
i = 0
while i < self.capnet_controller_gdb_attach_wait_time:
LOG.info("waiting %d more seconds for GDB to attach to"
" controller pid %d ..."
% (self.capnet_controller_gdb_attach_wait_time - i,
self.controller_pid))
i += 1
time.sleep(1)
pass
pass
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment