Ruby slow to launch (was L-o-n-g delay for rc.local in systemd on Ubuntu.)
Tom Buskey
tom at buskey.name
Tue Aug 8 15:33:36 EDT 2017
On Tue, Aug 8, 2017 at 3:18 PM, Joshua Judson Rosen <rozzin at hackerposse.com>
wrote:
> On 08/08/2017 02:52 PM, Ken D'Ambrosio wrote:
> > On 2017-08-08 14:43, Bill Freeman wrote:
> >> As to why ruby is designed to require a random number before being
> >> asked to do something dependent on such a random number is a question
> >> for the ruby developers.
>
I assume you meant not dependent.
> >
> > Email already sent. :-)
> >
> > C'est la vie. I guess that's the way the Ruby crumbles...
>
That'd be a pretty bad design decision for some environments.
> Instead of rewriting the whole thing, why not just seed the RNG manually?
>
> Slightly relevant-looking discussion BTW:
>
> https://bugs.ruby-lang.org/issues/9569#note-56
>
>
> So, there you go. "until the entropy pool is initialized" is apparently
> about 3 minutes in your case ;)
>
> You should be able to explicitly seed Ruby's internal RNG,
> or explicitly seed the system RNG by writing bytes into
> /dev/random or /dev/urandom.
>
> If you want `instant good entropy' at boot, you can even store
> some random data into a file at shutdown and then seed from that file
> at boot (be sure to invalidate that cache before seeding from it though,
> to ensure that you don't use the same seed twice!). IIRC there are
> some preexisting packages for this, and some distributions even do it by
> default.
>
> If you write a systemd service, it looks like you can depend on
> systemd-random-seed.service.
>
The preseed might be a good 1st try at a fix that won't ruin the system RNG
and potentially compromising security.
This reminds me of the old days when Slackware was created because SLS
wouldn't fix permission issues correctly in the installer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.gnhlug.org/pipermail/gnhlug-discuss/attachments/20170808/7895f97d/attachment.html
More information about the gnhlug-discuss
mailing list