Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore security manager allowance #23683

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import static io.trino.tests.product.launcher.env.EnvironmentContainers.WORKER;
import static io.trino.tests.product.launcher.env.EnvironmentContainers.configureTempto;
import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TRINO_ETC;
import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TRINO_JVM_CONFIG;
import static java.util.Objects.requireNonNull;
import static org.testcontainers.utility.MountableFile.forHostPath;

Expand All @@ -49,8 +50,8 @@ public EnvMultinodeKafkaSaslPlaintext(KafkaSaslPlaintext kafka, StandardMultinod
@Override
public void extendEnvironment(Environment.Builder builder)
{
builder.configureContainer(COORDINATOR, this::addCatalogs);
builder.configureContainer(WORKER, this::addCatalogs);
builder.configureContainer(COORDINATOR, this::configureTrino);
builder.configureContainer(WORKER, this::configureTrino);
builder.addConnector("kafka");

configureTempto(builder, configDir);
Expand All @@ -60,7 +61,7 @@ public void extendEnvironment(Environment.Builder builder)
CONTAINER_TRINO_ETC + "/kafka-configuration.properties"));
}

private void addCatalogs(DockerContainer container)
private void configureTrino(DockerContainer container)
{
container
.withCopyFileToContainer(
Expand All @@ -71,6 +72,8 @@ private void addCatalogs(DockerContainer container)
CONTAINER_TRINO_ETC + "/catalog/kafka.properties")
.withCopyFileToContainer(
forHostPath(configDir.getPath("kafka-configuration.properties")),
CONTAINER_TRINO_ETC + "/kafka-configuration.properties");
CONTAINER_TRINO_ETC + "/kafka-configuration.properties")
.withCopyFileToContainer(forHostPath(configDir.getPath("jvm.config")),
CONTAINER_TRINO_JVM_CONFIG);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import static io.trino.tests.product.launcher.env.EnvironmentContainers.isTrinoContainer;
import static io.trino.tests.product.launcher.env.common.Kerberos.DEFAULT_WAIT_STRATEGY;
import static io.trino.tests.product.launcher.env.common.Kerberos.KERBEROS;
import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TRINO_JVM_CONFIG;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
import static org.testcontainers.containers.BindMode.READ_ONLY;
Expand Down Expand Up @@ -88,6 +89,7 @@ public void extendEnvironment(Environment.Builder builder)
if (isTrinoContainer(container.getLogicalName())) {
builder.addConnector("kudu", forHostPath(configDir.getPath("kudu.properties")));
container.withFileSystemBind(kerberosCredentialsDirectory.toString(), "/kerberos", READ_ONLY);
container.withCopyFileToContainer(forHostPath(configDir.getPath("jvm.config")), CONTAINER_TRINO_JVM_CONFIG);
addKrb5(container);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import static io.trino.tests.product.launcher.env.EnvironmentContainers.configureTempto;
import static io.trino.tests.product.launcher.env.EnvironmentContainers.isTrinoContainer;
import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TRINO_ETC;
import static io.trino.tests.product.launcher.env.common.Standard.CONTAINER_TRINO_JVM_CONFIG;
import static java.util.Objects.requireNonNull;
import static org.testcontainers.utility.MountableFile.forHostPath;

Expand Down Expand Up @@ -68,6 +69,7 @@ public void extendEnvironment(Environment.Builder builder)

builder.configureContainers(container -> {
if (isTrinoContainer(container.getLogicalName())) {
container.withCopyFileToContainer(forHostPath(configDir.getPath("jvm.config")), CONTAINER_TRINO_JVM_CONFIG);
container.withCopyFileToContainer(forHostPath(configDir.getPath("hbase-site.xml")), CONTAINER_TRINO_ETC + "/hbase-site.xml");
container.withCopyFileToContainer(forHostPath(configDir.getPath("phoenix.properties")), CONTAINER_TRINO_ETC + "/catalog/phoenix.properties");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-server
-Xmx2G
-XX:G1HeapRegionSize=32M
-XX:+ExplicitGCInvokesConcurrent
-XX:+ExitOnOutOfMemoryError
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:ReservedCodeCacheSize=150M
-XX:PerMethodRecompilationCutoff=10000
-XX:PerBytecodeRecompilationCutoff=10000
-Djdk.attach.allowAttachSelf=true
# jdk.nio.maxCachedBufferSize controls what buffers can be allocated in per-thread "temporary buffer cache" (sun.nio.ch.Util). Value of 0 disables the cache.
-Djdk.nio.maxCachedBufferSize=0
-DHADOOP_USER_NAME=hive
-Duser.timezone=Asia/Kathmandu
-XX:ErrorFile=/docker/logs/product-tests-presto-jvm-error-file.log
# Allow loading dynamic agent used by JOL
-XX:+EnableDynamicAgentLoading
-XX:+UnlockDiagnosticVMOptions
# https://bugs.openjdk.org/browse/JDK-8327134a
-Djava.security.manager=allow
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-server
-Xmx2G
-XX:G1HeapRegionSize=32M
-XX:+ExplicitGCInvokesConcurrent
-XX:+ExitOnOutOfMemoryError
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:ReservedCodeCacheSize=150M
-XX:PerMethodRecompilationCutoff=10000
-XX:PerBytecodeRecompilationCutoff=10000
-Djdk.attach.allowAttachSelf=true
# jdk.nio.maxCachedBufferSize controls what buffers can be allocated in per-thread "temporary buffer cache" (sun.nio.ch.Util). Value of 0 disables the cache.
-Djdk.nio.maxCachedBufferSize=0
-DHADOOP_USER_NAME=hive
-Duser.timezone=Asia/Kathmandu
-XX:ErrorFile=/docker/logs/product-tests-presto-jvm-error-file.log
# Allow loading dynamic agent used by JOL
-XX:+EnableDynamicAgentLoading
-XX:+UnlockDiagnosticVMOptions
# https://bugs.openjdk.org/browse/JDK-8327134
-Djava.security.manager=allow
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-server
-Xmx2G
-XX:G1HeapRegionSize=32M
-XX:+ExplicitGCInvokesConcurrent
-XX:+ExitOnOutOfMemoryError
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:ReservedCodeCacheSize=150M
-XX:PerMethodRecompilationCutoff=10000
-XX:PerBytecodeRecompilationCutoff=10000
-Djdk.attach.allowAttachSelf=true
# jdk.nio.maxCachedBufferSize controls what buffers can be allocated in per-thread "temporary buffer cache" (sun.nio.ch.Util). Value of 0 disables the cache.
-Djdk.nio.maxCachedBufferSize=0
-DHADOOP_USER_NAME=hive
-Duser.timezone=Asia/Kathmandu
-XX:ErrorFile=/docker/logs/product-tests-presto-jvm-error-file.log
# Allow loading dynamic agent used by JOL
-XX:+EnableDynamicAgentLoading
-XX:+UnlockDiagnosticVMOptions
# https://bugs.openjdk.org/browse/JDK-8327134a
-Djava.security.manager=allow
Loading