Avoid tracebacks on initial probe 12/66612/3
authorStephen Kitt <skitt@redhat.com>
Tue, 19 Dec 2017 11:06:02 +0000 (12:06 +0100)
committerJamo Luhrsen <jluhrsen@redhat.com>
Wed, 20 Dec 2017 18:06:45 +0000 (10:06 -0800)
rest_get is called to retrieve shard information twice, once without a
try block, and again in a try block. When a controller is down, the
first one fails, so the try block is useless (and the user ends up
with an obscure error message).

This patch removes the first, useless call.

Change-Id: I2f6753d71250e3911fbcbbdd31a8b2f595c663c9
Signed-off-by: Stephen Kitt <skitt@redhat.com>
tools/clustering/cluster-monitor/monitor.py

index 488b20ef5b3b5a31d30a557197075133003d40cb..b86cd09c58eb7863c5fb05413d6f9b5f48f2283f 100755 (executable)
@@ -125,7 +125,6 @@ for controller in controllers:
     url = "http://" + controller["ip"] + ":" + controller["port"] + "/jolokia/read/org.opendaylight.controller:"
     url += "Category=ShardManager,name=shard-manager-" + data_store.lower()\
            + ",type=Distributed" + data_store + "Datastore"
-    rest_get(url, username, password)
     try:
         data = rest_get(url, username, password)
     except: