diff options
authorSahina Bose <>2014-05-28 15:53:51 +0530
committerSahina Bose <>2014-05-28 04:55:29 -0700
commit1306b9ec4e9fc098cf34a269727245c1e1499f20 (patch)
parent7de5bb0965f4cc0cf9d0a73c776be2b094180413 (diff)
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: Signed-off-by: Sahina Bose <> Reviewed-on:
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/ b/plugins/
index 77156d2..4a4262f 100755
--- a/plugins/
+++ b/plugins/
@@ -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):