From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Removing syslog print from vdsm-tool when module load fails
......................................................................
Removing syslog print from vdsm-tool when module load fails
As part of e3b628fe we moved dump-bonding-options to network.py module -
this causes error prints in syslog while upgrading from old version. The
py file seems to leave leftovers which vdsm-tool tries to load while
running vdsm-tool commands during installation.
notes - leftovers won't stay after upgrade is complete - this case can
exist only during upgrade.
Change-Id: Ida68ee4f8284ee9bb4163487b4b9b462068ffa4b
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M static/usr/bin/vdsm-tool
1 file changed, 3 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/77754/1
diff --git a/static/usr/bin/vdsm-tool b/static/usr/bin/vdsm-tool
index 9080230..4f8e6be 100755
--- a/static/usr/bin/vdsm-tool
+++ b/static/usr/bin/vdsm-tool
@@ -24,7 +24,6 @@
import logging
import os
import sys
-import syslog
import textwrap
import traceback
@@ -90,9 +89,9 @@
module = imp.load_module(package_name + '.' + mod_name, mod_fobj,
mod_absp, mod_desc)
except Exception:
- # py module was failed to load. report to syslog and continue
- syslog.syslog("module %s could not load to vdsm-tool: %s" %
- (mod_name, traceback.format_exc()))
+ # in case of a failure we want to continue. we saw cases such as
+ # leftovers pycs in the tool folder which cause too many prints.
+ # therefore, the logic is only to skip the exception
continue
mod_cmds = []
--
To view, visit
https://gerrit.ovirt.org/77754
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida68ee4f8284ee9bb4163487b4b9b462068ffa4b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>