diff --git a/nodepool/driver/statemachine.py b/nodepool/driver/statemachine.py index c18509665..243fae604 100644 --- a/nodepool/driver/statemachine.py +++ b/nodepool/driver/statemachine.py @@ -291,7 +291,8 @@ class StateMachineNodeLauncher(stats.StatsReporter): if state_machine.state != old_state: self.log.debug("State machine for %s advanced from %s to %s", node.id, old_state, state_machine.state) - if not node.external_id and state_machine.external_id: + if (state_machine.external_id and + node.external_id != state_machine.external_id): node.external_id = state_machine.external_id self.zk.storeNode(node) if state_machine.complete and not self.nodescan_request: