What are the available options to check and validate the entropy settings in a k8s or openshift setup?
DX Platform 2x
If you are unable to use <dx-platform>/tools/dxi-entropy-check.sh script due to Kubernetes or Openshift user restrictions, alternately, you can use:
cat /proc/sys/kernel/random/entropy_avail
it returns a number that indicates how much "entropy" is available to the kernel
If it returns anything less than 1000, Then we know there is low entropy in the node.
IMPORTANT:
If entropy is insufficient pods may stuck in init state or crash (apmservices and acc pods are more sensitive to insufficient entropy)
- to see currently available entropy on the host: cat /proc/sys/kernel/random/entropy_avail
- to make sure that pods will get sufficient amount of entropy it is better to use command like in dxi-entropy-check script: timeout -s ALRM 20 dd if=/dev/random of=/dev/null bs=1024 count=1024 iflag=fullblock;
- normal output likeo # timeout -s ALRM 20 dd if=/dev/random of=/dev/null bs=1024 count=1024 iflag=fullblock;o sh-4.4
$ timeout -s ALRM 20 dd if=/dev/random of=/dev/null bs=1024 count=1024 iflag=fullblock;o 1024+0 records ino 1024+0 records outo 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.828665 s, 1.3 MB/s