-
Notifications
You must be signed in to change notification settings - Fork 20
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
[Task] Archives shows identical labels for identically-named but distinct files #442
Comments
@jan-law I've assigned you to this issue since the recording labels are mostly your domain. Please let me know if you don't want to take this one and I'll look into it myself. |
I can look into this.
The labels are mapped to file names with the assumption that filenames in Cryostat's archives have distinct names, which is causing the behaviour seen here. Should we allow recording files stored in different subdirectories to have identical file names? If we do, the frontend will need a few changes because the archived recording views perform actions by only looking up the recording name. e.g. attempting to delete one of the recordings with the same name will delete both of them at the same time. |
I think we should only expect uniqueness within the same subdirectory, since that generally matches the same policy we apply to active recording names (unique to the target). #400 will make it more apparent to the user what exactly is happening here by surfacing those subdirectories in the UI. I think there could be some weird interactions if we applied the renaming policy to uploaded files if there is already an identically-named file belonging to some target elsewhere in the archives. For example if you deleted that archived file belonging to a target then the uploaded copy would have the |
The To distinguish between identically named uploaded recordings and recordings directly saved from a target, the |
Hmm. PIDs are indeed unique per "host", but I wonder if we can rely on every container instance having a unique hostname across all platforms. Processes are also often (usually) run as PID 1 within their own containers...
This makes sense. For a future major version (Cryostat 3.0) we should really have a proper database, and assign unique IDs to archived recordings. The database would contain the information about which target the recording came from or if it was uploaded by a client, and the For now that's a much larger undertaking and well out of scope for this fix, or for the next 2.2 release.
For client-uploaded recordings which have no |
This problem of |
@jan-law on the backend side we can grab:
Perhaps that works instead of the RuntimeBean Name attribute? |
Ah, thanks, that works. |
Did some more testing with the draft PRs above, and it looks like the GUID appears different for aliased target URLs. Any ideas why? Also sometimes, the JFRConnection returns a null GUID. I noticed this when using the runtime bean as well. Looking into it.
|
Huh. Getting a null GUID or null attribute from the RuntimeBean is very unexpected. I'll have to dig deeper into the IServerDescriptor and see how/when it computes the GUID. Perhaps in the end this is not actually giving us anything beyond a generated ID corresponding 1:1 to a JMX service URL. Maybe in that case using the Runtime MXBean is actually the better way to go. I don't think Taking all of the classpath, "name", library path, input arguments, pid, VM vendor, and VM version together sounds like it gets us really close to being able to identify deployments of an application, but not necessarily unique instances - since all of those properties would be shared across replicas, possibly even the PID all being 1 in container deployments for example. But, add the Runtime MXBean's "startTime" attribute, which gives the start timestamp in Unix epoch milliseconds, and suddenly it's a lot closer to unique. Still perhaps not sufficient, though. If that was nanosecond resolution I would be satisfied. |
Maybe taking all that information from the Runtime MXBean, including the JVM start time, and putting that all into a structure is really "unique enough" when we consider that this only needs to be unique each time that we look at the same JVM across a handful of different JMX service URLs. It's possible that we have some collisions across that Runtime MXBean data tuple over all of our targets, but what are the odds that there's a collision among the small number of aliased URLs pointing to the same target JVM? So I guess |
Related to #398
See gif. Reproduction steps:
Not sure if this is entirely a -web bug or if this also has bugged behaviour in the backend.
The text was updated successfully, but these errors were encountered: