Skip to content

Commit

Permalink
server crash with no ecryption key
Browse files Browse the repository at this point in the history
  • Loading branch information
svaroqui committed Jun 7, 2023
1 parent 79aaa8e commit 9b02cc8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,7 @@ func (cluster *Cluster) Init(confs *config.ConfVersion, cfgGroup string, tlog *s
cluster.Confs = confs

cluster.Conf = confs.ConfInit
k, _ := cluster.Conf.LoadEncrytionKey()
if k == nil {
cluster.LogPrintf(LvlInfo, "No existing password encryption key")
cluster.SetState("ERR00090", state.State{ErrType: "WARNING", ErrDesc: fmt.Sprintf(cluster.GetErrorList()["ERR00090"]), ErrFrom: "CLUSTER"})
}

cluster.tlog = tlog
cluster.htlog = loghttp
cluster.termlength = termlength
Expand All @@ -302,7 +298,11 @@ func (cluster *Cluster) Init(confs *config.ConfVersion, cfgGroup string, tlog *s
cluster.runUUID = runUUID
cluster.repmgrHostname = repmgrHostname
cluster.repmgrVersion = repmgrVersion

k, _ := cluster.Conf.LoadEncrytionKey()
if k == nil {
cluster.LogPrintf(LvlInfo, "No existing password encryption key")
cluster.SetState("ERR00090", state.State{ErrType: "WARNING", ErrDesc: fmt.Sprintf(cluster.GetErrorList()["ERR00090"]), ErrFrom: "CLUSTER"})
}
cluster.InitFromConf()

return nil
Expand Down

0 comments on commit 9b02cc8

Please sign in to comment.