diff options
author | HÃ¥kon Hallingstad <hakon@verizonmedia.com> | 2021-11-15 16:22:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-15 16:22:23 +0100 |
commit | 954b970e46737d099fe0185961ff5470e3076a96 (patch) | |
tree | b93710cd7e30179248f7505971080e897ec558e9 /node-admin | |
parent | e41a509f4360ab7f565043cba2af5b0dc72ced58 (diff) | |
parent | 873600251eef39e11123e034927a89671c6a3b64 (diff) |
Merge pull request #20019 from vespa-engine/freva/fix-reboot-gen
Update internal reboot/restart generations regardless of state
Diffstat (limited to 'node-admin')
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java index 92aacf8827b..f184deab375 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java @@ -438,19 +438,19 @@ public class NodeAgentImpl implements NodeAgent { void doConverge(NodeAgentContext context) { NodeSpec node = context.node(); Optional<Container> container = getContainer(context); - if (!node.equals(lastNode)) { - logChangesToNodeSpec(context, lastNode, node); - // Current reboot generation uninitialized or incremented from outside to cancel reboot - if (currentRebootGeneration < node.currentRebootGeneration()) - currentRebootGeneration = node.currentRebootGeneration(); + // Current reboot generation uninitialized or incremented from outside to cancel reboot + if (currentRebootGeneration < node.currentRebootGeneration()) + currentRebootGeneration = node.currentRebootGeneration(); - // Either we have changed allocation status (restart gen. only available to allocated nodes), or - // restart generation has been incremented from outside to cancel restart - if (currentRestartGeneration.isPresent() != node.currentRestartGeneration().isPresent() || - currentRestartGeneration.map(current -> current < node.currentRestartGeneration().get()).orElse(false)) - currentRestartGeneration = node.currentRestartGeneration(); + // Either we have changed allocation status (restart gen. only available to allocated nodes), or + // restart generation has been incremented from outside to cancel restart + if (currentRestartGeneration.isPresent() != node.currentRestartGeneration().isPresent() || + currentRestartGeneration.map(current -> current < node.currentRestartGeneration().get()).orElse(false)) + currentRestartGeneration = node.currentRestartGeneration(); + if (!node.equals(lastNode)) { + logChangesToNodeSpec(context, lastNode, node); lastNode = node; } |