Commit Graph

10 Commits

Author SHA1 Message Date
John Mulligan 1d6366f008 rados: add an error to be used if data is requested too early
Add a new error that will be returned from a op step method if the
method is called before the step is ready to provide data - like
when the operation has not yet been performed.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-01-12 14:47:30 +00:00
John Mulligan b6dff699e4 rados: use FormatErrorCode for formatting rados errors
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-08-10 13:03:24 -04:00
John Mulligan 54c268cb81 rados: rename error type's Errno method to ErrorCode
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-08-10 13:03:24 -04:00
Mudit Agarwal 558b366fbb rados: modify validate() to return ErrInvalidIOContext error
If ioctx is not ready to be used then validate() should
return ErrInvalidIOContext error.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-08-04 11:07:40 -04:00
Mudit Agarwal 8788a901dc rados: one minor reformat in errors.go
Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-08-04 11:07:40 -04:00
John Mulligan 8b16f804a3 rados: add error for function args that must have data
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-07-24 09:54:04 -04:00
Sven Anderson e77ecf68f6 rados: make RadosError type unexported
In order to avoid external dependencies on implementation details,
this change replaces RadosError with the unexported radosError. In case
some application really needs access to the integer value, it can use
the pattern
  var errno interface{ Errno() int }
  if errors.As(err, errno) { ... errno.Errno() ... }

Signed-off-by: Sven Anderson <sven@redhat.com>
2020-07-17 13:47:32 -04:00
Sven Anderson e8da761769 update various parts of the code to use the retry lib.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: Sven Anderson <sven@redhat.com>
2020-04-20 15:08:36 -04:00
John Mulligan 5394d1c99f rados: update error conversion func to be consistent with rbd & cephfs
Rename the getRadosError to getError and update it to match the other
packages behavior.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-04-06 17:10:09 -04:00
John Mulligan 1f4543e835 rados: consolidate error types & values in an errors.go file
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-04-06 17:10:09 -04:00