diff options
author | Valerij Fredriksen <valerijf@yahooinc.com> | 2021-11-15 15:46:42 +0100 |
---|---|---|
committer | Valerij Fredriksen <valerijf@yahooinc.com> | 2021-11-15 15:46:42 +0100 |
commit | 873600251eef39e11123e034927a89671c6a3b64 (patch) | |
tree | 89291359b5b0e8a4f39b4ec043bc1e6511b8266d /node-admin | |
parent | 63c1f5a8008d231dd580bc76c38a4d48cd3d1970 (diff) |
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; } |