/dev/random is blocking in container on OCP 4

Solution Verified - Updated -

Issue

  • When reading from /dev/random in a container on OpenShift Container Platform, this blocks for a long time, why is that?

    sh-4.4$ time head -n 1 /dev/random
    [..]
    
    real  0m20.296s
    user  0m0.000s
    sys   0m0.003s
    
  • Sometimes programs reading from /dev/random hang for a long time when running on OpenShift Container Platform 4.

Environment

  • Red Hat OpenShift Container Platform (RHOCP) 4.7 and later

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content