raft backstop cannot recover from deleted raft directory

Bug #1822454 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
John A Meinel
2.5
Fix Released
High
John A Meinel

Bug Description

If you ever delete the 'raft/' directory, the raft worker is unable to recover. We already have the raft-backstop worker, which can handle when there is only a single machine in the server configuration, and it doesn't have voting rights.
However, that worker *doesn't* handle when the configuration has *no* servers, as can happen if the raft/ directory is completely removed. (Or during a restore operation where the controller that was bootstrapped is being replaced by a new identity controller that didn't exist in the old config.)

It seemed the easiest way would be to handle removal of the raft/ directory, as that is generally going to aid robustness.

The particular issue is here:
localServer := raftServers[w.config.LocalID]
if localServer == nil {
      return nil
}

that doesn't account for len(raftServers) == 0.

Revision history for this message
John A Meinel (jameinel) wrote :

this probably won't land for 2.5.4 but we don't have a 2.5.5 target opened up yet.

Changed in juju:
milestone: none → 2.6-beta1
Revision history for this message
John A Meinel (jameinel) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.