From 1306b9ec4e9fc098cf34a269727245c1e1499f20 Mon Sep 17 00:00:00 2001 From: Sahina Bose Date: Wed, 28 May 2014 15:53:51 +0530 Subject: server-plugin: Corrected the exit status for plugin The exit status from NRPE plugin was wrapped with WEXITSTATUS which was earlier used when running commands directly. With the subprocess implementation, this is not required as it always returns 0 for successful execution even when nrpe plugin returns 1/2. Change-Id: I3cda8d4aa5b4f726cb5c7faf05c7f2536115eafe Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1101211 Signed-off-by: Sahina Bose Reviewed-on: http://review.gluster.org/7905 --- plugins/check_vol_server.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/check_vol_server.py b/plugins/check_vol_server.py index 77156d2..4a4262f 100755 --- a/plugins/check_vol_server.py +++ b/plugins/check_vol_server.py @@ -4,7 +4,6 @@ import json import random import argparse import livestatus -import os from glusternagios import utils import server_utils @@ -96,7 +95,7 @@ def _getVolumeQuotaStatusOutput(hostgroup, volume): def execNRPECommand(command): status, output, err = utils.execCmd(command.split(), raw=True) - return os.WEXITSTATUS(status), output + return status, output def _executeRandomHost(hostgroup, command): -- cgit