Skip to content

Commit

Permalink
Handle eos EPERM as permission denied
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Sep 18, 2020
1 parent d9ace48 commit f9e7ecc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/handle-eos-eperm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix litmus failing on ocis storage

We now ignore the `no data available` error when removing a non existing metadata attribute, which is ok because we are trying to delete it anyway.

https://github.com/cs3org/reva/issues/1178
https://github.com/cs3org/reva/pull/1179
2 changes: 1 addition & 1 deletion pkg/eosclient/eosclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (c *Client) executeEOS(ctx context.Context, cmd *exec.Cmd) (string, string,
err = nil
case 2:
err = errtypes.NotFound(errBuf.String())
case 22:
case 1, 22:
// eos reports back error code 22 when the user is not allowed to enter the instance
err = errtypes.PermissionDenied(errBuf.String())
}
Expand Down

0 comments on commit f9e7ecc

Please sign in to comment.