Fix silly mistake with api results.

Was using the worker information. Not the api nodes.

Change-Id: I66f36931ba4c53df49a62670e3cd60f17f22c7c2
This commit is contained in:
Sandy Walsh 2015-01-28 12:14:43 -08:00
parent b636a67497
commit 85380c4f74

View File

@ -73,7 +73,7 @@ lines = config.get('tail_lines', '100')
queue_prefixes = config.get('queue_prefixes', ['monitor']) queue_prefixes = config.get('queue_prefixes', ['monitor'])
for worker in worker_hostnames: for worker in worker_hostnames:
commands = ["ps aux | grep -E 'yagi-event|pipeline_worker'"] commands = ["ps auxww | grep -E 'yagi-event|pipeline_worker'"]
for cell in cell_names: for cell in cell_names:
commands.append("tail --lines %s /var/log/stv3/yagi-%s.log" % commands.append("tail --lines %s /var/log/stv3/yagi-%s.log" %
(lines, cell)) (lines, cell))
@ -88,16 +88,15 @@ for worker in worker_hostnames:
o.write(ret[i+1]) o.write(ret[i+1])
for api in api_hostnames: for api in api_hostnames:
commands = ["ps aux | grep -E 'gunicorn'", commands = ["ps auxww | grep gunicorn",
"tail --lines %s /var/log/stv3/gunicorn.log" % (lines, )) "tail --lines %s /var/log/stv3/gunicorn.log" % (lines, )]
]
print "--- api: %s" % (api, ) print "--- api: %s" % (api, )
ret = ssh(worker, commands, username, password, port) ret = ssh(api, commands, username, password, port)
print ret[0] print ret[0]
print "Writing %s-gunicorn.log" % (worker,) print "Writing %s-gunicorn.log" % (api,)
with open("%s-gunicorn.log" % (worker,), "w") as o: with open("%s-gunicorn.log" % (api,), "w") as o:
o.write(ret[1]) o.write(ret[1])
prefixes = '|'.join(queue_prefixes) prefixes = '|'.join(queue_prefixes)