You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pd...@apache.org on 2014/12/05 23:30:23 UTC

git commit: updated refs/heads/master to 3ea8a11

Repository: cloudstack
Updated Branches:
  refs/heads/master b3416f4a5 -> 3ea8a1187


CLOUDSTACK-7195: log wide exceptions in security_group.py

Some try/except in security_group.py catch a lot of exceptions. There
was already one fixed in CLOUDSTACK-1052. Here is another one. We use
logging.exception() to log those exceptions.

Signed-off-by: Vincent Bernat <Vi...@exoscale.ch>
Signed-off-by: Pierre-Luc Dion <pd...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3ea8a118
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3ea8a118
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3ea8a118

Branch: refs/heads/master
Commit: 3ea8a1187a825fdbcf7f78198afc00a2f3a8b974
Parents: b3416f4
Author: Vincent Bernat <Vi...@exoscale.ch>
Authored: Mon Jul 28 20:17:39 2014 +0200
Committer: Pierre-Luc Dion <pd...@apache.org>
Committed: Fri Dec 5 17:24:27 2014 -0500

----------------------------------------------------------------------
 scripts/vm/network/security_group.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3ea8a118/scripts/vm/network/security_group.py
----------------------------------------------------------------------
diff --git a/scripts/vm/network/security_group.py b/scripts/vm/network/security_group.py
index b4a355d..c4e7506 100755
--- a/scripts/vm/network/security_group.py
+++ b/scripts/vm/network/security_group.py
@@ -25,7 +25,6 @@ import os
 import xml.dom.minidom
 from optparse import OptionParser, OptionGroup, OptParseError, BadOptionError, OptionError, OptionConflictError, OptionValueError
 import re
-import traceback
 import libvirt
 
 logpath = "/var/run/cloud/"        # FIXME: Logs should reside in /var/log/cloud
@@ -678,7 +677,7 @@ def get_rule_logs_for_vms():
                 log = get_rule_log_for_vm(name)
                 result.append(log)
     except:
-        logging.debug("Failed to get rule logs, better luck next time!")
+        logging.exception("Failed to get rule logs, better luck next time!")
 
     print ";".join(result)
 
@@ -883,8 +882,7 @@ def add_network_rules(vm_name, vm_id, vm_ip, signature, seqno, vmMac, rules, vif
 
     return 'true'
   except:
-    exceptionText = traceback.format_exc()
-    logging.debug("Failed to network rule !: " + exceptionText)
+    logging.exception("Failed to network rule !")
 
 def getVifs(vmName):
     vifs = []