This is an automated email from the git hooks/post-receive script.
nsoffer pushed a commit to annotated tag startup-v1
in repository sanlock.
commit 7cdfc7d6a06f892b449eb5b85d647b95fc084154
Author: Nir Soffer <nsoffer(a)redhat.com>
AuthorDate: Sun May 3 01:34:21 2020 +0300
sanlock: Setup priority before dropping privileges
sched_setscheduler() requires root, but we called it after dropping
privileges, so it always failed:
2020-02-13 12:34:19 1480 [8866]: sanlock daemon started 3.8.0 host
a08359de-225c-4c21-a7d6-3623bb3bd6fb.host4
2020-02-13 12:34:19 1480 [8866]: set scheduler RR|RESET_ON_FORK priority 99 failed:
Operation not permitted
Move setup_priority up before we drop privileges.
With this change sanlock runs now with RR scheduler and expected
priority:
$ ps -o cmd,cls,rtprio -p 2275
CMD CLS RTPRIO
/usr/sbin/sanlock daemon RR 99
Not running with real time scheduler may be the reason we see random
failures to write lockspace in oVirt system tests:
https://bugzilla.redhat.com/1247135
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
src/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main.c b/src/main.c
index 8c6eef8..ebc0b11 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1750,14 +1750,14 @@ static int do_daemon(void)
setup_host_name();
+ setup_priority();
+
setup_uid_gid();
uname(&nodename);
log_warn("sanlock daemon started %s host %s (%s)", VERSION,
our_host_name_global, nodename.nodename);
- setup_priority();
-
rv = thread_pool_create(DEFAULT_MIN_WORKER_THREADS, com.max_worker_threads);
if (rv < 0)
goto out;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.