This is a fix for issue #4677 which was caused by kdb output being
hard-coded to ttyS1 which is fine for all our hardware except mira
machines. This change just checks to see if mira is in the host's
name and uses ttyS2 instead (simple fix).
def enable_disable_kdb(ctx, config):
for role, enable in config.iteritems():
(role_remote,) = ctx.cluster.only(role).remotes.keys()
+ if "mira" in role_remote.name:
+ serialdev = "ttyS2"
+ else:
+ serialdev = "ttyS1"
if enable:
log.info('Enabling kdb on {role}...'.format(role=role))
role_remote.run(
args=[
- 'echo', 'ttyS1',
+ 'echo', serialdev,
run.Raw('|'),
'sudo', 'tee', '/sys/module/kgdboc/parameters/kgdboc'
])