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

fix(podman): fix blocked thread on container inspection request #1523

Closed

Conversation

andrewazores
Copy link
Member

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed the last commit: git commit --amend --signoff

Related to #1514

Description of the change:

Executes the Podman API request for listing containers on the Vert.x worker pool, and the subtask request for inspecting individual containers (if needed: no jmxHost label or jmxUrl label) on a worker thread.

Motivation for the change:

This fixes a bug where the executor thread gets blocked when it needs to list containers and then further inspect them. This blockage results in failure of the platform client to discover containers.

How to manually test:

  1. Apply the patch below, then:
  2. Run CRYOSTAT_IMAGE=quay.io... sh run.sh...
diff --git a/run.sh b/run.sh
index 9d322386..e58ca4f7 100755
--- a/run.sh
+++ b/run.sh
@@ -123,9 +123,7 @@ podman run \
     --name cryostat \
     --user 0 \
     --label io.cryostat.discovery="true" \
-    --label io.cryostat.jmxHost="localhost" \
-    --label io.cryostat.jmxPort="0" \
-    --label io.cryostat.jmxUrl="service:jmx:rmi:///jndi/rmi://localhost:0/jmxrmi" \
+    --label io.cryostat.jmxPort="${CRYOSTAT_RJMX_PORT}" \
     --memory 768M \
     --mount type=bind,source="$(dirname "$0")/archive",destination=/opt/cryostat.d/recordings.d,relabel=shared \
     --mount type=bind,source="$(dirname "$0")/certs",destination=/certs,relabel=shared \
@@ -136,7 +134,7 @@ podman run \
     --mount type=bind,source="$(dirname "$0")/probes",destination=/opt/cryostat.d/conf.d/probes.d,relabel=shared \
     -v "$XDG_RUNTIME_DIR"/podman/podman.sock:/run/user/0/podman/podman.sock:Z \
     --security-opt label=disable \
-    -e CRYOSTAT_ENABLE_JDP_BROADCAST="true" \
+    -e CRYOSTAT_ENABLE_JDP_BROADCAST="false" \
     -e CRYOSTAT_REPORT_GENERATOR="$CRYOSTAT_REPORT_GENERATOR" \
     -e CRYOSTAT_PLATFORM="$CRYOSTAT_PLATFORM" \
     -e CRYOSTAT_DISABLE_BUILTIN_DISCOVERY="$CRYOSTAT_DISABLE_BUILTIN_DISCOVERY" \

@andrewazores
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant