File tree 1 file changed +4
-1
lines changed
qa/packaging/src/test/java/org/elasticsearch/packaging/util/docker
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -75,12 +75,15 @@ public class Docker {
75
75
public static final int STARTUP_SLEEP_INTERVAL_MILLISECONDS = 1000 ;
76
76
public static final int STARTUP_ATTEMPTS_MAX = 30 ;
77
77
78
+ /**
79
+ * The length of the command exceeds what we can use for COLUMNS so we use
80
+ * a workaround to find the process we're looking for
81
+ */
78
82
private static final String ELASTICSEARCH_FULL_CLASSNAME = "org.elasticsearch.bootstrap.Elasticsearch" ;
79
83
private static final String FIND_ELASTICSEARCH_PROCESS = "for pid in $(ps -eo pid,comm | grep java | awk '\\ ''{print $1}'\\ ''); "
80
84
+ "do cmdline=$(tr \" \\ 0\" \" \" < /proc/$pid/cmdline 2>/dev/null); [[ $cmdline == *"
81
85
+ ELASTICSEARCH_FULL_CLASSNAME
82
86
+ "* ]] && echo \" $pid: $cmdline\" ; done" ;
83
- // The length of the command exceeds what we can use for COLUMNS so we use a pipe to detect the process we're looking for
84
87
85
88
/**
86
89
* Tracks the currently running Docker image. An earlier implementation used a fixed container name,
You can’t perform that action at this time.
0 commit comments