-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Nodes
persistence cleanup, APIs to control loading
#8979
Conversation
Node oldNode = nodes.get(node.getNodeName()); | ||
if (node != oldNode) { | ||
AtomicReference<Node> old = new AtomicReference<>(); | ||
old.set(nodes.put(node.getNodeName(), node)); | ||
Node old = nodes.put(node.getNodeName(), node); | ||
if (node != old) { | ||
node.onLoad(this, node.getNodeName()); |
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.
Taking the opportunity to simplify the logic here a bit: #5450 (comment)
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.
/label ready-for-merge
This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.
Thanks!
I couldn't find an issue number to comment to hence responding here: |
@mattiassluis that seems plausible. Renaming a node remains possible through the GUI so I think you were just using the wrong method all along. Try creating a new |
When running CloudBees CI in high availability mode we need to control which agents are loaded from disk: blocking some from being loaded at startup, loading them later, reloading them from disk, unloading them from memory while they remain on disk. The four new methods here allow that level of fine-grained control. By default the behavior remains unchanged, of course: the list of agents in memory matches the contents of the
nodes
directory.Testing done
Exercised by various functional tests in CloudBees CI.
Proposed changelog entries
Proposed upgrade guidelines
Before the changes are marked as
ready-for-merge
:Maintainer checklist