-
Notifications
You must be signed in to change notification settings - Fork 31
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(rules): rule triggering on late-connecting targets #1646
Conversation
/build_test |
/build_test |
To run smoketest:
|
To run smoketest:
|
/build_test |
To run smoketest:
|
99bd4f0
to
4bc613f
Compare
/request_review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/build_test |
To run smoketest:
|
d0b7509
to
8720914
Compare
regarding the issue I was having with the vertx-fib-demo-2 targets, it seems to have been resolved for the most part. I just tested it by making the same automated rule |
Okay, I think that would indeed be some deeper piece of networking code then, not specifically related to the rules triggering system, so we should track that as a separate issue and try to get more details about what is causing the thread block. |
Probably the same as #1669 ^ |
other than that, this PR looks good to me 👍 |
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Fixes #1494
Fixes #1497
Related to #1593
Description of the change:
This changeset:
MODIFIED
JVM discovery events in a couple of places. Primarily to avoid anUnsupportedOperationException
that was wrongly thrown and could cause rule activations to fail, and then secondarily to use these events to trigger a proactive re-check of non-connectable targets in case the discovery update made the target connectable.enabled
state - this equality bug actually was a root cause for the broken deactivate/reactivate workflowsMotivation for the change:
This should fix the bug where rules may not activate against targets that appear but are not immediately connectable, and should also shorten the time it takes for Cryostat to detect that a slowly-connectable target becomes connectable.
How to manually test:
Deploy test image in
crc
or other OpenShift/k8s. Deploy a sample application. Quite often, the k8s server notifies Cryostat of the new Endpoints object before the target JVM is actually ready to accept JMX connections, so the initial JVM ID retrieval attempt fails and so does the initial attempt to trigger automated rules. After this change, this workflow should again work as expected and Cryostat should notice that the target becomes connectable, and then triggers automated rules against it.