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
Unexpected timestamp for meshagents #3281
Comments
It looks like v0.8.58 is when I started using a new version of NPM to package MeshCentral, and so, the new NPM package behavior is now in effect. The best way to get the MeshAgent version is to run it with It indicates exactly what version it is. An alternative is to look at I am not sure how I would push the date or the agent into the |
Unfortunately, the place where this problem is effecting me is in caching/managing the meshagent updates externally. (This is on a system elsewhere in our infrastructure which handles deployment of meshagents to clients.) As a result, running meshagent binaries to determine their version isn't practical since most of the architectures won't execute natively. (For example, I can't determine version of the Windows build of MeshAgent from Linux.) My recommendation (which is perhaps a bit naive) would be to adjust the HTTP Last-Modified header so that a reasonable date is sent out by MeshCentral. The on-disk files will still have the (bogus) date set by NPM, but at least the HTTP responses from MeshCentral can supply a meaningful date to clients. Perhaps this timestamp information could live in hashagents.txt since that file is already updated with each agent update? For now, I've been hacking around this by tweaking the timestamps of the files myself after each invocation of npm: |
Ha! I get it now. Changing the date/time of the HTTP response is something much more under my control. |
In next version of MeshCentral v0.9.52, the Once released, let me know if that works. FYI. In the screen above, I use the |
Can you confirm this works? If it does, please close this issue. - Thanks. |
No replay. I will assume this worked. Closing. |
This is a change in behavior between MeshCentral 0.8.57 and 0.8.58 (and all newer versions).
In older versions, the file timestamp of meshagents reflected their approximate release time, so it could be used to determine their relative age. This timestamp could be used for caching and comparison during deployment, for example.
In versions 0.8.58 and newer, it appears that file timestamps are instead being set to a default from "npm pack". (See: npm/npm#19968 ) Specifically, when pulling the agents, I'm seeing "Last-Modified: Sat, 26 Oct 1985 08:15:00 GMT" regardless of the agent version.
Would it be possible to ensure that meshcentral serves the agents using a timestamp representing their (at least approximate) time of release? Sending out the release time of the meshcentral npm package might be an easy substitute, for example.
The text was updated successfully, but these errors were encountered: