[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [arm/release] Toning down arm's notice when resolvers fail



commit 019ee06a104b796bee4398efc7b6dff4c368fc09
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sat Sep 24 15:27:38 2011 -0700

    Toning down arm's notice when resolvers fail
    
    When arm failed to query tor's connections it would give a short warning saying
    so. This often spooked users so lowering this to be a NOTICE and giving more
    information on both what happened and how to fix it (99% of the time this is a
    simple permissions issue). Change requested by Sebastian
---
 armrc.sample            |    2 +-
 src/cli/controller.py   |    2 +-
 src/util/connections.py |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/armrc.sample b/armrc.sample
index 8f65fbc..7daba30 100644
--- a/armrc.sample
+++ b/armrc.sample
@@ -303,7 +303,7 @@ log.configDescriptions.persistance.saveFailed NOTICE
 log.connResolverOptions INFO
 log.connLookupFailed INFO
 log.connLookupFailover NOTICE
-log.connLookupAbandon WARN
+log.connLookupAbandon NOTICE
 log.connLookupRateGrowing NONE
 log.hostnameCacheTrimmed INFO
 log.cursesColorSupport INFO
diff --git a/src/cli/controller.py b/src/cli/controller.py
index a841492..4e6dc82 100644
--- a/src/cli/controller.py
+++ b/src/cli/controller.py
@@ -670,7 +670,7 @@ def startTorMonitor(startTime):
       connections.getResolver("tor").setPaused(not conn.isAlive())
     
     # hack to display a better (arm specific) notice if all resolvers fail
-    connections.RESOLVER_FINAL_FAILURE_MSG += " (connection related portions of the monitor won't function)"
+    connections.RESOLVER_FINAL_FAILURE_MSG = "We were unable to use any of your system's resolvers to get tor's connections. This is fine, but means that the connections page will be empty. This is usually permissions related so if you would like to fix this then run arm with the same user as tor (ie, \"sudo -u <tor user> arm\")."
   
   # provides a notice about any event types tor supports but arm doesn't
   missingEventTypes = cli.logPanel.getMissingEventTypes()
diff --git a/src/util/connections.py b/src/util/connections.py
index 97de3ea..9350cb8 100644
--- a/src/util/connections.py
+++ b/src/util/connections.py
@@ -72,13 +72,13 @@ RUN_BSD_PROCSTAT = "procstat -f %s | grep TCP | grep -v 0.0.0.0:0"
 
 RESOLVERS = []                      # connection resolvers available via the singleton constructor
 RESOLVER_FAILURE_TOLERANCE = 3      # number of subsequent failures before moving on to another resolver
-RESOLVER_SERIAL_FAILURE_MSG = "Querying connections with %s failed, trying %s"
+RESOLVER_SERIAL_FAILURE_MSG = "Unable to query connections with %s, trying %s"
 RESOLVER_FINAL_FAILURE_MSG = "All connection resolvers failed"
 CONFIG = {"queries.connections.minRate": 5,
           "log.connResolverOptions": log.INFO,
           "log.connLookupFailed": log.INFO,
           "log.connLookupFailover": log.NOTICE,
-          "log.connLookupAbandon": log.WARN,
+          "log.connLookupAbandon": log.NOTICE,
           "log.connLookupRateGrowing": None,
           "log.configEntryTypeError": log.NOTICE}
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits