Yaniv Bronhaim has uploaded a new change for review.

Change subject: Fixing sanlockConfigModule is-configured output
......................................................................

Fixing sanlockConfigModule is-configured output

The output was misleading and based on the return value. This fix makes
the return value parameter more clear and fixes the mix in output.

Change-Id: Iee05a07727a99adae2eab619eada1a42c0ad5f73
Signed-off-by: Yaniv Bronhaim <[email protected]>
---
M lib/vdsm/tool/configurator.py
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/22496/1

diff --git a/lib/vdsm/tool/configurator.py b/lib/vdsm/tool/configurator.py
index 869d774..1e4f119 100644
--- a/lib/vdsm/tool/configurator.py
+++ b/lib/vdsm/tool/configurator.py
@@ -141,7 +141,7 @@
         True if sanlock service is configured, False if sanlock service
         requires a restart to reload the relevant supplementary groups.
         """
-        ret = False
+        configured = False
         try:
             with open("/var/run/sanlock/sanlock.pid", "r") as f:
                 sanlock_pid = f.readline().strip()
@@ -156,20 +156,20 @@
                         break
                 else:
                     raise RuntimeError("Unable to find sanlock service groups")
-            ret = grp.getgrnam(DISKIMAGE_GROUP)[2] in groups
+            configured = grp.getgrnam(DISKIMAGE_GROUP)[2] in groups
         except IOError as e:
             if e.errno == os.errno.ENOENT:
                 sys.stdout.write("sanlock service is not running\n")
-                ret = True
+                configured = True
             else:
                 raise
 
-        if ret:
+        if not configured:
             sys.stdout.write("sanlock service requires restart\n")
         else:
             sys.stdout.write("sanlock service is already configured\n")
 
-        return ret
+        return configured
 
 
 __configurers = (


-- 
To view, visit http://gerrit.ovirt.org/22496
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee05a07727a99adae2eab619eada1a42c0ad5f73
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to