Comment 1 for bug 1827371

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

This is somewhat related to bug #1822454. The issue seems to be that the upgrade thinks the raft directory is in a consistent state, but logs, etc seem to indicate that there are 0 records in the directory.

There is a BootstrapRaft function that is done during 'upgrade to 2.4.0' but it starts with:
func BootstrapRaft(context Context) error {
        agentConfig := context.AgentConfig()
        storageDir := raftDir(agentConfig)
        _, err := os.Stat(storageDir)
        // If the storage dir already exists we shouldn't run again. (If
        // we statted the dir successfully, this will return nil.)
        if !os.IsNotExist(err) {
                return err
        }
        _, transport := raft.NewInmemTransport(raft.ServerAddress("notused"))
        defer transport.Close()

So if the directory exists, it won't try to do anything (but it wouldn't anyway because we were upgrading from 2.4.7 to 2.5.4).

It would be good if we just had a way to manually trigger reinitialization of the raft directory.