Skip to content

Commit

Permalink
Merge pull request #734 from fomars/master
Browse files Browse the repository at this point in the history
hotfix hanging telegraf
  • Loading branch information
fomars committed Apr 10, 2019
2 parents 726dc11 + bfdc61a commit 4afbc9f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='yandextank',
version='1.12.0',
version='1.12.1',
description='a performance measurement tool',
longer_description='''
Yandex.Tank is a performance measurement and load testing automatization tool.
Expand Down
31 changes: 15 additions & 16 deletions yandextank/plugins/Telegraf/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,23 +356,22 @@ def uninstall(self):
'Unable to correctly stop monitoring agent - session is broken. Pay attention to agent log (%s).',
log_filename,
exc_info=True)
try:
self.ssh.get_file(
os.path.join(
self.path['AGENT_REMOTE_FOLDER'],
"_agent.log"),
log_filename)
self.ssh.get_file(
os.path.join(
self.path['AGENT_REMOTE_FOLDER'],
"monitoring.rawdata"),
data_filename)
self.ssh.rm_r(self.path['AGENT_REMOTE_FOLDER'])
except Exception:
logger.error("Unable to get agent artefacts", exc_info=True)

else:
try:
self.ssh.get_file(
os.path.join(
self.path['AGENT_REMOTE_FOLDER'],
"_agent.log"),
log_filename)
self.ssh.get_file(
os.path.join(
self.path['AGENT_REMOTE_FOLDER'],
"monitoring.rawdata"),
data_filename)
self.ssh.rm_r(self.path['AGENT_REMOTE_FOLDER'])
except Exception:
logger.error("Unable to get agent artefacts", exc_info=True)
self._kill_agent()

return log_filename, data_filename

def _kill_agent(self):
Expand Down

0 comments on commit 4afbc9f

Please sign in to comment.