osmo_get_rand_id() fails in containerised environment
In some cases, when running newer libc over an older kernel, the getrandom() call returns ENOSYS
Given that ENOSYS is a valid retval, there's a multitude of fallback schemes for getting randomness.
Updated by ipse over 4 years ago
To give some context, we found that the current
osmo_get_rand_id() behavior breaks OsmoMGW and OsmoMSC when running in a container when the host system runs an older kernel version. In general, it looks wrong to assume that a newer
libc always comes with a newer kernel..
As a side note, the
osmo_get_rand_id() failure in OsmoMGW was a bit hard to trace - OsmoMGW didn't provide any meaningful log message, just silently rejected all requests. It took us a while to figure out (using
strace) that the reason is in the