global/global_init: do first transport connection after setuid()
uverbs kernel module forbids access to a file descriptor after credentials
change, that leads to -EACCESS on each following ibv_*() call.
Why it matters? Infiniband transport stops working after the following
syscalls:
o setuid()
o fork()
Originally the problem was described here [1] and here [2].
This patch targets only setuid() syscall and moves the first transport
initialization after setuid() has been done.
fork() is used to daemonize ceph services (when systemd is not used
for any reason) and probably the easiest way is to rip the whole lagacy
daemonization code out, so this patch does not target this problem.
[1] https://tracker.ceph.com/issues/39238
[2] https://www.spinics.net/lists/ceph-devel/msg45083.html
Signed-off-by: Roman Penyaev <rpenyaev@suse.de>
(cherry picked from commit
02c0a20a09fc8f678d0f9caf7f580b3dbc1f0f91)