Skip to content

Commit

Permalink
Fix panic on first ha controller startup. Fixes #1911
Browse files Browse the repository at this point in the history
  • Loading branch information
plorenz committed Apr 8, 2024
1 parent 84711f4 commit 3bdf263
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ func NewController(cfg *Config, versionProvider versions.VersionProvider) (*Cont
return nil, err
}

c.initWeb() // need to init web before bootstrapping, so we can provide our endpoints to peers

if c.raftController != nil {
if err := c.raftController.Bootstrap(); err != nil {
log.WithError(err).Panic("error bootstrapping raft")
Expand Down Expand Up @@ -258,8 +260,6 @@ func NewController(cfg *Config, versionProvider versions.VersionProvider) (*Cont
return nil, err
}

c.initWeb()

return c, nil
}

Expand Down

0 comments on commit 3bdf263

Please sign in to comment.