-
Notifications
You must be signed in to change notification settings - Fork 53
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
New plugin sync and patch management framework #885
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kralicky
force-pushed
the
patch-improvements
branch
2 times, most recently
from
December 9, 2022 01:43
adedf53
to
0457c52
Compare
Co-authored-by: Alexandre Lamarre <alexandre.lamarre@suse.com>
kralicky
force-pushed
the
patch-improvements
branch
from
December 9, 2022 06:08
d426ae1
to
6f263dc
Compare
kralicky
changed the title
new server-side-only patch management
New plugin sync and patch management framework
Dec 9, 2022
…in loader client to verify plugins before loading
alexandreLamarre
force-pushed
the
patch-improvements
branch
2 times, most recently
from
December 12, 2022 23:00
bb2aad6
to
fb301d1
Compare
…w filtering plugins to sync based on available modes
… to 20m; increase default slow spec threshold from 5s to 15s
dbason
approved these changes
Dec 15, 2022
alexandreLamarre
approved these changes
Dec 16, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New plugin sync and patch management framework
Co-authored-by: Alexandre Lamarre alexandre.lamarre@suse.com
This is a large rework of the plugin sync and patching mechanism. The old system relied on agents to compute binary diffs of plugins, which caused a handful of previously-unforseen issues, notably that the actual computing of patches is compute and memory intensive, and when agents are running with limited resources, this resulted in agents running oom or huge slowdowns during upgrades.
In the new system, the gateway is responsible for computing patches. It will cache plugins and patches on disk, and manage this cache intelligently based on the state of known agents.
To enable this, the gateway now tracks the "last known connection details" for all the agents that connect to it. When an agent connects, its plugin manifest is saved to its cluster metadata in the kv store. Because of this new bookkeeping, the gateway can now determine precisely which plugin revisions and patches to keep around in its cache, and clean any "unreachable" objects from the cache on every startup.
There are a few implementation details that are important to keep in mind, that make this work:
The next time the gateway is started up, its plugins may be different (due to [2]), and this will cause every agent to fail plugin verification when they reconnect (due to [3]). Since all the agents that were previously connected were running the same plugins the gateway was just running (due to [1]) the gateway can simply use the previous set of plugins that were cached on last startup, and the current set of plugins that were cached on this startup, to compute a patch that can be served to all agents at the same time. The patch is then saved in the gateway's cache until at least the next restart, where it will garbage-collect the "unreachable" plugins and patches from previous revisions.
The garbage collection logic is very simple:
Other details:
opni cluster show <id>
which shows detailed info on the cluster, including its plugin manifest, last known connection details, and creation timestamp.Closes #910
Closes #738 (obsolete)
Closes #911
Closes #789