From a6f76aa0affc940eb9ecb86c72948ca2768874ba Mon Sep 17 00:00:00 2001 From: stack72 Date: Mon, 12 Mar 2018 17:27:57 +0200 Subject: [PATCH] backend/manta: Manta Backend was not dealing with a ResourceNotFound Fixes: #17314 We now deal correctly with the creation of the state file - we were not dealing well with a ResourceNotFound error Now that this has been changed around, we try and create the statefile and if there is an error, we look for an existing statefile - previously this was not the order of operations --- backend/remote-state/manta/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/remote-state/manta/client.go b/backend/remote-state/manta/client.go index 5d5c8dedd..841bd0f28 100644 --- a/backend/remote-state/manta/client.go +++ b/backend/remote-state/manta/client.go @@ -106,7 +106,7 @@ func (c *RemoteClient) Lock(info *state.LockInfo) (string, error) { lockErr := &state.LockError{} lockInfo, err := c.getLockInfo() if err != nil { - if tritonErrors.IsResourceNotFound(err) { + if !tritonErrors.IsResourceNotFound(err) { lockErr.Err = fmt.Errorf("failed to retrieve lock info: %s", err) return "", lockErr }