Skip to content

Commit e573b6a

Browse files
authored
Merge pull request #155621 from cockroachdb/blathers/backport-release-25.4-155543
release-25.4: server: don't exit auto-upgrade if own node isn't live
2 parents bd3a1af + fc7bcc3 commit e573b6a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/server/auto_upgrade.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,15 @@ func (s *topLevelServer) upgradeStatus(
183183
if notRunningErr == nil {
184184
notRunningErr = errors.Errorf("node %d not running (%d), cannot determine version", nodeID, st)
185185
}
186+
// However, we don't want to exit the auto upgrade process if we can't validate
187+
// our own version. Consider the case where the meta1 leaseholder is the first
188+
// node to restart to the new version but has transient liveness issues. If we skip
189+
// the check here, we will see all other nodes at the same (old) version and exit
190+
// the auto upgrade process with UpgradeAlreadyCompleted. Since the meta1 leaseholder
191+
// is the only node that can perform the upgrade, this indefinitely blocks the upgrade.
192+
if s.node.Descriptor.NodeID == nodeID {
193+
return UpgradeBlockedDueToError, errors.Errorf("node %d not running (%d), cannot determine version", nodeID, st)
194+
}
186195
continue
187196
}
188197

0 commit comments

Comments
 (0)