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

JPERF-188: Improve stopJira to wait for Jira process to shutdown inst… #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mzyromski-atlassian
Copy link
Contributor

…ead of all Java processes on the node

wyrzyk
wyrzyk previously approved these changes Feb 20, 2020
@dagguh
Copy link
Member

dagguh commented Feb 25, 2020

This is #82 adopted by @mzyromski-atlassian to cover the CI.
CI shows, that the change introduces an infinite Bash loop, which times out:

java.lang.Exception: SSH command failed to finish in extended time (PT3M45S): SshExecutedCommand(cmd=echo SHUTDOWN | nc localhost 8005 && while pgrep -f jira; do sleep 5; done, stdout=6481
7459
6481
7459
6481
7459
6481
7459
...

/cc @KonradMarszalek

@@ -88,8 +88,10 @@ class CustomDatasetSource(

private fun stopJira(host: SshHost) {
val shutdownTomcat = "echo SHUTDOWN | nc localhost 8005"
val waitForNoJavaProcess = "while ps -C java -o pid=; do sleep 5; done"
Ssh(host, connectivityPatience = 4).newConnection().use { it.safeExecute("$shutdownTomcat && $waitForNoJavaProcess", Duration.ofMinutes(3)) }
val waitForNoJiraProcess = "while pgrep -f jira; do sleep 5; done"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotta fix that infinite loop from CI

@konradmars
Copy link

It seems there are more processes with jira fragment in it's execution path in the CI. Let me improve the logging first so we can see what the processes are. Then we can narrow the pgrep query even more.

@dagguh
Copy link
Member

dagguh commented Feb 25, 2020

Alternatively we could read PID from the PID file.

@dagguh dagguh requested a review from a team as a code owner February 10, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants