From 06630aa410cf922c98563d6b524c97a1ab97b256 Mon Sep 17 00:00:00 2001 From: Jake Taylor <jake@elixxir.io> Date: Mon, 24 Aug 2020 12:14:57 -0500 Subject: [PATCH] fix missing salt on restart --- cmd/conf/params.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmd/conf/params.go b/cmd/conf/params.go index 4a580109..862bf714 100644 --- a/cmd/conf/params.go +++ b/cmd/conf/params.go @@ -239,12 +239,10 @@ func (p *Params) ConvertToDefinition() (*internal.Definition, error) { // Check if the IDF exists if p.Node.Paths.Idf != "" && utils.Exists(p.Node.Paths.Idf) { // If the IDF exists, then get the ID and save it - _, newID, err2 := idf.UnloadIDF(p.Node.Paths.Idf) - if err2 != nil { - return nil, errors.Errorf("Could not unload IDF: %+v", err2) + def.Salt, def.ID, err = idf.UnloadIDF(p.Node.Paths.Idf) + if err != nil { + return nil, errors.Errorf("Could not unload IDF: %+v", err) } - - def.ID = newID } else { // If the IDF does not exist, then generate a new ID, save it to an IDF, // and save the ID to the definition -- GitLab