Bug fix:
https://bugzilla.redhat.com/show_bug.cgi?id=1434672
Chown lockspace file to sanlock:sanlock in case of the failure of
sanlock.write_lockspace.
---
python/example.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/python/example.py b/python/example.py
index 14e81a8..0e8a2f6 100644
--- a/python/example.py
+++ b/python/example.py
@@ -1,3 +1,5 @@
+import pwd
+import grp
import os
import time
import signal
@@ -18,6 +20,7 @@ def main():
fd, disk = tempfile.mkstemp()
os.close(fd)
+ os.chown(disk, pwd.getpwnam("sanlock").pw_uid,
grp.getgrnam("sanlock").gr_gid)
offset = sanlock.get_alignment(disk)
SNLK_DISKS = [(disk, offset)]
--
1.8.3.1