Skip to content

Commit

Permalink
#65 Debug /opt/kafka/config/ not writable
Browse files Browse the repository at this point in the history
  • Loading branch information
cer committed Aug 20, 2024
1 parent 2712d1d commit 1fc2554
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,20 @@ public void registerProperties(BiConsumer<String, Supplier<Object>> registry) {
protected void containerIsStarting(InspectContainerResponse containerInfo) {
try {
ExecResult result = execInContainer("ls", "-ltd", "/opt/kafka/config/");
System.out.println("ls -ltd /opt/kafka/config/: " + result.getExitCode());
System.out.println("ls -ltd /opt/kafka/config/: " + result.getStdout());
System.out.println("ls -ltd /opt/kafka/config/: " + result.getStderr());
printExecResult(result, "ls -ltd /opt/kafka/config/: ");
result = execInContainer("whoami");
printExecResult(result, "whoami");
result = execInContainer("touch", "/opt/kafka/config/foo");
printExecResult(result, "touch /opt/kafka/config/foo");
} catch (IOException | InterruptedException e) {
throw new RuntimeException(e);
}
super.containerIsStarting(containerInfo);
}

private static void printExecResult(ExecResult result, String command) {
System.out.println(command + result.getExitCode());
System.out.println(command + result.getStdout());
System.out.println(command + result.getStderr());
}
}

0 comments on commit 1fc2554

Please sign in to comment.