diff --git a/src/main/java/io/hyperfoil/tools/qdup/Host.java b/src/main/java/io/hyperfoil/tools/qdup/Host.java index 95d002d5..eb2a05ad 100644 --- a/src/main/java/io/hyperfoil/tools/qdup/Host.java +++ b/src/main/java/io/hyperfoil/tools/qdup/Host.java @@ -46,8 +46,9 @@ public class Host { public static final List PODMAN_FILE_SIZE = Arrays.asList("podman exec ${{container}} du -bc ${{source}} | grep total | cut -d '\t' -f1"); public static final List DOCKER_FILE_SIZE = Arrays.asList("docker exec ${{container}} du -bc ${{source}} | grep total | cut -d '\t' -f1"); - - public static final List LOCAL_LINUX_CONNECT_SHELL = Arrays.asList("script", "-q", "/dev/null","/bin/bash"); + //worked on old fedora but not on fedora 39 + //public static final List LOCAL_LINUX_CONNECT_SHELL = Arrays.asList("script", "-q", "/dev/null","/bin/bash"); + public static final List LOCAL_LINUX_CONNECT_SHELL = Arrays.asList("script", "-q","-c","/bin/bash","/dev/null"); //LOCAL_EXEC uses System.getRuntime().exec(...) public static final List LOCAL_LINUX_UPLOAD = Arrays.asList("cp","-r","${{source}}","${{destination}}"); public static final List LOCAL_LINUX_DOWNLOAD = Arrays.asList("cp","-r","${{source}}","${{destination}}"); diff --git a/src/main/java/io/hyperfoil/tools/qdup/shell/ContainerShell.java b/src/main/java/io/hyperfoil/tools/qdup/shell/ContainerShell.java index cf2ba196..a31bd942 100644 --- a/src/main/java/io/hyperfoil/tools/qdup/shell/ContainerShell.java +++ b/src/main/java/io/hyperfoil/tools/qdup/shell/ContainerShell.java @@ -230,7 +230,7 @@ public void postConnect(){ }else{ String unameN = shSync("uname -n"); if(!unameN.equals(getHost().getContainerId())){ - logger.error("container Id changed for "+getHost().getSafeString()); + logger.error("container Id changed for "+getHost().getSafeString()+" "+unameN); //getHost().setContainerId(unameN); } } diff --git a/src/main/java/io/hyperfoil/tools/qdup/shell/LocalShell.java b/src/main/java/io/hyperfoil/tools/qdup/shell/LocalShell.java index 5eda7665..7118c392 100644 --- a/src/main/java/io/hyperfoil/tools/qdup/shell/LocalShell.java +++ b/src/main/java/io/hyperfoil/tools/qdup/shell/LocalShell.java @@ -82,7 +82,7 @@ PrintStream connectShell() { } catch (IOException e) { logger.error(getName()+" error reading from shell stream",e); } - logger.info("{} reader thread is stopping",getName()); + logger.debug("{} local reader thread is stopping len={} connectCounter={} count={}",getName(),len,connectCounter.get(),count); }); readerThread.setDaemon(false); readerThread.start(); @@ -112,7 +112,7 @@ public void exec(String command, Consumer callback) { } catch (IOException e) { logger.error(getName()+" error reading from shell stream",e); } - logger.info("{} reader thread is stopping",getName()); + logger.debug("{} reader thread is stopping",getName()); }); t.setDaemon(false); t.start(); diff --git a/src/test/java/io/hyperfoil/tools/qdup/LocalTest.java b/src/test/java/io/hyperfoil/tools/qdup/LocalTest.java index 1ad77b74..701622ef 100644 --- a/src/test/java/io/hyperfoil/tools/qdup/LocalTest.java +++ b/src/test/java/io/hyperfoil/tools/qdup/LocalTest.java @@ -1,7 +1,6 @@ package io.hyperfoil.tools.qdup; import io.hyperfoil.tools.qdup.config.yaml.HostDefinition; -import io.hyperfoil.tools.qdup.config.yaml.HostDefinitionConstruct; import io.hyperfoil.tools.qdup.config.yaml.Parser; import io.hyperfoil.tools.qdup.shell.AbstractShell; import io.hyperfoil.tools.qdup.shell.ContainerShell; @@ -13,12 +12,9 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.attribute.FileAttribute; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ScheduledThreadPoolExecutor; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import static org.junit.Assert.*; @@ -382,6 +378,7 @@ public void remote_container_download_file(){ String response = shell.shSync("echo 'foo' > /tmp/foo.txt"); response = shell.shSync("ls -al /tmp/foo.txt"); Local local = new Local(getBuilder().buildConfig(Parser.getInstance())); + //this is erorring if something else created /tmp/foo.txt, need to use a unique name assertFalse("/tmp/foo.txt should not exist in testcontainer",exists("/tmp/foo.txt")); try{ @@ -416,6 +413,7 @@ public void remote_container_download_folder(){ response = shell.shSync("echo 'bar' > "+containerDir+"/bar.txt"); response = shell.shSync("ls -al "+containerDir); Local local = new Local(getBuilder().buildConfig(Parser.getInstance())); + //this is erorring if something else created /tmp/foo.txt, need to use a unique name assertFalse("/tmp/foo.txt should not exist in testcontainer",exists("/tmp/foo.txt")); try{