summaryrefslogtreecommitdiffstats
path: root/app/monitoring
diff options
context:
space:
mode:
authoryayogev <yaronyogev@gmail.com>2017-09-04 16:04:47 +0300
committeryayogev <yaronyogev@gmail.com>2017-09-04 16:04:47 +0300
commit1745ff341283720042c829254a76bb060e671027 (patch)
tree59900c9704b39a0dff06a5bcf4daef61302a21f6 /app/monitoring
parent57ee48adb74c1e49fb34a446e8c6a591411ce574 (diff)
restart_service(): ignore non-Error in CentOs
When doing 'service X restart' in CentOs it says: 'Error: Redirecting to /bin/systemctl restart' But it's not really an error but more of an info message Change-Id: I03e66aa872e9b3f4fd85d579207d9dcc6494eb8c Signed-off-by: yayogev <yaronyogev@gmail.com>
Diffstat (limited to 'app/monitoring')
-rw-r--r--app/monitoring/setup/monitoring_handler.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/monitoring/setup/monitoring_handler.py b/app/monitoring/setup/monitoring_handler.py
index 7a95a3a..903b8d8 100644
--- a/app/monitoring/setup/monitoring_handler.py
+++ b/app/monitoring/setup/monitoring_handler.py
@@ -385,8 +385,9 @@ class MonitoringHandler(MongoAccess, CliAccess, BinaryConverter):
ssh.exec(cmd)
else:
self.run(cmd, ssh_to_host=host, ssh=ssh)
- except SshError:
- self.had_errors = True
+ except SshError as e:
+ if 'Error: Redirecting to /bin/systemctl restart' not in str(e):
+ self.had_errors = True
def deploy_config_to_target(self, host_details):
try: