Mir

Code review comment for lp:~vanvugt/mir/run-without-entropy

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

So this would be a good time to think of reasonable solutions You're right delaying the creation of the secret would delay the issue but at the same time is still likely to fail at some point.

How about, we check if entropy exists ie. check if we can read /dev/random if we cannot read from it, we fail to create valid cookies. This means we just send off cookies that are empty and wont pass any cookie check. From there, each time we generate a new cookie we attempt to read from /dev/random UNTIL we hit some entropy. From there we create the secret, and are done checking /dev/random then reading from /dev/urandom.

This would mean, we would never block/halt but cookies would fail until some sort of entropy exists on the system. Though starting a process requires entropy ... so I dont expect this to be a huge issue once we have booted.

Now this would bring up some other issues such as anything depending on the cookies to fail... but we can critical log or warn the issue that entropy does not exist and we cannot create any cookies.

Any other ideas are welcome.

« Back to merge proposal