In Ceph-CSI, some functions use both calls from the rados and rbd package. This is probably quite common, as interactions through the IOContext are part of rados, and image operations come from rbd.
In the case of an error on the Ceph side, go-ceph returns either a radosError or an rbdError. Ceph-CSI needs to handle some errors differently than others. A relatively common occurrence for checking an error seems to be
if errors.Is(err, librbd.ErrNotFound) || errors.Is(err, rados.ErrNotFound) {
It would be great if these errors would actually be matching the same, so that either one of these statements can be used:
In Ceph-CSI, some functions use both calls from the rados and rbd package. This is probably quite common, as interactions through the IOContext are part of rados, and image operations come from rbd.
In the case of an error on the Ceph side, go-ceph returns either a radosError or an rbdError. Ceph-CSI needs to handle some errors differently than others. A relatively common occurrence for checking an error seems to be
It would be great if these errors would actually be matching the same, so that either one of these statements can be used:
or