This is a better and simpler version of "Collect supplementary groups before daemonizing" I sent earlier today.
Sanlock daemon used to setup the supplementary groups after daemonizing. This may be slow on overloaded machines creating a window where sanlock supplementary groups are empty, confusing vdsm-tool.
This patch set the supplementary groups before daemonizing, so programs managing sanlock would wait until it the daemon is configured properly, eliminating the race during startup. The child process inherits the supplementary groups set by the parent.
The complex code for setting groups was replaced with a call to initgroups().
Signed-off-by: Nir Soffer nsoffer@redhat.com
Please find the patch on github (git send-email trouble); https://github.com/nirs/sanlock/commit/db6f765a3f8ee4c22c818be90a765ac8be1d2...
Regards, Nir
sanlock-devel@lists.fedorahosted.org