Skip to content

Commit

Permalink
do not fail node read if secret does not exist
Browse files Browse the repository at this point in the history
if we cannot find the credential id attached to the node,
we should not fail the node. we should just return what is
found and leave it to the user from there. failing the node
results in unreadable nodes, which helps no one.

Signed-off-by: Victoria Jeffrey <vjeffrey@chef.io>
  • Loading branch information
Victoria Jeffrey committed Apr 13, 2019
1 parent 1ce169e commit 5169319
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/nodemanager-service/api/nodes/server/server.go
Expand Up @@ -208,7 +208,8 @@ func getSecretsAgg(ctx context.Context, secretIds []string, secretsClient secret
arrMap := make(map[string]string, 0)
s, err := secretsClient.Read(ctx, &secrets.Id{Id: id})
if err != nil {
return nil, errors.Wrap(err, "GetSecretsAgg error")
logrus.Errorf("credential %s not found", id)
continue
}

for _, kv := range s.Data {
Expand Down

0 comments on commit 5169319

Please sign in to comment.