This prevents SingleFeatureTest getting blocked on Karaf start-up e.g.
in netconf/features/netconf-connector which I just ran into on a build
server, due to very low entropy (cat
/proc/sys/kernel/random/entropy_avail); it was like 40 or so.
Bug: 6790
Change-Id: Iad71b3b3afb3dad64eeebcce2838e88f2f580606
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
.classpath
.checkstyle
+.fbExcludeFilterFile
# https://github.com/jbosstools/m2e-apt
.factorypath
return new Option[] {
// TODO: Find a way to inherit memory limits from Maven options.
new VMOption("-Xmx2g"),
+ // inspired by org.apache.commons.lang.SystemUtils
+ when(System.getProperty("os.name").toLowerCase().startsWith("linux")).useOptions(
+ // This prevents low entropy issues on Linux to affect Java random numbers
+ // which can block crypto such as the SSH server in netconf
+ // see https://bugs.opendaylight.org/show_bug.cgi?id=6790
+ new VMOption("-Djava.security.egd=file:/dev/./urandom")
+ ),
when(Boolean.getBoolean(PROFILE_PROP)).useOptions(
new VMOption("-XX:+UnlockCommercialFeatures"),
new VMOption("-XX:+FlightRecorder"),