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
This commit is contained in:
stack72 2018-03-12 17:27:57 +02:00
parent 9cef4674c5
commit a6f76aa0af
1 changed files with 1 additions and 1 deletions

View File

@ -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
}