summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRamesh Nachimuthu <rnachimu@redhat.com>2014-05-22 18:33:09 +0530
committerSahina Bose <sabose@redhat.com>2014-05-23 01:39:42 -0700
commita154212abf47d6bf5b2c6416887f177a062a59d5 (patch)
treeaebb391057b5025a2343b9a7ea1b090986788211 /plugins
parentb25fc3d0aeaf23a5245f9531b5a8ad78ae91a870 (diff)
plugins: Fixing issue in SMB status plugin
SMB is enabled by default. So even if there is no option specified in volume options, we have to consider that SMB is enabled. Also if either SMB or CIFS is disabled, it means that SMB is disabled. Change-Id: Ie1aca2ac51308ba3ae33c767a217188e82570a33 Bug-Url: https://bugzilla.redhat.com/1099334 Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: http://review.gluster.org/7847 Reviewed-by: Kanagaraj M <kmayilsa@redhat.com>
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/check_proc_util.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/check_proc_util.py b/plugins/check_proc_util.py
index 568f259..716e9e2 100755
--- a/plugins/check_proc_util.py
+++ b/plugins/check_proc_util.py
@@ -154,9 +154,9 @@ def getSmbStatus(volInfo):
# if smb is not running and any of the volume uses smb
# then its required to alert the user
for k, v in volInfo.iteritems():
- cifsStatus = v.get('options', {}).get('user.cifs', 'disable')
- smbStatus = v.get('options', {}).get('user.smb', 'disable')
- if cifsStatus == 'enable' or smbStatus == 'enable':
+ cifsStatus = v.get('options', {}).get('user.cifs', 'enable')
+ smbStatus = v.get('options', {}).get('user.smb', 'enable')
+ if cifsStatus == 'enable' and smbStatus == 'enable':
msg = "CRITICAL: Process smb is not running"
status = utils.PluginStatusCode.CRITICAL
break