-
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
feat(discovery): Podman platform #1394
Conversation
e1f7d2c
to
1fe20c3
Compare
This + cryostatio/cryostat-web#891 = Of course, the two quarkus-test applications are also within the pod, but they are self-publishing as discovery plugins rather than being configured for discovery by podman container label. |
Test image available:
|
@@ -82,7 +82,10 @@ public class HttpServer extends AbstractVerticle { | |||
.setPort(netConf.getInternalWebServerPort()) | |||
.addWebSocketSubProtocol("*") | |||
.setCompressionSupported(true) | |||
.setLogActivity(true))); | |||
.setLogActivity(true) | |||
.setTcpFastOpen(true) |
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.
Just curious what is reason for enabling these tcp features now vs. before?
Ah right, I forgot to mention. Since the built-in discovery only loads one of these plugins at runtime (plus custom targets, always), it's the Podman realm that is up to date. The JDP realm you're seeing is old data in the database from the last time you ran it and JDP was loaded. I'm not sure what I want to do about that. Maybe the builtins that are not activated should have their realms deleted automatically? |
Oh, that makes a lot of sense then. Then the jvmID thing is not an issue. Realms being deleted automatically if not loaded makes sense. We probably will never activate/deactive any built-in discovery platforms over the lifecycle after startup is complete so any of that data that isn't loaded will always be stale in a future run. |
External plugins that go through the API have the ping-pruning mechanism that will result in their realms being deleted if the plugins becomes unreachable too, so they do potentially suffer the same "problem". And just in general, if a target disappears, that context is already lost for any archived recordings that came from it, which is why we have separate archived recording metadata that we store. So deleting the builtin plugins realms' doesn't seem too much different. On a technical level it will take some refactoring, but I don't think it should be too hard to do. |
Okay, last set of commits:
|
Test image available:
|
2d3a028
to
5dc644a
Compare
Test image available:
|
Maybe |
Running smoketest just like this: But running it with the env var |
5dc644a
to
e365bf4
Compare
Yep, that sounds like it's working as expected. |
Test image available:
|
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.
Looks good to me!
Test image available:
|
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.
Dependency addition looks fine
Signed-off-by: Andrew Azores <aazores@redhat.com>
Signed-off-by: Andrew Azores <aazores@redhat.com>
Signed-off-by: Andrew Azores <aazores@redhat.com>
allow multiple available strategies to be selected. the highest priority available platform provides the authmanager if none explicitly specified. set of selected strategies can be mapped to set of available platform clients, allowing multiple enabled built-in plugins at once Signed-off-by: Andrew Azores <aazores@redhat.com>
Signed-off-by: Andrew Azores <aazores@redhat.com>
Signed-off-by: Andrew Azores <aazores@redhat.com>
9ad065e
to
ffca3e1
Compare
Test image available:
|
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit --amend --signoff
Related to cryostatio/cryostat#492
Related to cryostatio/cryostat#421
Description of the change:
I revisited an old, old branch (June 2021 - unfortunately the original commit dates are lost now that this has been rebased and signed) where I was experimenting with talking to the Podman HTTP API from within Cryostat. At the time the Discovery tree querying work was under way, but there was not yet any notion of a persistent database for this data, and no developed system for discovery plugins other than the runtime detection of the single type platform strategy to pick up and use. At that time the original goal of getting a Podman HTTP API discovery query working was just to enable that discovery tree structure development for a contributor who was unable to run
crc
or other heftier systems that can provide a more interesting and non-flat deployment structure as compared to JDP's flat list.Today we have much more sophistication around discovery, persistence, and modularity, and so I got the Podman HTTP API communication working and wrapped it up into a built-in discovery plugin.
Motivation for the change:
This may be helpful because it is an additional example of a discovery plugin implementation, but it also removes dependency on JDP which may relieve some work from upstream JMC-core refactoring. JDP is probably only used in toy deployments of Cryostat like the upstream development
smoketest.sh
, so dropping it is unlikely to cause anyone any real issues so long as we have a reasonable development cycle replacement. Querying the Podman API periodically seems to do just as well for this purpose, and as an added bonus also is a little closer to other container runtimes in that we could configure multiple pods along with multiple containers within the pods and emulate something more like an OpenShift deployment (more complex topology).In this PR the JDP platform client is still present, still named Default, and still has the lowest priority of the built-in plugins. The system will still choose the highest priority available built-in client to run, alongside Custom Targets and the plugin API, so in
smoketest.sh
/run.sh
the Podman setup will be active rather than JDP. In integration tests the Podman socket is not active and mounted into the container, so the system continues to fall back on the old JDP discovery built-in.How to manually test: