Fix: kdb: doesn't work on mira nodes

Change kernel.py to use ttyS2 for kdb output instead of ttyS1 when
the node is a mira machine. This is a fix for issue #4677
This commit is contained in:
Sandon Van Ness 2013-04-09 13:09:39 -07:00
parent 41028847f8
commit 9c9baef680

View File

@ -287,11 +287,15 @@ def install_and_reboot(ctx, config):
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'
])