-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
RFC: Change Salt to create JIDs as UTC time #33309
Comments
👍 from me |
Huge benefits for external job caches as well. Also, we already have issues with companies who have masters in different timezones. If they aggregate to a single external job cache then you can't meaningfully compare JIDs to see when jobs that hit different masters occurred. |
I'd want to be sold on the benefit a little more. There are maybe a few billion stored Salt jobs out there in the world. The risk of collisions is higher than I'd like to imagine. ;] |
salt checks for a collision before making the jid though.... |
Aren't the collisions just going to exist for less than 24 hours after the switch to UTC is made, though? And only timezones east of UTC are affected since everyone west of UTC will see their JIDs jump forward. |
Both good points. If we have a retry mechanism (which I vaguely recall but haven't looked into) then I'm cool. |
right, so it is 12 hours of collisions, which we SHOULD have a check in place for, but we should double check it, since I wrote it 5 years ago.... |
I remember that Tom. His voice was a tad more gravelly but he had way, way fewer gray hairs. |
This week I noticed our event-bus
And are there any other potential pitfalls along those lines? |
This seems to have missed 2 major releases. External tools using the API have issues due to this bug, so it would be really nice to have it fixed. Any updates on which release this may end up in? |
@timwhite thanks for the bump. General consensus is this should be an easy switchover. Main blocker is the unknowns. We talked about this today and will make the switch for Oxygen to give any potential issues time to surface. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
glares at stalebot |
Thank you for updating this issue. It is no longer marked as stale. |
Closing as complete from the two PRs referenced above. |
Background
JIDs in Salt are currently generated from the Salt Master's current timezone. This makes it difficult or (practically) impossible for consumers of Salt to reconcile a job timestamp with the user's relative local time -- specifically programmatic consumers like via returners or salt-api.
(Please comment with corrections if I am mistaken with anything above!)
Request for comments
What would the potential fallout be for switching Salt to store JIDs in UTC in the next major Salt release?
Initial thoughts
There would be an increased risk for JID collisions for a window of time after users upgrade to this version (I think just the offset of the user's current time and UTC). That risk is already pretty low, but something to consider anyway.
Alternate ideas
Leave the JID as-is and add a new field to the job cache with a UTC timestamp.
Safer but less "single source of truth"-y.
Expose the Salt Master's timezone via a Runner or a salt-api endpoint and let the end-users do the math.
Safer for Salt but a PITA for users. Also likely fraught with edge-cases and mistakes.
@saltstack/team-core @saltstack/team-riot @saltstack/team-platform @thatch45 thoughts?
The text was updated successfully, but these errors were encountered: